List webhooks
curl --request GET \
--url https://app.gomega.ai/api/agents/crm/lead-webhooks \
--header 'Authorization: Bearer <token>' \
--header 'x-customer-id: <x-customer-id>'import requests
url = "https://app.gomega.ai/api/agents/crm/lead-webhooks"
headers = {
"x-customer-id": "<x-customer-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-customer-id': '<x-customer-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.gomega.ai/api/agents/crm/lead-webhooks', 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://app.gomega.ai/api/agents/crm/lead-webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-customer-id: <x-customer-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gomega.ai/api/agents/crm/lead-webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-customer-id", "<x-customer-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gomega.ai/api/agents/crm/lead-webhooks")
.header("x-customer-id", "<x-customer-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomega.ai/api/agents/crm/lead-webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-customer-id"] = '<x-customer-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": "<string>",
"url": "<string>",
"event_types": [
"<string>"
],
"is_active": true,
"timeout_seconds": 123,
"retry_attempts": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}Webhooks
List webhooks
Lists the caller’s registered lead webhooks. Signing secrets are never returned. Requires the public_api:webhooks:manage scope.
GET
/
api
/
agents
/
crm
/
lead-webhooks
List webhooks
curl --request GET \
--url https://app.gomega.ai/api/agents/crm/lead-webhooks \
--header 'Authorization: Bearer <token>' \
--header 'x-customer-id: <x-customer-id>'import requests
url = "https://app.gomega.ai/api/agents/crm/lead-webhooks"
headers = {
"x-customer-id": "<x-customer-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-customer-id': '<x-customer-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.gomega.ai/api/agents/crm/lead-webhooks', 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://app.gomega.ai/api/agents/crm/lead-webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-customer-id: <x-customer-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.gomega.ai/api/agents/crm/lead-webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-customer-id", "<x-customer-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.gomega.ai/api/agents/crm/lead-webhooks")
.header("x-customer-id", "<x-customer-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.gomega.ai/api/agents/crm/lead-webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-customer-id"] = '<x-customer-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": "<string>",
"url": "<string>",
"event_types": [
"<string>"
],
"is_active": true,
"timeout_seconds": 123,
"retry_attempts": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "<string>"
}
]
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<string>"
}
}Authorizations
Admin-issued Personal Access Token, e.g. Authorization: Bearer mega_<64 hex>. The key carries scopes (public_api:leads:read, public_api:leads:write, public_api:webhooks:manage) and is locked to one customer.
Headers
The customer this request acts on. Must match the customer your key is locked to.
Response
The caller's webhooks.
Show child attributes
Show child attributes