Update a webhook subscription.
curl --request PATCH \
--url https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "My webhooks",
"endpoint": "https://example.org/webhooks"
}
'import requests
url = "https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}"
payload = {
"description": "My webhooks",
"endpoint": "https://example.org/webhooks"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'My webhooks', endpoint: 'https://example.org/webhooks'})
};
fetch('https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}', 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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}",
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([
'description' => 'My webhooks',
'endpoint' => 'https://example.org/webhooks'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}"
payload := strings.NewReader("{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"description": "My webhooks",
"endpoint": "https://example.org/webhooks",
"id": "f89eccda-f284-4e30-984f-2f6620238cd2",
"status": "enabled",
"version": "1"
}
}{
"error": {
"reason": "Unauthorized",
"status": 401,
"message": "invalid params"
}
}{
"error": {
"reason": "Not Found",
"status": 404,
"message": "invalid params"
}
}{
"error": {
"reason": "Bad Request",
"status": 400,
"message": "invalid params"
}
}Subscriptions
Update Subscription
Update a webhook subscription with specific ID.
PATCH
/
notifications
/
v1
/
subscriptions
/
{id}
Update a webhook subscription.
curl --request PATCH \
--url https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "My webhooks",
"endpoint": "https://example.org/webhooks"
}
'import requests
url = "https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}"
payload = {
"description": "My webhooks",
"endpoint": "https://example.org/webhooks"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({description: 'My webhooks', endpoint: 'https://example.org/webhooks'})
};
fetch('https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}', 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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}",
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([
'description' => 'My webhooks',
'endpoint' => 'https://example.org/webhooks'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}"
payload := strings.NewReader("{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.sandbox.lemmax.com/notifications/v1/subscriptions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"My webhooks\",\n \"endpoint\": \"https://example.org/webhooks\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"description": "My webhooks",
"endpoint": "https://example.org/webhooks",
"id": "f89eccda-f284-4e30-984f-2f6620238cd2",
"status": "enabled",
"version": "1"
}
}{
"error": {
"reason": "Unauthorized",
"status": 401,
"message": "invalid params"
}
}{
"error": {
"reason": "Not Found",
"status": 404,
"message": "invalid params"
}
}{
"error": {
"reason": "Bad Request",
"status": 400,
"message": "invalid params"
}
}Authorizations
access_token returned by the /auth/v1/oauth2/tokens API call.
Path Parameters
ID of the webhook subscription.
Required string length:
36Pattern:
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Body
application/json
Subscription attributes.
Update a webhook subscription.
New description for the webhook subscription.
Maximum string length:
200Example:
"My webhooks"
New endpoint for the webhook subscription.
Maximum string length:
2500Example:
"https://example.org/webhooks"
New version for the webhook subscription.
Maximum string length:
20Pattern:
^[a-zA-Z0-9]*$Example:
"1"
Response
Update subscriptions response.
Update webhook subscription response.
Show child attributes
Show child attributes
⌘I