Webhook Tester API Documentation

API Authentication

All API requests require authentication using an API token in the Authorization header.

Authorization: Bearer Please log in to get your API token.

Base URL for the API:

https://webhook-test.com/api

Note: You can find your API token in your account settings.

GET /webhooks/:id

Retrieves the details and payloads of a specific webhook.

Parameters

Parameter Type Description
id integer The unique identifier of the webhook.

Response

The response will be a JSON object containing the details of the webhook.

{
  "address": "cb51e5552e035d84fe9b14ba45f0be27",
  "response_code": "200",
  "content_type": "application/json",
  "payload": "{\"success\": true}",
  "payloads": [
    {
      "method": "POST",
      "headers": {
        "host": "localhost:3000",
        "accept": "*/*",
        "version": "HTTP/1.1",
        "user-agent": "curl/8.4.0"
      },
      "created_at": "2024-09-30T19:57:52.469Z",
      "payload": "{\"username\":\"xyz\",\"password\":\"xyz\"}"
    },
    {
      "method": "POST",
      "headers": {
        "host": "localhost:3000",
        "accept": "*/*",
        "version": "HTTP/1.1",
        "user-agent": "curl/8.4.0"
      },
      "created_at": "2024-09-30T19:57:52.163Z",
      "payload": "{\"username\":\"xyz\",\"password\":\"xyz\"}"
    },
    {
      "method": "POST",
      "headers": {
        "host": "localhost:3000",
        "accept": "*/*",
        "version": "HTTP/1.1",
        "user-agent": "curl/8.4.0"
      },
      "created_at": "2024-09-30T19:57:51.632Z",
      "payload": "{\"username\":\"xyz\",\"password\":\"xyz\"}"
    }
  ]
}

GET /webhooks

Lists all webhooks for the authenticated user.

Response

Returns an array of webhook objects.

[
 {
   "title": "Test Webhook",
   "address": "cb51e5552e035d84fe9b14ba45f0be27",
   "response_code": "200",
   "content_type": "application/json",
   "payload": "{\"success\": true}",
 },
 {
   "title": "Another Webhook",
   "address": "a4c3b2e1d8f7g6h5i4j3k2l1m0n9o8p7",
   "response_code": "201",
   "content_type": "application/json",
   "payload": "{\"status\": \"created\"}",
 }
]

POST /webhooks

Creates a new webhook.

Parameters

Parameter Type Description
title string Name of the webhook
response_code string HTTP response code to return
content_type string Response content type (e.g., application/json)
payload string Response payload
response_delay integer Delay in milliseconds before responding

Response

Returns the created webhook object.

{
 "title": "Test Webhook",
 "address": "cb51e5552e035d84fe9b14ba45f0be27",
 "response_code": "200",
 "content_type": "application/json",
 "payload": "{\"success\": true}",
}

DELETE /webhooks/:id

Deletes a specific webhook.

Parameters

Parameter Type Description
id integer The ID of the webhook to delete

Response

Returns no content with status code 204 on success.