Skip to main content
Sends a test.event webhook to all configured webhook URLs for your client. Use this endpoint to:
  • Verify your webhook endpoint is receiving events correctly
  • Test your webhook signature verification logic
  • Validate your event processing pipeline
  • Debug webhook delivery issues
The test event will include the standard webhook structure with a test.event type.

Prerequisites

You must have at least one webhook URL configured before sending a test event. If you haven’t configured a webhook URL yet, use the Create Webhook endpoint first.

Example Request

curl -X POST https://api.usecobalt.com/v1/webhook/test \
  -H 'client_id: ci_live_198908HJDKJSH98789OHKJL' \
  -H 'client_secret: cs_live_9827hofdsklOYYHJLJh' \
  -H 'access_token: at_live_abc123def456'

Example Response

{
  "success": true,
  "message": "Test webhook sent to 2 URL(s)",
  "webhook_urls_count": 2,
  "event": {
    "id": "test-event-1703172600000",
    "access_token_reference_id": "your-reference-id",
    "object": "event",
    "created": "2025-10-21T14:30:00.000Z",
    "type": "test.event",
    "data": {
      "message": "This is a test webhook event",
      "timestamp": "2025-10-21T14:30:00.000Z"
    }
  }
}

What Your Webhook Endpoint Will Receive

Your webhook endpoint will receive the test event with a signature header that you should verify:
{
  "id": "test-event-1703172600000",
  "access_token_reference_id": "your-reference-id",
  "object": "event",
  "created": "2025-10-21T14:30:00.000Z",
  "type": "test.event",
  "data": {
    "message": "This is a test webhook event",
    "timestamp": "2025-10-21T14:30:00.000Z"
  }
}
The test webhook will be signed with your webhook secret key. Make sure to verify the cobalt-verification header to ensure the webhook is authentic. See Receiving Webhooks for signature verification details.

Common Use Cases

After configuring your first webhook URL, send a test event to confirm your endpoint is reachable and processing webhooks correctly.
After updating your webhook handler code, send a test event to verify your changes work as expected before going live.
If you’re not receiving production webhooks, send a test event to isolate whether the issue is with your endpoint or with specific event types.
Send a test event and verify the cobalt-verification header to ensure your signature verification logic is working correctly.

Error Responses

404 - No Webhook URLs Configured
{
  "success": false,
  "message": "No webhook URLs configured. Please add a webhook URL first using POST /v1/webhooks."
}
401 - Invalid Access Token
{
  "success": false,
  "message": "Invalid access token"
}
401 - Access Token Mismatch
{
  "success": false,
  "message": "Access token does not belong to this client"
}