Update a webhook
Updates the webhook with the given id. The attributes are the same as for
Create; the example only sends
url and state.
AuthorizationbearerAuth
Authorization
bearerAuth API token as bearer token — you receive a test and a live token, there is no switch between them. See Setup → Authentication and Setup → Test mode.
In: header
Path Parameters
The ID of the resource.
Header Parameters
The API only responds with JSON — this header is mandatory on every request (see Setup → Headers).
"application/json"Value in
- "application/json"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Attributes for updating a webhook. The attributes are the ones documented for
Create a webhook; the update example
only sends url and state.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/webhooks/0" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "state": "inactive" }'{ "id": 1, "description": { "en": "This is a description" }, "version": "2022-02-01", "state": "inactive", "url": "http://example.com", "events": [ { "id": 3, "name": "order.completed" } ], "created_at": "2022-02-01T00:00:00+00:00", "updated_at": "2022-02-01T00:00:00+00:00"}