Skip to content

Generate a call script for one contact

POST
/voice/call-scripts/generate

SPENDS CREDITS. A persona-driven script, retrieving from the agent’s knowledge and its memory of the contact. Nothing is called or sent.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Voice CallScriptGenerateRequest, without org_id / agent_settings.

object
agent_id
required

The agent whose persona and knowledge shape the script.

string
>= 1 characters
call_objective
Any of:
string
call_type

Professional, casual, cold_call, follow_up, demo or closing.

string
default: professional
company_context
Any of:
string
contact_id
required

The contact the call is for; drives memory retrieval.

string
>= 1 characters
context
required

What the call is about.

string
>= 1 characters
model

Openai: gpt-4o or gpt-4o-mini. anthropic: claude-sonnet-4-6, claude-haiku-4-5-20251001 or claude-opus-4-6. Voice rejects any other pairing with a 422.

string
default: gpt-4o
previous_interactions
Any of:
string
prospect_info
Any of:
string
provider

LLM provider.

string
default: openai
Allowed values: openai anthropic openrouter

Responses

200

Successful Response

object
data
required

One voice object - a collection, an agent, a route, a chat.

Open-shaped: voice adds fields to these bodies on its own release cadence and a dropped-or-added key must not be a 500 in this service.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string