Skip to Content
Developers
Webhooks

Set the webhook endpoint

PUT
/webhooks

Sets where ENDVR sends events. The signing secret is returned when the endpoint is first set and when rotateSecret is true, and never again. After a rotation, events carry signatures from both secrets for 24 hours.

Authorization

integrationKey
headerAuthorizationBearer <token>

A brand integration key, created by an Owner or Admin in Brand Settings › Integrations and shown once. endvr_ik_test_… keys write test data that is never billed; endvr_ik_live_… keys are live.

Request Body

application/json
  1. body
url*string

An HTTPS URL.

Formaturi
events*array<>
Items1 <= items
rotateSecret?boolean
Defaultfalse

Response Body

The webhook configuration, with secret when it was just created or rotated.

application/json
  1. response
url*|
Formaturi
events*array<>
lastDeliveryAt*|

The last successful delivery.

Formatdate-time
failingSince*|

Set while deliveries keep failing; null when healthy.

Formatdate-time
secret?string

The signing secret. Present only right after it was created or rotated.

Example"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
Example Request
curl -X PUT 'https://api.endvr.io/v1/webhooks' \  -H 'Content-Type: application/json' \  -d '{  "url": "https://shop.example.com/endvr/webhooks",  "events": [    "code.deactivate",    "pro_deal.ended"  ]}'
Example Response
{  "url": "http://example.com",  "events": [    "code.deactivate"  ],  "lastDeliveryAt": "2019-08-24T14:15:22Z",  "failingSince": "2019-08-24T14:15:22Z",  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"}