API Reference
Webhook Endpoints
API reference for managing webhook endpoints.
Create Endpoint
POST /v1/webhook_endpoints
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | HTTPS URL to receive events |
events | string[] | Yes | Event types to subscribe to |
description | string | No | Human-readable description |
Example
curl -X POST https://api.freightcake.com/api/v1/webhook_endpoints \
-H "Authorization: Bearer fk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks",
"events": ["shipment.delivered", "invoice.created"]
}'Response
{
"object": "webhook_endpoint",
"id": 1,
"url": "https://your-app.com/webhooks",
"events": ["shipment.delivered", "invoice.created"],
"active": true,
"signing_secret": "whsec_abc123...",
"created_at": "2025-07-01T00:00:00.000Z"
}List Endpoints
GET /v1/webhook_endpoints
Query Parameters
| Param | Type | Description |
|---|---|---|
limit | number | Max results (1-100, default 25) |
starting_after | string | Cursor for forward pagination |
Retrieve Endpoint
GET /v1/webhook_endpoints/:id
Update Endpoint
PATCH /v1/webhook_endpoints/:id
Request Body
| Field | Type | Description |
|---|---|---|
url | string | New endpoint URL |
events | string[] | Updated event subscriptions |
active | boolean | Enable/disable the endpoint |
description | string | Updated description |
Delete Endpoint
DELETE /v1/webhook_endpoints/:id
Test Endpoint
POST /v1/webhook_endpoints/:id/test
Sends a test shipment.booked event to the endpoint.
List Deliveries
GET /v1/webhook_endpoints/:id/deliveries
Returns recent delivery attempts for this endpoint.
Query Parameters
| Param | Type | Description |
|---|---|---|
limit | number | Max results (1-100, default 25) |
starting_after | string | Cursor for forward pagination |
status | string | Filter: pending, delivered, failed, retrying |