Bulk pause webhooks
curl --request POST \
--url https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
"66f1c3b7e4b0a1b2c3d4e5f7",
"66f1c3b7e4b0a1b2c3d4e5fa"
]
'import requests
url = "https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/"
payload = ["66f1c3b7e4b0a1b2c3d4e5f7", "66f1c3b7e4b0a1b2c3d4e5fa"]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(['66f1c3b7e4b0a1b2c3d4e5f7', '66f1c3b7e4b0a1b2c3d4e5fa'])
};
fetch('https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/', 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://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'66f1c3b7e4b0a1b2c3d4e5f7',
'66f1c3b7e4b0a1b2c3d4e5fa'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/"
payload := strings.NewReader("[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.post("https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"total_requested": 123,
"paused_count": 123,
"already_paused_count": 123,
"not_found_count": 123,
"invalid_count": 123,
"paused_webhooks": [
{
"id": "66f1c3b7e4b0a1b2c3d4e5f7",
"agent_id": "66e9b0f2a1c3d4e5f6a7b8c9",
"user_id": "user@example.com",
"webhook_url": "https://scheduler.studio.lyzr.ai/webhook-trigger/66f1c3b7e4b0a1b2c3d4e5f7",
"secret_key": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "New Zendesk ticket",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"last_triggered_at": "2023-11-07T05:31:56Z",
"last_trigger_success": true,
"trigger_count": 0
}
]
}
Agent Webhooks
Bulk Pause Webhooks
Pause up to 100 webhooks at once.
POST
/
agent-webhooks
/
pause-bulk
/
Bulk pause webhooks
curl --request POST \
--url https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
"66f1c3b7e4b0a1b2c3d4e5f7",
"66f1c3b7e4b0a1b2c3d4e5fa"
]
'import requests
url = "https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/"
payload = ["66f1c3b7e4b0a1b2c3d4e5f7", "66f1c3b7e4b0a1b2c3d4e5fa"]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify(['66f1c3b7e4b0a1b2c3d4e5f7', '66f1c3b7e4b0a1b2c3d4e5fa'])
};
fetch('https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/', 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://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'66f1c3b7e4b0a1b2c3d4e5f7',
'66f1c3b7e4b0a1b2c3d4e5fa'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/"
payload := strings.NewReader("[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.post("https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://scheduler.studio.lyzr.ai/agent-webhooks/pause-bulk/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n \"66f1c3b7e4b0a1b2c3d4e5f7\",\n \"66f1c3b7e4b0a1b2c3d4e5fa\"\n]"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"total_requested": 123,
"paused_count": 123,
"already_paused_count": 123,
"not_found_count": 123,
"invalid_count": 123,
"paused_webhooks": [
{
"id": "66f1c3b7e4b0a1b2c3d4e5f7",
"agent_id": "66e9b0f2a1c3d4e5f6a7b8c9",
"user_id": "user@example.com",
"webhook_url": "https://scheduler.studio.lyzr.ai/webhook-trigger/66f1c3b7e4b0a1b2c3d4e5f7",
"secret_key": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "New Zendesk ticket",
"is_active": true,
"updated_at": "2023-11-07T05:31:56Z",
"last_triggered_at": "2023-11-07T05:31:56Z",
"last_trigger_success": true,
"trigger_count": 0
}
]
}
Send a JSON array of webhook IDs. The response reports how many webhooks were paused, how many were already paused, how many IDs were not found, and how many were not valid IDs.
Authorizations
Lyzr API key. Required on every endpoint except Trigger Webhook.
Body
application/json
Maximum array length:
100Example:
[ "66f1c3b7e4b0a1b2c3d4e5f7", "66f1c3b7e4b0a1b2c3d4e5fa" ]
Response
Summary of the bulk pause.
Human-readable summary of the operation.
Number of webhook IDs submitted.
Number of webhooks paused by this request.
Number of webhooks that were already paused and were skipped.
Number of IDs that did not match a webhook.
Number of IDs that were not in a valid ID format.
Full details of the webhooks paused by this request.
Show child attributes
Show child attributes