| Method | Path | Does |
|---|
GET | /api/partner/webhooks | Your webhooks. |
POST | /api/partner/webhooks | Add one: url, events, client, description. |
GET, PATCH, DELETE | /api/partner/webhooks/{id} | Read, change (rotate_secret: true for a new secret) or delete. |
POST | /api/partner/webhooks/{id}/test | Send a test. Answers { ok, code, response }. |
GET | /api/partner/webhooks/{id}/deliveries | Recent deliveries. |
POST | /api/partner/deliveries/{id}/retry | Send one delivery again. |
Examples
# List
curl $BASE/partner/webhooks -H "Authorization: Bearer $KEY"
# Only one client's link events
curl -X POST $BASE/partner/webhooks -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"url":"https://app.example.com/hooks","events":["link.*"],"client":"ext:user_42"}'
# Change the events
curl -X PATCH $BASE/partner/webhooks/1 -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"events":["link.*","click.created"]}'
# New secret
curl -X PATCH $BASE/partner/webhooks/1 -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"rotate_secret":true}'
# Turn back on after it was turned off
curl -X PATCH $BASE/partner/webhooks/1 -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
-d '{"is_active":true}'
# Delete
curl -X DELETE $BASE/partner/webhooks/1 -H "Authorization: Bearer $KEY"
Fields
| Field | Meaning |
|---|
url | Your public http or https address |
events | Types, groups like link.*, or ["*"] |
client | Left out: everyone’s events. 0: only yours. An id or ext: id: one client’s. |
description | A note for you |
is_active | Off after 25 failures in a row; set back to true to resume |
fails | Failures in a row so far |
secret | Returned only when made or rotated |