Skip to main content
PATCH
/
webhooks
/
{webhookId}
Update a webhook
curl --request PATCH \
  --url https://api.equalsmoney.com/v2/webhooks/{webhookId} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": true,
  "sharedSecret": "123e4567-e89b-12d3-a456-426614174000"
}
'
import requests

url = "https://api.equalsmoney.com/v2/webhooks/{webhookId}"

payload = {
"enabled": True,
"sharedSecret": "123e4567-e89b-12d3-a456-426614174000"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, sharedSecret: '123e4567-e89b-12d3-a456-426614174000'})
};

fetch('https://api.equalsmoney.com/v2/webhooks/{webhookId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.equalsmoney.com/v2/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'sharedSecret' => '123e4567-e89b-12d3-a456-426614174000'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.equalsmoney.com/v2/webhooks/{webhookId}"

payload := strings.NewReader("{\n \"enabled\": true,\n \"sharedSecret\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.equalsmoney.com/v2/webhooks/{webhookId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"sharedSecret\": \"123e4567-e89b-12d3-a456-426614174000\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.equalsmoney.com/v2/webhooks/{webhookId}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"sharedSecret\": \"123e4567-e89b-12d3-a456-426614174000\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "da91434a-4026-42ea-84b8-d0317b64af9c",
  "productId": "3ef24d53-6e22-4103-a16b-d268e4f7346d",
  "webhookEventTypeId": "da91434a-4026-42ea-84b8-d0317b64af9c",
  "webhookEventTypeName": "OrderCreated",
  "accountId": "F50091",
  "url": "https://api.url.com",
  "authorizationHeader": "Basic AXVubzpwQDU1dzByYM== ",
  "enabled": true,
  "sharedSecret": "123e4567-e89b-12d3-a456-426614174000",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

Authorizations

Authorization
string
header
required

Path Parameters

webhookId
string<uuid>
required

The ID of the webhook to work with.

Example:

"da91434a-4026-42ea-84b8-d0317b64af9c"

Query Parameters

accountId
string

The ID of the account to work with.

Example:

"F50091"

Body

application/json

Body

enabled
boolean
required

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

Example:

true

sharedSecret
string | null

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

Maximum string length: 36
Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

200 - application/json

OK

id
string<uuid>
required

The ID of the webhook to work with.

Example:

"da91434a-4026-42ea-84b8-d0317b64af9c"

productId
string<uuid>
required

The ID of the product to work with.

Maximum string length: 36
Example:

"3ef24d53-6e22-4103-a16b-d268e4f7346d"

webhookEventTypeId
string<uuid>
required

The ID of the webhook event type to work with.

Example:

"da91434a-4026-42ea-84b8-d0317b64af9c"

webhookEventTypeName
string
required

The webhook event name.

Maximum string length: 256
Example:

"OrderCreated"

accountId
string | null
required

The ID of the account to work with.

Example:

"F50091"

url
string
required

The URL of the webhook endpoint.

Maximum string length: 512
Example:

"https://api.url.com"

authorizationHeader
string | null
required

The authorization header content for the webhook.

Maximum string length: 512
Example:

"Basic AXVubzpwQDU1dzByYM== "

enabled
boolean
required

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

Example:

true

sharedSecret
string | null
required

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

Maximum string length: 36
Example:

"123e4567-e89b-12d3-a456-426614174000"

createdAt
string<date-time>
required

The date the Resource was initially created. ISO 8601 format without milliseconds.

updatedAt
string<date-time>
required

The date the Resource was last modified. ISO 8601 format without milliseconds.