JavaScript
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const call = await client.call.create({
callDirection: 'INBOUND',
interfaceType: 'PHONE',
recordingUrl: 'https://example.com',
startedAt: 'startedAt',
});
console.log(call.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
call = client.call.create(
call_direction="INBOUND",
interface_type="PHONE",
recording_url="https://example.com",
started_at="startedAt",
)
print(call.data)curl --request POST \
--url https://api.roark.ai/v1/call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recordingUrl": "<string>",
"startedAt": "<string>",
"stereoRecordingUrl": "<string>",
"transcript": [
{
"startOffsetMs": 1073741823,
"endOffsetMs": 1073741823,
"text": "<string>",
"role": "AGENT",
"languageCode": "<string>",
"payload": {},
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customId": "<string>"
}
}
],
"toolInvocations": [
{
"name": "<string>",
"parameters": {},
"result": "<string>",
"startOffsetMs": 1073741823,
"description": "<string>",
"endOffsetMs": 1073741823,
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customId": "<string>"
}
}
],
"properties": {},
"vapiCallId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"livekitRoomId": "<string>",
"externalId": "<string>",
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"agents": [
{
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>",
"externalId": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/call",
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([
'recordingUrl' => '<string>',
'startedAt' => '<string>',
'stereoRecordingUrl' => '<string>',
'transcript' => [
[
'startOffsetMs' => 1073741823,
'endOffsetMs' => 1073741823,
'text' => '<string>',
'role' => 'AGENT',
'languageCode' => '<string>',
'payload' => [
],
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customId' => '<string>'
]
]
],
'toolInvocations' => [
[
'name' => '<string>',
'parameters' => [
],
'result' => '<string>',
'startOffsetMs' => 1073741823,
'description' => '<string>',
'endOffsetMs' => 1073741823,
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customId' => '<string>'
]
]
],
'properties' => [
],
'vapiCallId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'livekitRoomId' => '<string>',
'externalId' => '<string>',
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'endpoint' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'agents' => [
[
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'endpoint' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'customers' => [
[
'phoneNumberE164' => '<string>',
'label' => '<string>',
'externalId' => '<string>'
]
]
]),
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://api.roark.ai/v1/call"
payload := strings.NewReader("{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}")
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://api.roark.ai/v1/call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/call")
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 = "{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"status": "RINGING",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"agents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"phoneNumberE164": "<string>"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>",
"customerProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"createdAt": "<string>",
"externalId": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "payment_required",
"code": "insufficient_credits",
"message": "Not enough credit to start this work. Add credit and try again."
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Calls
Create a call
Create a new call with recording, transcript, agents, and customers
POST
/
v1
/
call
JavaScript
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const call = await client.call.create({
callDirection: 'INBOUND',
interfaceType: 'PHONE',
recordingUrl: 'https://example.com',
startedAt: 'startedAt',
});
console.log(call.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
call = client.call.create(
call_direction="INBOUND",
interface_type="PHONE",
recording_url="https://example.com",
started_at="startedAt",
)
print(call.data)curl --request POST \
--url https://api.roark.ai/v1/call \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"recordingUrl": "<string>",
"startedAt": "<string>",
"stereoRecordingUrl": "<string>",
"transcript": [
{
"startOffsetMs": 1073741823,
"endOffsetMs": 1073741823,
"text": "<string>",
"role": "AGENT",
"languageCode": "<string>",
"payload": {},
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customId": "<string>"
}
}
],
"toolInvocations": [
{
"name": "<string>",
"parameters": {},
"result": "<string>",
"startOffsetMs": 1073741823,
"description": "<string>",
"endOffsetMs": 1073741823,
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customId": "<string>"
}
}
],
"properties": {},
"vapiCallId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"livekitRoomId": "<string>",
"externalId": "<string>",
"agent": {
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"agents": [
{
"roarkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>",
"externalId": "<string>"
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/call",
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([
'recordingUrl' => '<string>',
'startedAt' => '<string>',
'stereoRecordingUrl' => '<string>',
'transcript' => [
[
'startOffsetMs' => 1073741823,
'endOffsetMs' => 1073741823,
'text' => '<string>',
'role' => 'AGENT',
'languageCode' => '<string>',
'payload' => [
],
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customId' => '<string>'
]
]
],
'toolInvocations' => [
[
'name' => '<string>',
'parameters' => [
],
'result' => '<string>',
'startOffsetMs' => 1073741823,
'description' => '<string>',
'endOffsetMs' => 1073741823,
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'customId' => '<string>'
]
]
],
'properties' => [
],
'vapiCallId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'livekitRoomId' => '<string>',
'externalId' => '<string>',
'agent' => [
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'endpoint' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'agents' => [
[
'roarkId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'endpoint' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
],
'customers' => [
[
'phoneNumberE164' => '<string>',
'label' => '<string>',
'externalId' => '<string>'
]
]
]),
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://api.roark.ai/v1/call"
payload := strings.NewReader("{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}")
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://api.roark.ai/v1/call")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/call")
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 = "{\n \"recordingUrl\": \"<string>\",\n \"startedAt\": \"<string>\",\n \"stereoRecordingUrl\": \"<string>\",\n \"transcript\": [\n {\n \"startOffsetMs\": 1073741823,\n \"endOffsetMs\": 1073741823,\n \"text\": \"<string>\",\n \"role\": \"AGENT\",\n \"languageCode\": \"<string>\",\n \"payload\": {},\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"toolInvocations\": [\n {\n \"name\": \"<string>\",\n \"parameters\": {},\n \"result\": \"<string>\",\n \"startOffsetMs\": 1073741823,\n \"description\": \"<string>\",\n \"endOffsetMs\": 1073741823,\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"customId\": \"<string>\"\n }\n }\n ],\n \"properties\": {},\n \"vapiCallId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"livekitRoomId\": \"<string>\",\n \"externalId\": \"<string>\",\n \"agent\": {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"agents\": [\n {\n \"roarkId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"endpoint\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n ],\n \"customers\": [\n {\n \"phoneNumberE164\": \"<string>\",\n \"label\": \"<string>\",\n \"externalId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"status": "RINGING",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"agents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"phoneNumberE164": "<string>"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>",
"customerProfileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"createdAt": "<string>",
"externalId": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "payment_required",
"code": "insufficient_credits",
"message": "Not enough credit to start this work. Add credit and try again."
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Authorizations
Body
application/json
Call creation payload. Supports singular (agent/customer) or plural (agents/customers) formats.
High-level call end status, indicating how the call terminated
Available options:
PARTICIPANTS_DID_NOT_SPEAK, AGENT_DID_NOT_ANSWER, AGENT_DID_NOT_SPEAK, AGENT_STOPPED_SPEAKING, AGENT_ENDED_CALL, AGENT_SAID_END_CALL_PHRASE, AGENT_TRANSFERRED_CALL, AGENT_BUSY, AGENT_ERROR, CUSTOMER_ENDED_CALL, VOICE_MAIL_REACHED, SILENCE_TIME_OUT, PHONE_CALL_PROVIDER_CONNECTION_ERROR, CUSTOMER_DID_NOT_ANSWER, CUSTOMER_DID_NOT_SPEAK, CUSTOMER_STOPPED_SPEAKING, CUSTOMER_BUSY, DIAL_ERROR, MAX_DURATION_REACHED, UNKNOWN A stable identifier from your own system (e.g. session ID, conversation ID) used to correlate this call with OpenTelemetry traces. Set the same value as a roark.external_id span or resource attribute on your traces and the matching trace will be linked automatically. Must be unique within a project.
Maximum string length:
255