Update a webhook endpoint

Changes the url, the events or the status. Fields left out stay as they are. The secret does not change: use rotate-secret.

PATCH
/v1/webhooks/{endpointId}

Changes the url, the events or the status. Fields left out stay as they are. The secret does not change: use rotate-secret.

Authorization

AuthorizationBearer <token>

The organization API key, sent as Authorization: Bearer <key>.

In: header

Path Parameters

endpointId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

eventTypes?array<>

The events this endpoint receives. One or more of: sale.won, sale.updated.

Items1 <= items
status?string

Value in

  • "enabled"
  • "disabled"
url?string

Where the events are POSTed. Must be https:// on a public host.

Lengthlength <= 2048

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/v1/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "createdAt": "2019-08-24T14:15:22Z",  "eventTypes": [    "sale.won"  ],  "id": "string",  "previousSecretExpiresAt": "2019-08-24T14:15:22Z",  "status": "enabled",  "updatedAt": "2019-08-24T14:15:22Z",  "url": "string"}