POST
/
2.0
/
webhook
Create a new webhook subscription
curl --request POST \
  --url https://api.shipbob.com/2.0/webhook \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "subscription_url": "https://mywebsite.com/shipbob/handler",
  "topic": "order_shipped"
}'
{
  "created_at": "2019-08-24T14:15:22Z",
  "id": 12345,
  "subscription_url": "http://example.com",
  "topic": "order_shipped"
}

Authorizations

Authorization
string
header
required

Authentication using Personal Access Token (PAT) token

Headers

shipbob_channel_id
string<int32>

Body

application/json
subscription_url
string<uri>
required

URL we will call when an event matching the subscription topic is raised. Must have ssl enabled (https) and accept POST requests with content type of application/json

Example:

"https://mywebsite.com/shipbob/handler"

topic
enum<string>
required
Available options:
order_shipped,
shipment_delivered,
shipment_exception,
shipment_onhold,
shipment_cancelled

Response

Success

created_at
string<date-time>

Timestamp the webhook subscription was created

id
integer

ID of the webhook subscription

Example:

12345

subscription_url
string<uri> | null

URL subscription events will be posted to

topic
enum<string>
Available options:
order_shipped,
shipment_delivered,
shipment_exception,
shipment_onhold,
shipment_cancelled