Skip to content
Skip to Content
DevelopersAPI referenceWebhooks

Change a webhook's URL, events or auth token, or turn it on or off

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>

A personal API key (ga_…), sent as Authorization: Bearer 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"}