Send a test event
curl --request POST \
--url https://us.api.hellotars.com/api/v1/webhooks/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://us.api.hellotars.com/api/v1/webhooks/{id}/test"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://us.api.hellotars.com/api/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://us.api.hellotars.com/api/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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://us.api.hellotars.com/api/v1/webhooks/{id}/test"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://us.api.hellotars.com/api/v1/webhooks/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.hellotars.com/api/v1/webhooks/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"ok": true,
"status": 123,
"latencyMs": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}Webhooks
Send a webhook test
Send one subscribed sample event and return its HTTP outcome and latency.
POST
/
api
/
v1
/
webhooks
/
{id}
/
test
Send a test event
curl --request POST \
--url https://us.api.hellotars.com/api/v1/webhooks/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://us.api.hellotars.com/api/v1/webhooks/{id}/test"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://us.api.hellotars.com/api/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://us.api.hellotars.com/api/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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://us.api.hellotars.com/api/v1/webhooks/{id}/test"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://us.api.hellotars.com/api/v1/webhooks/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://us.api.hellotars.com/api/v1/webhooks/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"ok": true,
"status": 123,
"latencyMs": 123
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"code": "invalid_json",
"retryable": true,
"errors": [
{
"path": "<string>",
"code": "<string>",
"message": "<string>"
}
],
"required": "<string>",
"region": "<string>",
"field": "email",
"contactId": "<string>",
"callId": "<string>",
"reason": "<string>"
}Choose a subscribed type or omit it to use the first subscribed type in catalogue order.
The delivered envelope has type webhook.test and data containing sampleType and sample. Tests are limited to five per minute per destination.
A delivery failure is an outcome with ok: false, rather than a problem response. Paused destinations return destination_paused.
Related pages
Authorizations
An API key (tars_sk_…) sent as Authorization: Bearer <key>. Each operation names the permission it needs. Create keys in Settings → Integrations → API keys.
Path Parameters
The id.
Required string length:
1 - 128Body
application/json
The event to send a sample of.
One of the destination's events. Defaults to its first event.
Available options:
conversation.started, conversation.ended, conversation.analyzed, call.transcript_updated, call.transfer_ringing, call.transfer_connected, call.transfer_bridged, call.transfer_failed, call.transfer_cancelled, call.guardrail_triggered, call.sms_sent, call.continued_in_chat, handoff.requested, handoff.accepted, handoff.unmet, handoff.completed, campaign.message_sent, campaign.message_delivered, campaign.message_read, campaign.message_replied, campaign.message_failed, campaign.completed, contact.created, contact.updated ⌘I
