Skip to main content
PATCH
/
api
/
v2
/
platform
/
webhooks
/
subscribers
/
{id}
Update a Webhook Subscriber
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    subscriber: {
      url: 'https://www.url.com/',
      active: true,
      subscriptions: ['order.created', 'order.completed', 'product.updated']
    }
  })
};

fetch('http://{defaultHost}/api/v2/platform/webhooks/subscribers/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "data": {
    "id": "12",
    "type": "subscriber",
    "attributes": {
      "url": "https://www.url12.com/",
      "active": true,
      "subscriptions": [
        "*"
      ],
      "created_at": "2022-11-08T19:36:00.130Z",
      "updated_at": "2022-11-08T19:36:00.130Z"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
subscriber
object
required

Response

Record updated

data
object
required