Skip to content

Webhooks API

Convoy Endpoints

Base path: /api/webhooks/endpoints

GET /api/webhooks/endpoints

List all Convoy webhook endpoints.

POST /api/webhooks/endpoints

Create a delivery endpoint.

Request body:

{
"url": "https://acme.example.com/webhooks/ltg",
"description": "Acme production webhook",
"events": ["subscription.created", "subscription.revoked"],
"secret": "whsec_xxxx"
}

PUT /api/webhooks/endpoints/:id

Update an endpoint.

DELETE /api/webhooks/endpoints/:id

Delete an endpoint.

PUT /api/webhooks/endpoints/:id/pause

Toggle endpoint delivery on/off.

Request body: { "paused": true }


Deliveries

Base path: /api/webhooks/deliveries

GET /api/webhooks/deliveries

List delivery attempts.

Query params:

  • endpointId — filter by endpoint
  • status — success, failed, pending
  • page, perPage — pagination

Response 200:

{
"deliveries": [
{
"id": "del_abc",
"endpointId": "ep_xyz",
"eventType": "subscription.created",
"status": "success",
"httpStatus": 200,
"attempts": 1,
"createdAt": "2024-01-15T10:00:00.000Z"
}
],
"pagination": { "page": 1, "perPage": 20, "total": 45 }
}

GET /api/webhooks/deliveries/:id

Get a delivery with full request/response details.

POST /api/webhooks/deliveries/:id/retry

Retry a failed delivery.

POST /api/webhooks/deliveries/batchretry

Retry multiple deliveries.

Request body: { "ids": ["del_abc", "del_def"] }


Test Listeners (Request Bin)

Base path: /api/webhooks/listeners

GET /api/webhooks/listeners

List all test listeners.

POST /api/webhooks/listeners

Create a new listener.

Request body:

{
"name": "My test listener",
"description": "For testing subscription events"
}

Response 201:

{
"id": "lst_abc123",
"name": "My test listener",
"receiveUrl": "http://localhost:3000/api/webhooks/receive/lst_abc123",
"createdAt": "2024-01-15T10:00:00.000Z"
}

DELETE /api/webhooks/listeners/:id

Delete a listener and all its captured requests.

GET /api/webhooks/listeners/:id/requests

Get captured requests (last 100).

Response 200:

[
{
"id": "req_001",
"method": "POST",
"headers": { "content-type": "application/json", "x-convoy-signature": "..." },
"body": { "event": "subscription.created", "data": {...} },
"receivedAt": "2024-01-15T10:05:00.000Z"
}
]

DELETE /api/webhooks/listeners/:id/requests

Clear all captured requests.

ALL /api/webhooks/receive/:id

The actual receive endpoint. Point Convoy or any sender at this URL. Accepts any method and any body. Always returns 200 OK.


Dispatching events

Terminal window
POST /api/webhooks/dispatch
Content-Type: application/json
{
"eventType": "subscription.created",
"payload": {
"subscriptionId": "sub_abc",
"name": "Acme Corp",
"plan": "professional"
}
}