List webhooks
curl --request GET \
--url https://api.sendo.dev/v1/campaign/{id}/webhooks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/{id}/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendo.dev/v1/campaign/{id}/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://api.sendo.dev/v1/campaign/{id}/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>"
],
]);
$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://api.sendo.dev/v1/campaign/{id}/webhooks"
req, _ := http.NewRequest("GET", url, nil)
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://api.sendo.dev/v1/campaign/{id}/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/{id}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
"createdAt": "2023-12-31T03:07:35.826Z",
"name": "Event Service",
"url": "https://website.com/webhook",
"campaignId": "g1tkV7Eq",
"signature": "aVWS7HTLR9xxMkdE",
"eventTypes": [
"message.incoming",
"message.status"
],
"numbers": [
"+14159436397"
]
},
{
"id": "c29b55aa-a622-4f99-91ba-1dc5834734eb",
"createdAt": "2023-12-15T03:07:35.826Z",
"name": "Revocation Service",
"url": "https://website.com/revocations",
"campaignId": "g1tkV7Eq",
"signature": "7ujOMdfiow43feAS",
"eventTypes": [
"recipient.optout"
],
"numbers": [
"+14159436397"
]
}
]
}
{
"error": "Webhook not found"
}
Campaign
List webhooks
List webhooks for a campaign.
GET
/
v1
/
campaign
/
{id}
/
webhooks
List webhooks
curl --request GET \
--url https://api.sendo.dev/v1/campaign/{id}/webhooks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sendo.dev/v1/campaign/{id}/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendo.dev/v1/campaign/{id}/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://api.sendo.dev/v1/campaign/{id}/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>"
],
]);
$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://api.sendo.dev/v1/campaign/{id}/webhooks"
req, _ := http.NewRequest("GET", url, nil)
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://api.sendo.dev/v1/campaign/{id}/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sendo.dev/v1/campaign/{id}/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
"createdAt": "2023-12-31T03:07:35.826Z",
"name": "Event Service",
"url": "https://website.com/webhook",
"campaignId": "g1tkV7Eq",
"signature": "aVWS7HTLR9xxMkdE",
"eventTypes": [
"message.incoming",
"message.status"
],
"numbers": [
"+14159436397"
]
},
{
"id": "c29b55aa-a622-4f99-91ba-1dc5834734eb",
"createdAt": "2023-12-15T03:07:35.826Z",
"name": "Revocation Service",
"url": "https://website.com/revocations",
"campaignId": "g1tkV7Eq",
"signature": "7ujOMdfiow43feAS",
"eventTypes": [
"recipient.optout"
],
"numbers": [
"+14159436397"
]
}
]
}
{
"error": "Webhook not found"
}
Parameters
string
required
The ID of the campaign to list webhooks for.
Response
object[]
List of webhooks for the campaign.
Show webhook fields
Show webhook fields
string
The ID of the webhook.
timestamp
The time the webhook was created
string
The name of the webhook (optional).
string
The URL of the webhook.
string
The campaign ID for the webhook.
string
The signature sent with events. (read more)
string
The events the webhook will receive. (read more)
string[]
The phone numbers the webhook is subscribed to.
{
"webhooks": [
{
"id": "d3392dbf-ae4b-43b9-9b50-dcafa5c7h4mn",
"createdAt": "2023-12-31T03:07:35.826Z",
"name": "Event Service",
"url": "https://website.com/webhook",
"campaignId": "g1tkV7Eq",
"signature": "aVWS7HTLR9xxMkdE",
"eventTypes": [
"message.incoming",
"message.status"
],
"numbers": [
"+14159436397"
]
},
{
"id": "c29b55aa-a622-4f99-91ba-1dc5834734eb",
"createdAt": "2023-12-15T03:07:35.826Z",
"name": "Revocation Service",
"url": "https://website.com/revocations",
"campaignId": "g1tkV7Eq",
"signature": "7ujOMdfiow43feAS",
"eventTypes": [
"recipient.optout"
],
"numbers": [
"+14159436397"
]
}
]
}
{
"error": "Webhook not found"
}
⌘I

