curl --request PATCH \
--url https://lazyapp.in/v1/webhooks/{webhook} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"subscribed_events": [],
"custom_headers": {},
"phone_number_restrictions": [
"<string>"
],
"timeout_seconds": 15,
"max_attempts": 4
}
'import requests
url = "https://lazyapp.in/v1/webhooks/{webhook}"
payload = {
"url": "<string>",
"description": "<string>",
"subscribed_events": [],
"custom_headers": {},
"phone_number_restrictions": ["<string>"],
"timeout_seconds": 15,
"max_attempts": 4
}
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({
url: '<string>',
description: '<string>',
subscribed_events: [],
custom_headers: {},
phone_number_restrictions: ['<string>'],
timeout_seconds: 15,
max_attempts: 4
})
};
fetch('https://lazyapp.in/v1/webhooks/{webhook}', 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://lazyapp.in/v1/webhooks/{webhook}",
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([
'url' => '<string>',
'description' => '<string>',
'subscribed_events' => [
],
'custom_headers' => [
],
'phone_number_restrictions' => [
'<string>'
],
'timeout_seconds' => 15,
'max_attempts' => 4
]),
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://lazyapp.in/v1/webhooks/{webhook}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\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://lazyapp.in/v1/webhooks/{webhook}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/webhooks/{webhook}")
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 \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"url": "<string>",
"description": "<string>",
"is_active": true,
"subscribed_events": [
"message.received"
],
"custom_headers": {},
"phone_number_restrictions": [
"<string>"
],
"timeout_seconds": 123,
"max_attempts": 123,
"api_version": "<string>",
"consecutive_failures": 123,
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Update a webhook endpoint
Change the URL, events, headers, number restrictions or retry policy in place. Only the fields you send change. The signing secret and any queued retries are kept, which deleting and registering the endpoint again would lose.
Required scope: webhooks:write
curl --request PATCH \
--url https://lazyapp.in/v1/webhooks/{webhook} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"description": "<string>",
"subscribed_events": [],
"custom_headers": {},
"phone_number_restrictions": [
"<string>"
],
"timeout_seconds": 15,
"max_attempts": 4
}
'import requests
url = "https://lazyapp.in/v1/webhooks/{webhook}"
payload = {
"url": "<string>",
"description": "<string>",
"subscribed_events": [],
"custom_headers": {},
"phone_number_restrictions": ["<string>"],
"timeout_seconds": 15,
"max_attempts": 4
}
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({
url: '<string>',
description: '<string>',
subscribed_events: [],
custom_headers: {},
phone_number_restrictions: ['<string>'],
timeout_seconds: 15,
max_attempts: 4
})
};
fetch('https://lazyapp.in/v1/webhooks/{webhook}', 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://lazyapp.in/v1/webhooks/{webhook}",
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([
'url' => '<string>',
'description' => '<string>',
'subscribed_events' => [
],
'custom_headers' => [
],
'phone_number_restrictions' => [
'<string>'
],
'timeout_seconds' => 15,
'max_attempts' => 4
]),
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://lazyapp.in/v1/webhooks/{webhook}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\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://lazyapp.in/v1/webhooks/{webhook}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lazyapp.in/v1/webhooks/{webhook}")
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 \"url\": \"<string>\",\n \"description\": \"<string>\",\n \"subscribed_events\": [],\n \"custom_headers\": {},\n \"phone_number_restrictions\": [\n \"<string>\"\n ],\n \"timeout_seconds\": 15,\n \"max_attempts\": 4\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"url": "<string>",
"description": "<string>",
"is_active": true,
"subscribed_events": [
"message.received"
],
"custom_headers": {},
"phone_number_restrictions": [
"<string>"
],
"timeout_seconds": 123,
"max_attempts": 123,
"api_version": "<string>",
"consecutive_failures": 123,
"paused_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"pause_reason": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>"
}Authorizations
Your API key, e.g. sk_live_... or sk_test_....
Headers
Optional. Makes this write safe to retry: the same key replays the first response instead of acting twice.
255Path Parameters
Endpoint id.
Body
Must be https.
2048255Replaces the list. null or [] subscribes to every event.
message.received, message.queued, message.sent, message.delivered, message.read, message.played, message.failed, message.deleted, message.edited, message.echo, reaction.received, conversation.started, commerce.order, payment.captured, payment.failed, payment.refunded, payment.order_status_updated, template.pending, template.approved, template.rejected, template.paused, template.disabled, template.category_changed, template.quality_changed, template.updated, template.deleted, marketing.link_clicked, otp.requested, otp.verified, otp.failed, contact.updated, contact.opted_in, contact.opted_out, phone_number.updated, phone_number.quality_changed, connection.connected, connection.attention_required, connection.disconnected, account.updated, flow.published, flow.failed, flow.response_received, flow.status_changed, workflow.started, workflow.completed, workflow.failed, campaign.started, campaign.completed, campaign.failed, call.received, call.ended, call.failed, call.permission_request, call.recording_available, call.transcript_available, conversion.detected, customer.created, customer.updated, customer.suspended, customer.archived, customer.deleted, customer.connected, customer.usage_alert, setup_link.failed, address.received, contact.identity_changed, group.created, group.updated, group.deleted, group.participants_changed, group.join_requested, group.suspended Show child attributes
Show child attributes
Replaces the list. null delivers events from every number.
50641 <= x <= 30Delivery attempts before an event is given up. Defaults to 3.
1 <= x <= 8Response
The updated endpoint. The secret is not included.
Empty means every event.
message.received, message.queued, message.sent, message.delivered, message.read, message.played, message.failed, message.deleted, message.edited, message.echo, reaction.received, conversation.started, commerce.order, payment.captured, payment.failed, payment.refunded, payment.order_status_updated, template.pending, template.approved, template.rejected, template.paused, template.disabled, template.category_changed, template.quality_changed, template.updated, template.deleted, marketing.link_clicked, otp.requested, otp.verified, otp.failed, contact.updated, contact.opted_in, contact.opted_out, phone_number.updated, phone_number.quality_changed, connection.connected, connection.attention_required, connection.disconnected, account.updated, flow.published, flow.failed, flow.response_received, flow.status_changed, workflow.started, workflow.completed, workflow.failed, campaign.started, campaign.completed, campaign.failed, call.received, call.ended, call.failed, call.permission_request, call.recording_available, call.transcript_available, conversion.detected, customer.created, customer.updated, customer.suspended, customer.archived, customer.deleted, customer.connected, customer.usage_alert, setup_link.failed, address.received, contact.identity_changed, group.created, group.updated, group.deleted, group.participants_changed, group.join_requested, group.suspended Set when repeated failures auto-paused the endpoint.
Why deliveries stopped. Set when LazyApp auto-paused the endpoint after repeated failures.