Update a webhook

Updates the details of a given webhook, based on its webhookId.

SecurityCommonAuth
Request
path Parameters
webhookId
required
string <uuid> (webhookId) <= 36 characters

The ID of the webhook to work with.

Example: da91434a-4026-42ea-84b8-d0317b64af9c
query Parameters
accountId
string (accountId)

The account ID to filter the response with (required for user-level API key).

Example: accountId=F50091
Request Body schema: application/json
sharedSecret
string or null <= 36 characters

When provided, this is used to sign the webhook payload and generate the x-em-signature header.

enabled
required
boolean

Webhook event type availability (whether the webhook is enabled or not).

Responses
200

OK

400

Bad request

401

Unauthorised

403

Forbidden

404

Not found

405

Method not allowed

415

Unsupported media type

429

Too many requests

500

Internal server error

patch/webhooks/{webhookId}
Request samples
application/json
{
  • "sharedSecret": "123e4567-e89b-12d3-a456-426614174000",
  • "enabled": true
}
Response samples
application/json
{
  • "id": "da91434a-4026-42ea-84b8-d0317b64af9c",
  • "productId": "911db6db-ef58-4992-87cd-2fe2cfde05f9",
  • "webhookEventTypeId": "da91434a-4026-42ea-84b8-d0317b64af9c",
  • "accountId": "C12345",
  • "authorizationHeader": "Basic AXVubzpwQDU1dzByYM==",
  • "webhookEventTypeName": "OrderCreated",
  • "enabled": true,
  • "sharedSecret": "123e4567-e89b-12d3-a456-426614174000",
  • "createdAt": "2021-01-30T08:30:00Z",
  • "updatedAt": "2021-01-30T08:30:00Z"
}