Skip to main content

Test Webhook Subscription

Sends a test webhook payload to the URL configured for a specific webhook subscription. This allows you to verify that your endpoint is correctly receiving and processing webhooks.

Endpoint

POST /v1/webhook-subscriptions/{id}/test

Authentication

API key required. Include it in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

ParameterTypeDescription
idstringThe ID of the webhook subscription to test.

Response

200 OK

{
"message": "Test webhook sent successfully"
}

Error Responses

Status CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - You don't have permission to test this webhook subscription
404Not Found - The specified webhook subscription could not be found
429Too Many Requests - Rate limit exceeded
500Server Error - Something went wrong on our end

Example Request

cURL

curl -X POST \
https://api.shipping-channels.com/v1/webhook-subscriptions/wh_123456/test \
-H "Authorization: Bearer YOUR_API_KEY"

PHP

<?php
$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.shipping-channels.com/v1/webhook-subscriptions/wh_123456/test', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
],
]);

$data = json_decode($response->getBody(), true);

JavaScript

fetch('https://api.shipping-channels.com/v1/webhook-subscriptions/wh_123456/test', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Accept': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));