Webhook endpoints
Send a test event
POST
/
v1
/
webhooks
/
{id}
/
test
Send a test event
curl --request POST \
--url https://api-us.larynth.com/v1/webhooks/{id}/test \
--header 'Content-Type: application/json' \
--cookie __Host-lx_session= \
--data '
{
"event_type": "call.ended"
}
'import requests
url = "https://api-us.larynth.com/v1/webhooks/{id}/test"
payload = { "event_type": "call.ended" }
headers = {
"cookie": "__Host-lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '__Host-lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({event_type: 'call.ended'})
};
fetch('https://api-us.larynth.com/v1/webhooks/{id}/test', 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-us.larynth.com/v1/webhooks/{id}/test",
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([
'event_type' => 'call.ended'
]),
CURLOPT_COOKIE => "__Host-lx_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api-us.larynth.com/v1/webhooks/{id}/test"
payload := strings.NewReader("{\n \"event_type\": \"call.ended\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-lx_session=")
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://api-us.larynth.com/v1/webhooks/{id}/test")
.header("cookie", "__Host-lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"event_type\": \"call.ended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/webhooks/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_type\": \"call.ended\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}Authorizations
sessionapiKey
Dashboard session cookie
Path Parameters
Body
application/json
Available options:
call.started, call.answered, call.ended, call.analyzed, call.recording.ready, call.transferred, campaign.started, campaign.paused, campaign.completed, campaign.contact.completed, compliance.opt_out, billing.balance.low, billing.top_up.succeeded, billing.auto_top_up.failed, number.provisioned, number.released, notification.call.summary, notification.campaign.completed, notification.campaign.paused, notification.billing.balance_low, notification.billing.top_up_succeeded, notification.billing.auto_top_up_failed, notification.spending_request.created, notification.number.provisioned, notification.number.released, notification.compliance.optout_alert Response
Accepted
⌘I
Send a test event
curl --request POST \
--url https://api-us.larynth.com/v1/webhooks/{id}/test \
--header 'Content-Type: application/json' \
--cookie __Host-lx_session= \
--data '
{
"event_type": "call.ended"
}
'import requests
url = "https://api-us.larynth.com/v1/webhooks/{id}/test"
payload = { "event_type": "call.ended" }
headers = {
"cookie": "__Host-lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: '__Host-lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({event_type: 'call.ended'})
};
fetch('https://api-us.larynth.com/v1/webhooks/{id}/test', 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-us.larynth.com/v1/webhooks/{id}/test",
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([
'event_type' => 'call.ended'
]),
CURLOPT_COOKIE => "__Host-lx_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://api-us.larynth.com/v1/webhooks/{id}/test"
payload := strings.NewReader("{\n \"event_type\": \"call.ended\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "__Host-lx_session=")
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://api-us.larynth.com/v1/webhooks/{id}/test")
.header("cookie", "__Host-lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"event_type\": \"call.ended\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/webhooks/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = '__Host-lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_type\": \"call.ended\"\n}"
response = http.request(request)
puts response.read_body{
"event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"api_base": "<string>",
"attempts_left": 123,
"campaign_ids": [
"<string>"
],
"checks": [
{
"code": "platform_outbound_open",
"state": "ok",
"fix": {
"kind": "link",
"target": "<string>"
},
"params": {}
}
],
"contact_id": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"optout_line": true,
"reauth_methods": [
"<string>"
],
"request_kind": "number_purchase",
"retry_at": "2023-11-07T05:31:56Z",
"revision": 123,
"updated_by_name": "<string>"
}