FreightCake
API Reference

Webhooks

Signed event delivery to your endpoints.

GET/api/v1/webhooks

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Query Parameters

limit?integer

Page size. Defaults to a server-chosen value; maximum 100.

Range1 <= value <= 100
starting_after?string

Cursor: return records after this id.

ending_before?string

Cursor: return records before this id.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/webhooks"
{  "object": "list",  "data": [    {      "object": "webhook_endpoint",      "id": 0,      "url": "string",      "enabled_events": [        "string"      ],      "status": "string",      "created_at": "string"    }  ],  "has_more": true,  "url": "/api/v1/webhooks"}
POST/api/v1/webhooks

Deliveries are signed with HMAC-SHA256 and sent in the X-FreightCake-Signature header alongside a timestamp, so receivers can reject replayed payloads.

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/webhooks" \  -H "Content-Type: application/json" \  -d '{    "url": "http://example.com",    "enabled_events": [      "string"    ]  }'
{  "object": "webhook_endpoint",  "id": 0,  "url": "string",  "enabled_events": [    "string"  ],  "status": "string",  "created_at": "string",  "secret": "string"}
GET/api/v1/webhooks/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/webhooks/string"
{  "object": "webhook_endpoint",  "id": 0,  "url": "string",  "enabled_events": [    "string"  ],  "status": "string",  "created_at": "string"}
PATCH/api/v1/webhooks/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v1/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "object": "webhook_endpoint",  "id": 0,  "url": "string",  "enabled_events": [    "string"  ],  "status": "string",  "created_at": "string"}
DELETE/api/v1/webhooks/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/webhooks/string"
{  "object": "webhook_endpoint",  "id": 0,  "deleted": true}
POST/api/v1/webhooks/{id}/rotate-secret

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/webhooks/string/rotate-secret"
{  "object": "webhook_endpoint",  "id": 0,  "url": "string",  "enabled_events": [    "string"  ],  "status": "string",  "created_at": "string",  "secret": "string"}
POST/api/v1/webhooks/{id}/test

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/webhooks/string/test"
{  "object": "webhook_test",  "delivered": true}
GET/api/v1/webhooks/{id}/deliveries

Authorization

ApiKeyAuth
AuthorizationBearer <token>

Authenticate with your secret API key in the Authorization header: Authorization: Bearer fk_live_.... Use an fk_test_ key to operate against test mode, which never contacts a carrier or moves real freight.

In: header

Path Parameters

id*string

Resource identifier.

Query Parameters

limit?integer

Page size. Defaults to a server-chosen value; maximum 100.

Range1 <= value <= 100

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/webhooks/string/deliveries"
{  "object": "list",  "data": [    {      "object": "webhook_delivery",      "id": 0,      "event_type": "string",      "response_status": 0,      "succeeded": true,      "attempted_at": "string"    }  ],  "has_more": true,  "url": "/api/v1/webhooks"}