Delete a webhook
curl --request DELETE \
--url https://app.gomega.ai/api/agents/crm/lead-webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-customer-id: <x-customer-id>'import requests
url = "https://app.gomega.ai/api/agents/crm/lead-webhooks/{id}"
headers = {
"x-customer-id": "<x-customer-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-customer-id': '<x-customer-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.gomega.ai/api/agents/crm/lead-webhooks/{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://app.gomega.ai/api/agents/crm/lead-webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://app.gomega.ai/api/agents/crm/lead-webhooks/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-customer-id"] = '<x-customer-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<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
Delete a webhook
Soft-deletes a webhook. Requires the public_api:webhooks:manage scope.
DELETE
/
api
/
agents
/
crm
/
lead-webhooks
/
{id}
Delete a webhook
curl --request DELETE \
--url https://app.gomega.ai/api/agents/crm/lead-webhooks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'x-customer-id: <x-customer-id>'import requests
url = "https://app.gomega.ai/api/agents/crm/lead-webhooks/{id}"
headers = {
"x-customer-id": "<x-customer-id>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-customer-id': '<x-customer-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.gomega.ai/api/agents/crm/lead-webhooks/{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://app.gomega.ai/api/agents/crm/lead-webhooks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://app.gomega.ai/api/agents/crm/lead-webhooks/{id}")
.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/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-customer-id"] = '<x-customer-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"deleted": true
}{
"error": {
"type": "authentication_error",
"code": 123,
"message": "<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.
Path Parameters
Response
Deleted.