FreightCake
API Reference

Webhook Endpoints

API reference for managing webhook endpoints.

Create Endpoint

POST /v1/webhook_endpoints

Request Body

FieldTypeRequiredDescription
urlstringYesHTTPS URL to receive events
eventsstring[]YesEvent types to subscribe to
descriptionstringNoHuman-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

ParamTypeDescription
limitnumberMax results (1-100, default 25)
starting_afterstringCursor for forward pagination

Retrieve Endpoint

GET /v1/webhook_endpoints/:id


Update Endpoint

PATCH /v1/webhook_endpoints/:id

Request Body

FieldTypeDescription
urlstringNew endpoint URL
eventsstring[]Updated event subscriptions
activebooleanEnable/disable the endpoint
descriptionstringUpdated 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

ParamTypeDescription
limitnumberMax results (1-100, default 25)
starting_afterstringCursor for forward pagination
statusstringFilter: pending, delivered, failed, retrying

On this page