Update webhooks

Update an existing webhook's status, URL, shared secret, or authorisation header.

Update a webhook

Patchv2/webhooks/{webhookId}?accountId={accountId}

Request

Use this request to update an existing webhook. Set the enabled field to true to make it available or false to make it unavailable.

If you have a user-level API key, you need to specify an accountId to use this request. If you have a product-level API key, you can choose to update this across all accounts by omitting the accountId query parameter.

Sample requestRequest structure
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/webhooks/d7d34e0f-c6e9-4cea-8c25-baaffa81714f?accountId=F12345' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "authorizationHeader": "Basic BXVubzpwQDU1dzByYM==",
  }'
Copy
Copied
curl -i -X PATCH \
  'https://api.equalsmoney.com/v2/webhooks/{webhookId}?accountId={accountId}' \
  -H 'Authorization: ApiKey YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "enabled": true,
    "authorizationHeader": "string",
  }'

Path parameters

Parameter Description
webhookId
string
required
The ID of the webhook that you want to update.

Allowable values:
An existing webhookId (<= 36 characters)

Query parameters

Parameter Description
accountId
string
The account ID to filter the response with. This is required if you have a user-level API key.

Allowable values:
An existing accountId (<= 36 characters)

Request body schema

Parameter Description
sharedSecret
string (uuid)
When provided, we use this to generate a hash-based message authentication code (HMAC) using the SHA-256 algorithm. We Base64 encode this signature. Every event notification you receive for this webhook will include an x-em-signature header, if a shared secret has been provided. You can use this to verify the integrity and authenticity of the message.

Allowable values:
<= 36 characters
enabled
boolean
required
Whether or not the webhook should be enabled.

Allowable values:
true, false
url
string
required
The URL of your webhook endpoint.

Allowable values:
<= 512 characters
authorizationHeader
string or null
The authorisation header content for the webhook.

Allowable values:
<= 512 characters

Response

If your request is successful, you'll receive a 200 response.

Sample responseResponse structure
Copy
Copied
{
  "sharedSecret": "123e4567-e89b-12d3-a456-426614174000",
  "enabled": true,
  "accountId": "F12345",
  "webhookEventTypeId": "da91434a-4026-42ea-84b8-d0317b64af9c",
  "url": "https://api.exampleurl.com",
  "authorizationHeader": "Basic AXVubzpwQDU1dzByYM==",
  "id": "d7d34e0f-c6e9-4cea-8c25-baaffa81714f",
  "productId": "911db6db-ef58-4992-87cd-2fe2cfde05f9",
  "webhookEventTypeName": "OrderCreated",
  "createdAt": "2023-01-30T08:30:00Z",
  "updatedAt": "2023-01-30T08:30:00Z"
}
Copy
Copied
{
  "sharedSecret": "string",
  "enabled": boolean,
  "accountId": "string",
  "webhookEventTypeId": "string",
  "url": "string",
  "authorizationHeader": "string",
  "id": "string",
  "productId": "string",
  "webhookEventTypeName": "string",
  "createdAt": "string",
  "updatedAt": "string"
}

For more detailed information about this request and its response, see the API reference.