Skip to content
Skip to Content
Full reference

Webhooks

List webhooks

GET
/v1/webhooks

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Response Body

The user's webhooks

application/json
  1. response
webhooks*array<>
Example Request
curl -X GET 'https://example.com/v1/webhooks'
Example Response
{  "webhooks": [    {      "id": "string",      "url": "string",      "has_auth_token": true,      "header_names": [        "string"      ],      "events": [        "item.created"      ],      "enabled": true,      "disabled_reason": "string",      "disabled_reason_code": "too_many_failures",      "disabled_reason_params": {        "failures": 10      },      "consecutive_failures": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}

Register a webhook

POST
/v1/webhooks

The signing secret is in the response and is never shown again. Save it now.

The URL must be https and point to a public address. A self-hosted server can relax both with WEBHOOK_ALLOW_PRIVATE_NETWORKS. A user can have at most 10 webhooks.

A failed delivery is retried 7 times over about 10 hours. The webhook is turned off (enabled: false, with a disabled_reason) when the receiver answers 410 Gone, or after 10 deliveries in a row run out of retries. See docs/WEBHOOKS.md for the payload and how to check X-Trova-Signature.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
url*string
Lengthlength <= 2048
events*array<>
Items1 <= items
auth_token?string

Optional. If set, every delivery includes the header Authorization: Bearer <token>. Visible ASCII only, no spaces; a leading Bearer is dropped. It is never returned.

Lengthlength <= 4096
headers?

Optional custom headers sent with every delivery, name to value, such as {"X-Api-Key": "…"}. Names are HTTP tokens (letters, digits, -…), up to 64 characters, and are stored in canonical form (x-api-key becomes X-Api-Key). Values are visible ASCII and spaces, up to 1024 characters. Headers Trova sets itself, Authorization (use auth_token), Host, Cookie and headers that frame the request (Content-Length, Transfer-Encoding, Connection…) are refused. Values are never returned; header_names lists the names.

Propertiesproperties <= 10

Response Body

The new webhook, with its signing secret

application/json
  1. response
id*string
url*string
has_auth_token*boolean

Whether deliveries carry an Authorization: Bearer header. The token itself is never returned.

header_names*array<string>

Names of the custom headers sent with every delivery, sorted. Their values are never returned.

events*array<>
enabled*boolean
disabled_reason*|

Why Trova turned the webhook off

disabled_reason_code?|

disabled_reason as a code, for the client to word: too_many_failures (params failures), gone (the endpoint answered 410), backlog (too many events waiting), operator (switched off by support), account_deleting. Null while enabled, or for an old reason with no code. New codes may be added; show disabled_reason for one you do not know.

Value in"too_many_failures""gone""backlog""operator""account_deleting"null
disabled_reason_params?|null
consecutive_failures*integer
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
secret*string
Example Request
curl -X POST 'https://example.com/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://example.com/hooks/trova",  "events": [    "item.created"  ]}'
Example Response
{  "id": "string",  "url": "string",  "has_auth_token": true,  "header_names": [    "string"  ],  "events": [    "item.created"  ],  "enabled": true,  "disabled_reason": "string",  "disabled_reason_code": "too_many_failures",  "disabled_reason_params": {    "failures": 10  },  "consecutive_failures": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "secret": "whsec_ABCDEF…"}

Get a webhook

GET
/v1/webhooks/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

The webhook

application/json
  1. response
id*string
url*string
has_auth_token*boolean

Whether deliveries carry an Authorization: Bearer header. The token itself is never returned.

header_names*array<string>

Names of the custom headers sent with every delivery, sorted. Their values are never returned.

events*array<>
enabled*boolean
disabled_reason*|

Why Trova turned the webhook off

disabled_reason_code?|

disabled_reason as a code, for the client to word: too_many_failures (params failures), gone (the endpoint answered 410), backlog (too many events waiting), operator (switched off by support), account_deleting. Null while enabled, or for an old reason with no code. New codes may be added; show disabled_reason for one you do not know.

Value in"too_many_failures""gone""backlog""operator""account_deleting"null
disabled_reason_params?|null
consecutive_failures*integer
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://example.com/v1/webhooks/string'
Example Response
{  "id": "string",  "url": "string",  "has_auth_token": true,  "header_names": [    "string"  ],  "events": [    "item.created"  ],  "enabled": true,  "disabled_reason": "string",  "disabled_reason_code": "too_many_failures",  "disabled_reason_params": {    "failures": 10  },  "consecutive_failures": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
PATCH
/v1/webhooks/{id}

Turning a webhook on again clears its failure count and the reason it was turned off. auth_token replaces the bearer token; "" removes it; leaving it out (or null) keeps it.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Request Body

application/json
  1. body
auth_token?|

The new bearer token, or "" to remove it. Same rules as on create.

Lengthlength <= 4096
headers?|

Replaces every custom header; {} removes them; null or left out keeps them.

url?string
Lengthlength <= 2048
events?array<>
Items1 <= items
enabled?boolean

Response Body

The webhook

application/json
  1. response
id*string
url*string
has_auth_token*boolean

Whether deliveries carry an Authorization: Bearer header. The token itself is never returned.

header_names*array<string>

Names of the custom headers sent with every delivery, sorted. Their values are never returned.

events*array<>
enabled*boolean
disabled_reason*|

Why Trova turned the webhook off

disabled_reason_code?|

disabled_reason as a code, for the client to word: too_many_failures (params failures), gone (the endpoint answered 410), backlog (too many events waiting), operator (switched off by support), account_deleting. Null while enabled, or for an old reason with no code. New codes may be added; show disabled_reason for one you do not know.

Value in"too_many_failures""gone""backlog""operator""account_deleting"null
disabled_reason_params?|null
consecutive_failures*integer
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://example.com/v1/webhooks/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "url": "string",  "has_auth_token": true,  "header_names": [    "string"  ],  "events": [    "item.created"  ],  "enabled": true,  "disabled_reason": "string",  "disabled_reason_code": "too_many_failures",  "disabled_reason_params": {    "failures": 10  },  "consecutive_failures": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
DELETE
/v1/webhooks/{id}

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

Deleted

Example Request
curl -X DELETE 'https://example.com/v1/webhooks/string'
Example Response
Empty
POST
/v1/webhooks/{id}/test

Sends the event even when the webhook is turned off, and tries once. A failure does not count against the webhook's health (an answer of 410 Gone still turns it off), and a success clears its failure count. Follow the result in the delivery log. Answers 409 while an earlier test is still on its way.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

The test delivery is queued. Find it in the delivery log by its delivery_id.

application/json
  1. response
delivery_id*string
Example Request
curl -X POST 'https://example.com/v1/webhooks/string/test'
Example Response
{  "delivery_id": "string"}
GET
/v1/webhooks/{id}/deliveries

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Path Parameters

id*string

Response Body

Deliveries, newest first

application/json
  1. response
deliveries*array<>
Example Request
curl -X GET 'https://example.com/v1/webhooks/string/deliveries'
Example Response
{  "deliveries": [    {      "id": "string",      "event": "item.created",      "status": "pending",      "attempts": 0,      "response_status": 0,      "error": "string",      "created_at": "2019-08-24T14:15:22Z",      "delivered_at": "2019-08-24T14:15:22Z"    }  ]}