API Docs

voice

AdminUpdated Sep 19, 2026
GEThttps://api.chatlychat.com/v1/voice/calls
List recent voice calls in the workspace
Parameters
NameInTypeRequiredDescription
cursorquerystringyes
limitquerystringyes
statusquerystringyes
directionquerystringyes
sincequerystringyes
searchquerystringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search=')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls?cursor=&limit=&status=&direction=&since=&search="))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/numbers
List provisioned phone numbers with webhook health and channel binding
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/numbers" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/numbers', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/numbers",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/numbers", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/numbers');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/numbers')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/numbers"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/numbers/available
Search a carrier for available phone numbers
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/numbers/available" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/numbers/available', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/numbers/available",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/numbers/available", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/numbers/available');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/numbers/available')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/numbers/available"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/numbers/purchase
Purchase a phone number and auto-configure its webhooks
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "provider": "twilio",
  "e164": "string",
  "channelId": "string"
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/numbers/purchase" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"provider":"twilio","e164":"string","channelId":"string"}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/numbers/purchase', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"provider":"twilio","e164":"string","channelId":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/numbers/purchase",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"provider": "twilio", "e164": "string", "channelId": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/numbers/purchase", strings.NewReader(`{"provider":"twilio","e164":"string","channelId":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/numbers/purchase');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"provider":"twilio","e164":"string","channelId":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/numbers/purchase')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"provider":"twilio","e164":"string","channelId":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/numbers/purchase"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"provider\":\"twilio\",\"e164\":\"string\",\"channelId\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks
Re-point a number’s carrier webhooks at this deployment
Parameters
NameInTypeRequiredDescription
e164pathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/numbers/{e164}/repair-webhooks"))
    .header("Idempotency-Key", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
DELETEhttps://api.chatlychat.com/v1/voice/numbers/{e164}
Release a phone number back to the carrier
Parameters
NameInTypeRequiredDescription
e164pathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "confirmE164": "string"
}
Responses
200
Code samples
cURL
curl -X DELETE "https://api.chatlychat.com/v1/voice/numbers/{e164}" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"confirmE164":"string"}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/numbers/{e164}', {
  method: 'DELETE',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"confirmE164":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://api.chatlychat.com/v1/voice/numbers/{e164}",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"confirmE164": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.chatlychat.com/v1/voice/numbers/{e164}", strings.NewReader(`{"confirmE164":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/numbers/{e164}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"confirmE164":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/numbers/{e164}')
req = Net::HTTP::Delete.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"confirmE164":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/numbers/{e164}"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("DELETE", BodyPublishers.ofString("{\"confirmE164\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/kpis
Aggregate voice KPIs over the window
Parameters
NameInTypeRequiredDescription
daysquerystringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/kpis?days=" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/kpis?days=', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/kpis?days=",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/kpis?days=", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/kpis?days=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/kpis?days=')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/kpis?days="))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/calls/{id}
Call detail: timeline, DTMF, agents, transcript, disposition
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/calls/{id}" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/calls/{id}",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/calls/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/calls/{id}/disposition
Set or correct the post-call disposition
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "disposition": "resolved",
  "note": "string",
  "tags": [
    "string"
  ]
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/calls/{id}/disposition" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"disposition":"resolved","note":"string","tags":["string"]}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}/disposition', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"disposition":"resolved","note":"string","tags":["string"]}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/calls/{id}/disposition",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"disposition": "resolved", "note": "string", "tags": ["string"]},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/calls/{id}/disposition", strings.NewReader(`{"disposition":"resolved","note":"string","tags":["string"]}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}/disposition');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"disposition":"resolved","note":"string","tags":["string"]}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}/disposition')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"disposition":"resolved","note":"string","tags":["string"]}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}/disposition"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"disposition\":\"resolved\",\"note\":\"string\",\"tags\":[\"string\"]}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/calls/{id}/recording-url
Get a short-lived URL for a call recording
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/calls/{id}/recording-url" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}/recording-url', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/calls/{id}/recording-url",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/calls/{id}/recording-url", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}/recording-url');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}/recording-url')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}/recording-url"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/calls/outbound
Place an outbound PSTN call from a BYOK voice channel and return a room-scoped LiveKit token for the agent
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "toE164": "string",
  "channelId": "string",
  "conversationId": "string",
  "contactId": "string"
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/calls/outbound" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"toE164":"string","channelId":"string","conversationId":"string","contactId":"string"}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/outbound', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"toE164":"string","channelId":"string","conversationId":"string","contactId":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/calls/outbound",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"toE164": "string", "channelId": "string", "conversationId": "string", "contactId": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/calls/outbound", strings.NewReader(`{"toE164":"string","channelId":"string","conversationId":"string","contactId":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/outbound');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"toE164":"string","channelId":"string","conversationId":"string","contactId":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/outbound')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"toE164":"string","channelId":"string","conversationId":"string","contactId":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/outbound"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"toE164\":\"string\",\"channelId\":\"string\",\"conversationId\":\"string\",\"contactId\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/calls/{id}/transfer
Transfer a live call to a teammate — warm (confer first) or cold (drop immediately). Publishes voice.transfer_requested, which is an INVITE: it fires even for a transfer the teammate declines or lets expire. The completion event workflows should key on is voice.transferred, published by calls/:id/transfer/complete.
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "toUserId": "string",
  "mode": "warm"
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/calls/{id}/transfer" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"toUserId":"string","mode":"warm"}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}/transfer', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"toUserId":"string","mode":"warm"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/calls/{id}/transfer",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"toUserId": "string", "mode": "warm"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/calls/{id}/transfer", strings.NewReader(`{"toUserId":"string","mode":"warm"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}/transfer');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"toUserId":"string","mode":"warm"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}/transfer')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"toUserId":"string","mode":"warm"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}/transfer"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"toUserId\":\"string\",\"mode\":\"warm\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete
Finish a warm transfer — the initiating agent has conferred and is now dropping. Publishes voice.transferred, the event the "Call transferred" workflow trigger listens for. A no-op (and silent) when no transfer is pending.
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}/transfer/complete"))
    .header("Idempotency-Key", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/calls/{id}/end
Hang up a live call — marks the row, tears down the LiveKit room, ends the PSTN leg
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/calls/{id}/end" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/calls/{id}/end', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/calls/{id}/end",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/calls/{id}/end", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/calls/{id}/end');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/calls/{id}/end')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/calls/{id}/end"))
    .header("Idempotency-Key", "<value>")
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/queue
Callers currently waiting in the call queue
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/queue" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/queue', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/queue",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/queue", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/queue');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/queue')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/queue"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/queue/stats
Queue volume, abandon rate and wait times over a window
Parameters
NameInTypeRequiredDescription
daysquerystringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/queue/stats?days=" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/queue/stats?days=', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/queue/stats?days=",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/queue/stats?days=", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/queue/stats?days=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/queue/stats?days=')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/queue/stats?days="))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config
Queue / after-hours / voicemail / targeted-ring config for a voice channel
Parameters
NameInTypeRequiredDescription
channelIdpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
PATCHhttps://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config
Update a voice channel’s queue / after-hours / voicemail / ring behaviour
Parameters
NameInTypeRequiredDescription
channelIdpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "queue": {
    "enabled": true,
    "holdMusicUrl": null,
    "maxDepth": 25,
    "maxWaitSec": 600,
    "announceEverySec": 30,
    "onOverflow": "voicemail",
    "overflowForwardE164": null,
    "averageHandleTimeSec": 180
  },
  "afterHours": {
    "enabled": false,
    "action": "voicemail",
    "greetingText": "",
    "greetingAudioUrl": null,
    "forwardE164": null,
    "ivrMenuId": null
  },
  "voicemail": {
    "enabled": true,
    "greetingText": "Please leave a message after the tone. Press pound when finished.",
    "greetingAudioUrl": null,
    "maxLengthSec": 120
  },
  "ring": {
    "timeoutSec": 25,
    "onNoAnswer": "next_available"
  },
  "routing": {
    "teamId": null
  }
}
Responses
200
Code samples
cURL
curl -X PATCH "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"queue":{"enabled":true,"holdMusicUrl":null,"maxDepth":25,"maxWaitSec":600,"announceEverySec":30,"onOverflow":"voicemail","overflowForwardE164":null,"averageHandleTimeSec":180},"afterHours":{"enabled":false,"action":"voicemail","greetingText":"","greetingAudioUrl":null,"forwardE164":null,"ivrMenuId":null},"voicemail":{"enabled":true,"greetingText":"Please leave a message after the tone. Press pound when finished.","greetingAudioUrl":null,"maxLengthSec":120},"ring":{"timeoutSec":25,"onNoAnswer":"next_available"},"routing":{"teamId":null}}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config', {
  method: 'PATCH',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"queue":{"enabled":true,"holdMusicUrl":null,"maxDepth":25,"maxWaitSec":600,"announceEverySec":30,"onOverflow":"voicemail","overflowForwardE164":null,"averageHandleTimeSec":180},"afterHours":{"enabled":false,"action":"voicemail","greetingText":"","greetingAudioUrl":null,"forwardE164":null,"ivrMenuId":null},"voicemail":{"enabled":true,"greetingText":"Please leave a message after the tone. Press pound when finished.","greetingAudioUrl":null,"maxLengthSec":120},"ring":{"timeoutSec":25,"onNoAnswer":"next_available"},"routing":{"teamId":null}}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PATCH",
    "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"queue": {"enabled": True, "holdMusicUrl": None, "maxDepth": 25, "maxWaitSec": 600, "announceEverySec": 30, "onOverflow": "voicemail", "overflowForwardE164": None, "averageHandleTimeSec": 180}, "afterHours": {"enabled": False, "action": "voicemail", "greetingText": "", "greetingAudioUrl": None, "forwardE164": None, "ivrMenuId": None}, "voicemail": {"enabled": True, "greetingText": "Please leave a message after the tone. Press pound when finished.", "greetingAudioUrl": None, "maxLengthSec": 120}, "ring": {"timeoutSec": 25, "onNoAnswer": "next_available"}, "routing": {"teamId": None}},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PATCH", "https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config", strings.NewReader(`{"queue":{"enabled":true,"holdMusicUrl":null,"maxDepth":25,"maxWaitSec":600,"announceEverySec":30,"onOverflow":"voicemail","overflowForwardE164":null,"averageHandleTimeSec":180},"afterHours":{"enabled":false,"action":"voicemail","greetingText":"","greetingAudioUrl":null,"forwardE164":null,"ivrMenuId":null},"voicemail":{"enabled":true,"greetingText":"Please leave a message after the tone. Press pound when finished.","greetingAudioUrl":null,"maxLengthSec":120},"ring":{"timeoutSec":25,"onNoAnswer":"next_available"},"routing":{"teamId":null}}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"queue":{"enabled":true,"holdMusicUrl":null,"maxDepth":25,"maxWaitSec":600,"announceEverySec":30,"onOverflow":"voicemail","overflowForwardE164":null,"averageHandleTimeSec":180},"afterHours":{"enabled":false,"action":"voicemail","greetingText":"","greetingAudioUrl":null,"forwardE164":null,"ivrMenuId":null},"voicemail":{"enabled":true,"greetingText":"Please leave a message after the tone. Press pound when finished.","greetingAudioUrl":null,"maxLengthSec":120},"ring":{"timeoutSec":25,"onNoAnswer":"next_available"},"routing":{"teamId":null}}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config')
req = Net::HTTP::Patch.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"queue":{"enabled":true,"holdMusicUrl":null,"maxDepth":25,"maxWaitSec":600,"announceEverySec":30,"onOverflow":"voicemail","overflowForwardE164":null,"averageHandleTimeSec":180},"afterHours":{"enabled":false,"action":"voicemail","greetingText":"","greetingAudioUrl":null,"forwardE164":null,"ivrMenuId":null},"voicemail":{"enabled":true,"greetingText":"Please leave a message after the tone. Press pound when finished.","greetingAudioUrl":null,"maxLengthSec":120},"ring":{"timeoutSec":25,"onNoAnswer":"next_available"},"routing":{"teamId":null}}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/channels/{channelId}/flow-config"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"queue\":{\"enabled\":true,\"holdMusicUrl\":null,\"maxDepth\":25,\"maxWaitSec\":600,\"announceEverySec\":30,\"onOverflow\":\"voicemail\",\"overflowForwardE164\":null,\"averageHandleTimeSec\":180},\"afterHours\":{\"enabled\":false,\"action\":\"voicemail\",\"greetingText\":\"\",\"greetingAudioUrl\":null,\"forwardE164\":null,\"ivrMenuId\":null},\"voicemail\":{\"enabled\":true,\"greetingText\":\"Please leave a message after the tone. Press pound when finished.\",\"greetingAudioUrl\":null,\"maxLengthSec\":120},\"ring\":{\"timeoutSec\":25,\"onNoAnswer\":\"next_available\"},\"routing\":{\"teamId\":null}}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/ivr-menus
List IVR menus, optionally scoped to one voice channel
Parameters
NameInTypeRequiredDescription
channelIdquerystringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/ivr-menus?channelId=" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/ivr-menus?channelId=', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/ivr-menus?channelId=",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/ivr-menus?channelId=", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/ivr-menus?channelId=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/ivr-menus?channelId=')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/ivr-menus?channelId="))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/ivr-menus
Create an IVR menu
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "channelId": "string",
  "name": "string",
  "greetingText": "",
  "greetingAudioUrl": null,
  "timeoutSec": 5,
  "maxRetries": 2,
  "options": [],
  "noInputAction": {
    "kind": "hangup"
  },
  "invalidAction": {
    "kind": "hangup"
  },
  "isRoot": false
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/ivr-menus" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"channelId":"string","name":"string","greetingText":"","greetingAudioUrl":null,"timeoutSec":5,"maxRetries":2,"options":[],"noInputAction":{"kind":"hangup"},"invalidAction":{"kind":"hangup"},"isRoot":false}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/ivr-menus', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"channelId":"string","name":"string","greetingText":"","greetingAudioUrl":null,"timeoutSec":5,"maxRetries":2,"options":[],"noInputAction":{"kind":"hangup"},"invalidAction":{"kind":"hangup"},"isRoot":false}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/ivr-menus",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"channelId": "string", "name": "string", "greetingText": "", "greetingAudioUrl": None, "timeoutSec": 5, "maxRetries": 2, "options": [], "noInputAction": {"kind": "hangup"}, "invalidAction": {"kind": "hangup"}, "isRoot": False},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/ivr-menus", strings.NewReader(`{"channelId":"string","name":"string","greetingText":"","greetingAudioUrl":null,"timeoutSec":5,"maxRetries":2,"options":[],"noInputAction":{"kind":"hangup"},"invalidAction":{"kind":"hangup"},"isRoot":false}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/ivr-menus');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"channelId":"string","name":"string","greetingText":"","greetingAudioUrl":null,"timeoutSec":5,"maxRetries":2,"options":[],"noInputAction":{"kind":"hangup"},"invalidAction":{"kind":"hangup"},"isRoot":false}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/ivr-menus')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"channelId":"string","name":"string","greetingText":"","greetingAudioUrl":null,"timeoutSec":5,"maxRetries":2,"options":[],"noInputAction":{"kind":"hangup"},"invalidAction":{"kind":"hangup"},"isRoot":false}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/ivr-menus"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"channelId\":\"string\",\"name\":\"string\",\"greetingText\":\"\",\"greetingAudioUrl\":null,\"timeoutSec\":5,\"maxRetries\":2,\"options\":[],\"noInputAction\":{\"kind\":\"hangup\"},\"invalidAction\":{\"kind\":\"hangup\"},\"isRoot\":false}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
DELETEhttps://api.chatlychat.com/v1/voice/ivr-menus/{id}
Delete an IVR menu (refused while another menu references it)
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
204
Code samples
cURL
curl -X DELETE "https://api.chatlychat.com/v1/voice/ivr-menus/{id}" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/ivr-menus/{id}', {
  method: 'DELETE',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://api.chatlychat.com/v1/voice/ivr-menus/{id}",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://api.chatlychat.com/v1/voice/ivr-menus/{id}", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/ivr-menus/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/ivr-menus/{id}')
req = Net::HTTP::Delete.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/ivr-menus/{id}"))
    .header("Idempotency-Key", "<value>")
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
PATCHhttps://api.chatlychat.com/v1/voice/ivr-menus/{id}
Update an IVR menu
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "name": "string",
  "greetingText": "string",
  "greetingAudioUrl": "string",
  "timeoutSec": 0,
  "maxRetries": 0,
  "options": [
    {
      "digit": "string",
      "label": "string",
      "action": {
        "kind": "route_to_team",
        "target": "string"
      }
    }
  ],
  "noInputAction": {
    "kind": "route_to_team",
    "target": "string"
  },
  "invalidAction": {
    "kind": "route_to_team",
    "target": "string"
  },
  "isRoot": true
}
Responses
200
Code samples
cURL
curl -X PATCH "https://api.chatlychat.com/v1/voice/ivr-menus/{id}" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","greetingText":"string","greetingAudioUrl":"string","timeoutSec":0,"maxRetries":0,"options":[{"digit":"string","label":"string","action":{"kind":"route_to_team","target":"string"}}],"noInputAction":{"kind":"route_to_team","target":"string"},"invalidAction":{"kind":"route_to_team","target":"string"},"isRoot":true}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/ivr-menus/{id}', {
  method: 'PATCH',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name":"string","greetingText":"string","greetingAudioUrl":"string","timeoutSec":0,"maxRetries":0,"options":[{"digit":"string","label":"string","action":{"kind":"route_to_team","target":"string"}}],"noInputAction":{"kind":"route_to_team","target":"string"},"invalidAction":{"kind":"route_to_team","target":"string"},"isRoot":true}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "PATCH",
    "https://api.chatlychat.com/v1/voice/ivr-menus/{id}",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"name": "string", "greetingText": "string", "greetingAudioUrl": "string", "timeoutSec": 0, "maxRetries": 0, "options": [{"digit": "string", "label": "string", "action": {"kind": "route_to_team", "target": "string"}}], "noInputAction": {"kind": "route_to_team", "target": "string"}, "invalidAction": {"kind": "route_to_team", "target": "string"}, "isRoot": True},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("PATCH", "https://api.chatlychat.com/v1/voice/ivr-menus/{id}", strings.NewReader(`{"name":"string","greetingText":"string","greetingAudioUrl":"string","timeoutSec":0,"maxRetries":0,"options":[{"digit":"string","label":"string","action":{"kind":"route_to_team","target":"string"}}],"noInputAction":{"kind":"route_to_team","target":"string"},"invalidAction":{"kind":"route_to_team","target":"string"},"isRoot":true}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/ivr-menus/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"name":"string","greetingText":"string","greetingAudioUrl":"string","timeoutSec":0,"maxRetries":0,"options":[{"digit":"string","label":"string","action":{"kind":"route_to_team","target":"string"}}],"noInputAction":{"kind":"route_to_team","target":"string"},"invalidAction":{"kind":"route_to_team","target":"string"},"isRoot":true}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/ivr-menus/{id}')
req = Net::HTTP::Patch.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"name":"string","greetingText":"string","greetingAudioUrl":"string","timeoutSec":0,"maxRetries":0,"options":[{"digit":"string","label":"string","action":{"kind":"route_to_team","target":"string"}}],"noInputAction":{"kind":"route_to_team","target":"string"},"invalidAction":{"kind":"route_to_team","target":"string"},"isRoot":true}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/ivr-menus/{id}"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"name\":\"string\",\"greetingText\":\"string\",\"greetingAudioUrl\":\"string\",\"timeoutSec\":0,\"maxRetries\":0,\"options\":[{\"digit\":\"string\",\"label\":\"string\",\"action\":{\"kind\":\"route_to_team\",\"target\":\"string\"}}],\"noInputAction\":{\"kind\":\"route_to_team\",\"target\":\"string\"},\"invalidAction\":{\"kind\":\"route_to_team\",\"target\":\"string\"},\"isRoot\":true}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml
Preview the TwiML a menu renders
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/ivr-menus/{id}/twiml"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/voicemails
List voicemails, newest first
Parameters
NameInTypeRequiredDescription
cursorquerystringyes
limitquerystringyes
unlistenedquerystringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened=')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/voicemails?cursor=&limit=&unlistened="))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
GEThttps://api.chatlychat.com/v1/voice/voicemails/unlistened-count
Unlistened voicemail count for the nav badge
Parameters
NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Responses
200
Code samples
cURL
curl -X GET "https://api.chatlychat.com/v1/voice/voicemails/unlistened-count" \
  -H "Idempotency-Key: <value>"
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/voicemails/unlistened-count', {
  method: 'GET',
  headers: {
    'Idempotency-Key': '<value>',
  },
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://api.chatlychat.com/v1/voice/voicemails/unlistened-count",
    headers={
    "Idempotency-Key": "<value>",
    },
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.chatlychat.com/v1/voice/voicemails/unlistened-count", nil)
	req.Header.Set("Idempotency-Key", "<value>")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/voicemails/unlistened-count');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/voicemails/unlistened-count')
req = Net::HTTP::Get.new(uri)
req['Idempotency-Key'] = '<value>'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/voicemails/unlistened-count"))
    .header("Idempotency-Key", "<value>")
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
POSThttps://api.chatlychat.com/v1/voice/voicemails/{id}/listened
Mark a voicemail listened (or un-listened)
Parameters
NameInTypeRequiredDescription
idpathstringyes
Idempotency-KeyheaderstringnoUUIDv4 or 16-128 char opaque token. Required on write endpoints in production. Replays return the cached response with `Idempotency-Replay: true`; reusing the key with a different body returns 409 idempotency_conflict.
Request body application/json
{
  "listened": true
}
Responses
201
Code samples
cURL
curl -X POST "https://api.chatlychat.com/v1/voice/voicemails/{id}/listened" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"listened":true}'
TypeScript
const res = await fetch('https://api.chatlychat.com/v1/voice/voicemails/{id}/listened', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"listened":true}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://api.chatlychat.com/v1/voice/voicemails/{id}/listened",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"listened": True},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://api.chatlychat.com/v1/voice/voicemails/{id}/listened", strings.NewReader(`{"listened":true}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.chatlychat.com/v1/voice/voicemails/{id}/listened');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"listened":true}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://api.chatlychat.com/v1/voice/voicemails/{id}/listened')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"listened":true}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.chatlychat.com/v1/voice/voicemails/{id}/listened"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"listened\":true}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Was this page helpful?