Create webhook
Subscribes an address to events. Signature secret is shown once, in the creation response.
POST /webhooks
- Key Permission:
webhooks:write - Key: test or live
- Idempotency-Key: required. Idempotency
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
url |
string | yes | Address to send events to. Only https allowed, internal addresses are prohibited, up to 500 characters. |
events |
array | yes | List of events, e.g., shipment.status_changed, shipment.tracking_updated. Full list in the “Webhooks” section. |
Important to know
- The
secretis visible only in this response. Save it immediately: repeating the request with the sameIdempotency-Keyreturns the webhook without the secret, and a lost secret must be replaced by rotation. - Адрес только
https, внутренние адреса (localhost, частные сети) запрещены, перенаправления не выполняются. - Available events:
shipment.created,shipment.status_changed,shipment.delivered,shipment.cancelled,shipment.tracking_updated,extra_charge.created,balance.topup. - На аккаунт можно создать не больше 10 вебхуков, иначе 409.
Request example
curl -X POST https://api.shippickup.com/v1/webhooks \
-H "Authorization: Bearer $SHIPPICKUP_API_KEY" \
-H "Idempotency-Key: order-10452-label-v1" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/shipto/webhook",
"events": [
"shipment.status_changed",
"shipment.tracking_updated"
]
}'<?php
$body = [
'url' => 'https://example.com/shipto/webhook',
'events' => [
'shipment.status_changed',
'shipment.tracking_updated',
],
];
$ch = curl_init('https://api.shippickup.com/v1/webhooks');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SHIPPICKUP_API_KEY'),
'Idempotency-Key: order-10452-label-v1',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($body),
]);
$response = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
print_r([$status, $response]);
import os
import requests
body = {
"url": "https://example.com/shipto/webhook",
"events": [
"shipment.status_changed",
"shipment.tracking_updated",
],
}
r = requests.post(
"https://api.shippickup.com/v1/webhooks",
headers={
"Authorization": "Bearer " + os.environ["SHIPPICKUP_API_KEY"],
"Idempotency-Key": "order-10452-label-v1",
},
json=body,
timeout=30,
)
print(r.status_code, r.json())
const body = {
"url": "https://example.com/shipto/webhook",
"events": [
"shipment.status_changed",
"shipment.tracking_updated"
]
};
const res = await fetch("https://api.shippickup.com/v1/webhooks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SHIPPICKUP_API_KEY}`,
"Idempotency-Key": "order-10452-label-v1",
"Content-Type": "application/json",
},
body: JSON.stringify(body),
});
console.log(res.status, await res.json());
Response example 201
JSON
{
"data": {
"id": 12,
"url": "https://example.com/shipto/webhook",
"events": [
"shipment.status_changed",
"shipment.tracking_updated"
],
"active": true,
"created_at": "2026-12-04T10:15:30+00:00",
"secret": "whsec_<shown once>"
}
}Possible errors
| HTTP | Code | Description |
|---|---|---|
| 422 | validation_failed | Error in request fields. error.details specifies the reason for each field. |
| 422 | idempotency_key_required | Missing or invalid Idempotency-Key header: must be 16–64 characters A-Za-z0-9_-. |
| 422 | idempotency_key_reused | Этот Idempotency-Key уже использован для другого запроса: для нового запроса нужен новый ключ. |
| 403 | insufficient_scope | Key lacks the required permission, specified in error.details.required_scope. |
| 429 | rate_limited | Key request limit exceeded. Retry after the time specified in the Retry-After header. |
| 409 | conflict | Action is currently not possible for this order (e.g., order cannot be canceled or pickup already ordered). Reason text in error.message. |