Skip to Content
Bhakti BaazarDevelopers
API referenceWebhooks

Change a webhook endpoint

PATCH
/webhook-endpoints/{endpointId}

Scope: webhooks:manage

Change its URL, events or description, or switch it off and on. Switching off ends waiting deliveries; events in between are not queued, so read them from GET /events.

Authorization

sellerApiKey
headerAuthorizationBearer <bbsk_live_…>

A Seller API key, bbsk_live_…

Path Parameters

endpointId*string
Formatuuid

Request Body

application/json
  1. body
url?string
Lengthlength <= 2048
events?array<>
description?|

null removes it.

Lengthlength <= 120
enabled?boolean

false pauses sending; events in between are not queued (read them from GET /events). true switches it back on, also after it was switched off for failing.

Response Body

application/json
  1. response
id*string
Formatuuid
url*string
description*string|null
events*array<>
enabled*boolean
disabledReason*|

seller: you switched it off. failing: every attempt failed for 24 hours, so we switched it off.

Value in"seller""failing"
disabledAt*|
Formatdate-time
failingSince*|

When the current run of failures began; null after any success.

Formatdate-time
previousSecretExpiresAt*|

After a secret rotation, the old secret also signs until this time.

Formatdate-time
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X PATCH 'https://api.bhaktibaazar.com/seller-api/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "url": "string",  "description": "string",  "events": [    "order.created"  ],  "enabled": true,  "disabledReason": "seller",  "disabledAt": "2019-08-24T14:15:22Z",  "failingSince": "2019-08-24T14:15:22Z",  "previousSecretExpiresAt": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}