Skip to content

Testing & Resending Deliveries ​

Verify a webhook endpoint works before relying on it, and re-queue an individual delivery that failed.

Send a Test Event ​

Endpoint ​

POST /api/v1/webhooks/:id/test

Authentication ​

Requires JWT token via Authorization: Bearer header.

Description ​

Sends a synthetic webhook.test event to the webhook's configured URL through the same signing/delivery path used for real events, regardless of which events the webhook is subscribed to. Use this to verify a newly-configured endpoint (or one you just fixed) before relying on it in production.

The call only queues the test event - it's asynchronous. Check Get Webhook Deliveries for the outcome.

Example Request ​

bash
curl -X POST "https://api.yebolink.com/api/v1/webhooks/WEBHOOK_ID/test" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response ​

json
{
  "success": true,
  "data": {
    "event_type": "webhook.test",
    "message": "Test event queued for delivery"
  }
}

Status Codes ​

StatusDescription
200Test event queued for delivery
401Unauthorized - invalid or missing JWT token
404Webhook not found
500Internal server error

Get Webhook Deliveries ​

Before resending a delivery you need its id. List recent delivery attempts for a webhook:

Endpoint ​

GET /api/v1/webhooks/:id/deliveries

Authentication ​

Requires JWT token via Authorization: Bearer header.

Query Parameters ​

ParameterTypeRequiredDescription
limitintegerNoMaximum number of delivery records to return (1-100, default 50)

Example Request ​

bash
curl "https://api.yebolink.com/api/v1/webhooks/WEBHOOK_ID/deliveries?limit=50" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response ​

json
{
  "success": true,
  "data": {
    "deliveries": [
      {
        "id": "6b1f2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
        "webhook_id": "550e8400-e29b-41d4-a716-446655440000",
        "event_type": "message.failed",
        "payload": { "message_id": "abc123", "status": "failed" },
        "response_status": null,
        "response_body": null,
        "error": "connect ETIMEDOUT",
        "delivered_at": "2025-11-02T12:00:00Z"
      }
    ]
  }
}

Resend a Failed Delivery ​

Endpoint ​

POST /api/v1/webhooks/:id/deliveries/:deliveryId/resend

Authentication ​

Requires JWT token via Authorization: Bearer header.

Description ​

Re-queues the exact event_type and payload of a past delivery for a fresh delivery attempt, without waiting for the original event to fire again. Useful after fixing an endpoint that previously failed - grab the deliveryId from Get Webhook Deliveries and resend it directly instead of reproducing the original event.

Example Request ​

bash
curl -X POST "https://api.yebolink.com/api/v1/webhooks/WEBHOOK_ID/deliveries/DELIVERY_ID/resend" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response ​

json
{
  "success": true,
  "data": {
    "event_type": "message.failed",
    "message": "Delivery queued for resend"
  }
}

Status Codes ​

StatusDescription
200Delivery re-queued
401Unauthorized - invalid or missing JWT token
404Webhook or delivery not found
500Internal server error

Next Steps ​

Built with VitePress