Create a call
Create a new call with recording, transcript, agents, and customers
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>"
}
]
}
'<?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>'
]
]
]),
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 }\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 }\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 }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"agents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"phoneNumberE164": "<string>"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>"
}
],
"createdAt": "<string>",
"externalId": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Call creation payload. Supports singular (agent/customer) or plural (agents/customers) formats.
URL of source recording (must be an accessible WAV, MP3, MP4, or OGG file). Can be a signed URL.
When the call started (ISO 8601 format)
Interface type of the call (PHONE or WEB)
PHONE, WEB Direction of the call (INBOUND or OUTBOUND)
INBOUND, OUTBOUND URL of source stereo recording. Must be accessible. Can be a signed URL. Supported formats: WAV, MP3, MP4, OGG.
High-level call end status, indicating how the call terminated
PARTICIPANTS_DID_NOT_SPEAK, AGENT_DID_NOT_ANSWER, AGENT_DID_NOT_SPEAK, AGENT_STOPPED_SPEAKING, AGENT_ENDED_CALL, 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 List of transcript entries made during the call
- Option 1
- Option 2
Show child attributes
Show child attributes
List of tool invocations made during the call
Show child attributes
Show child attributes
Custom properties to include with the call. These can be used for filtering and will show in the call details page
Show child attributes
Show child attributes
The Vapi call ID (UUID) to link this call with OpenTelemetry trace data from Vapi. Used for matching calls with OTEL traces.
The LiveKit Cloud room ID to link this call with OpenTelemetry trace data from LiveKit. Used for matching calls with OTEL traces.
255A 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.
255Single agent participating in the call. Use this for simpler API when you have only one agent.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Agents participating in the call. Each agent requires identification and prompt information.
Agent participating in the call with their endpoint and prompt
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Single customer participating in the call. Use this for simpler API when you have only one customer.
Show child attributes
Show child attributes
Customers participating in the call.
Show child attributes
Show child attributes
Response
Call created successfully
Response after creating a call
Show child attributes
Show child attributes
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>"
}
]
}
'<?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>'
]
]
]),
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 }\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 }\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 }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "660e8400-e29b-41d4-a716-446655440001",
"callDirection": "INBOUND",
"startedAt": "2024-01-15T10:00:00Z",
"agents": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"endpoint": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "<string>",
"phoneNumberE164": "<string>"
}
}
],
"customers": [
{
"phoneNumberE164": "<string>",
"label": "<string>"
}
],
"createdAt": "<string>",
"externalId": "<string>"
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"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"
}