API Reference
Manage Webhooks
Register, update, test, and inspect webhook endpoints. Requires scope messages:webhook.
GET
/webhooks
messages:webhook
https://app.washeej.com/v1/webhooks
List registered webhook endpoints.
cURL
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
https://app.washeej.com/v1/webhooks
POST
/webhooks
messages:webhook
https://app.washeej.com/v1/webhooks
Register a webhook endpoint. Secret is returned once.
| Parameter | Type | Required | Description |
|---|---|---|---|
label
|
string | required | Human-readable label (max 100). |
url
|
url | required | HTTPS URL that accepts POST JSON. |
events
|
string[] | optional | Event names to subscribe. Empty/null = all events. |
cURL
curl -X POST https://app.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"]
}'
Store the secret immediately
The response includes
secret (prefix whsec_). It is only shown once at creation.
PATCH
/webhooks/{id}
messages:webhook
https://app.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
curl -X PATCH https://app.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"]}'
DELETE
/webhooks/{id}
messages:webhook
https://app.washeej.com/v1/webhooks/{id}
Delete a webhook endpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
cURL
curl -X DELETE https://app.washeej.com/v1/webhooks/12 \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"
POST
/webhooks/{id}/test
messages:webhook
https://app.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
curl -X POST https://app.washeej.com/v1/webhooks/12/test \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"
GET
/webhooks/{id}/deliveries
messages:webhook
https://app.washeej.com/v1/webhooks/{id}/deliveries
List delivery logs for a webhook.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Webhook ID. |
cURL
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
https://app.washeej.com/v1/webhooks/12/deliveries
POST
/webhooks/deliveries/{deliveryId}/resend
messages:webhook
https://app.washeej.com/v1/webhooks/deliveries/{deliveryId}/resend
Retry a failed delivery.
| Parameter | Type | Required | Description |
|---|---|---|---|
deliveryId
path
|
integer | required | Delivery log ID. |
cURL
curl -X POST https://app.washeej.com/v1/webhooks/deliveries/901/resend \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"