cURL
curl -X GET \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks \
-H 'Authorization: Bearer {{TOKEN}}' \
-d '{
"url": "https://requestbin.io"
}'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks",
"method": "GET",
"headers": {
"Authorization": "Bearer {{TOKEN}}"
},
"data": "{\n\t\"url\": \"https://requestbin.io\"\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$request = new HttpRequest();
$request->setUrl('https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Bearer {{TOKEN}}'
));
$request->setBody('{
"url": "https://requestbin.io"
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://api.sakari.io/v1/accounts/{accountId}/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sakari.io/v1/accounts/{accountId}/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.sakari.io/v1/accounts/{accountId}/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sakari.io/v1/accounts/{accountId}/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{
"success": true,
"pagination": {
"limit": 123,
"offset": 123,
"hasNext": true
},
"data": [
{
"eventTypes": [],
"destination": "<string>",
"id": "<string>",
"type": "<string>"
}
]
}webhooks
Fetch active webhooks
When messages are acknowledge by carriers, a notification is sent to the specified URL
GET
/
v1
/
accounts
/
{accountId}
/
webhooks
cURL
curl -X GET \
https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks \
-H 'Authorization: Bearer {{TOKEN}}' \
-d '{
"url": "https://requestbin.io"
}'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks",
"method": "GET",
"headers": {
"Authorization": "Bearer {{TOKEN}}"
},
"data": "{\n\t\"url\": \"https://requestbin.io\"\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
<?php
$request = new HttpRequest();
$request->setUrl('https://api.sakari.io/v1/accounts/{{ACCOUNT_ID}}/webhooks');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders(array(
'Authorization' => 'Bearer {{TOKEN}}'
));
$request->setBody('{
"url": "https://requestbin.io"
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://api.sakari.io/v1/accounts/{accountId}/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sakari.io/v1/accounts/{accountId}/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.sakari.io/v1/accounts/{accountId}/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sakari.io/v1/accounts/{accountId}/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{
"success": true,
"pagination": {
"limit": 123,
"offset": 123,
"hasNext": true
},
"data": [
{
"eventTypes": [],
"destination": "<string>",
"id": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Account to apply operations to
⌘I