API Reference
Manage Webhooks
With API key authentication you see and manage every webhook of the account. With OAuth 2.0 (Connect with Washeej) your app sees its own webhooks and the account-wide ones, never another app's; the webhooks it creates belong to it (owner.type = "oauth_app") and pause while the app is disabled or disconnected. Each webhook object carries owner: {"type":"account"} or {"type":"oauth_app","developer_app_id":12,"delivering":true}.
Register, update, test, and inspect webhook endpoints. Requires scope messages:webhook.
/webhooks
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks
List registered webhook endpoints.
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
https://staging-mobile.washeej.com/v1/webhooks
/webhooks
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks
Register a webhook endpoint. Secret is returned once. Maximum 10 endpoints per account (422 limit_reached).
| Parameter | Type | Required | Description |
|---|---|---|---|
label
|
string | required | Human-readable label (max 100). |
url
|
url | required | HTTPS URL that accepts POST JSON. |
events
|
string[] | optional | Exact events (message.received) and/or families (message.*, device.*, template.*, ticket.*). Empty/null = all events. |
curl -X POST https://staging-mobile.washeej.com/v1/webhooks \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"label": "Production",
"url": "https://your-server.com/webhooks/washeej",
"events": ["message.received", "message.delivered", "device.connected"]
}'
secret (prefix whsec_). It is only shown once at creation.
/webhooks/{id}
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks/{id}
Update label, URL, or subscribed events.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
label
|
string | optional | New label. |
url
|
url | optional | New callback URL. |
events
|
string[] | optional | Replace subscribed events. |
curl -X PATCH https://staging-mobile.washeej.com/v1/webhooks/12 \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"events": ["message.received", "message.failed"]}'
/webhooks/{id}
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks/{id}
Delete a webhook endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
curl -X DELETE https://staging-mobile.washeej.com/v1/webhooks/12 \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"
/webhooks/{id}/test
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks/{id}/test
Enqueue a webhook.test delivery to your endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
curl -X POST https://staging-mobile.washeej.com/v1/webhooks/12/test \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"
POST /v1/webhooks/{id}/test or resend returns outbound_blocked, manual probes are disabled by policy. Automatic deliveries for active endpoints continue. Re-enable an auto-disabled endpoint from the dashboard Toggle after your receiver returns 2xx consistently.
/webhooks/{id}/deliveries
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks/{id}/deliveries
List delivery logs for a webhook.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
https://staging-mobile.washeej.com/v1/webhooks/12/deliveries
/webhooks/deliveries/{deliveryId}/resend
messages:webhook
https://staging-mobile.washeej.com/v1/webhooks/deliveries/{deliveryId}/resend
Retry a failed delivery.
| Parameter | Type | Required | Description |
|---|---|---|---|
deliveryId
path
|
integer | required | Delivery log ID. |
curl -X POST https://staging-mobile.washeej.com/v1/webhooks/deliveries/901/resend \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"