Create Agent
Create a new AI voice agent for telephony.
Sets up a new AI phone agent with a custom system prompt, voice, and greeting. Once created, buy a phone number and attach it to this agent so it can make and receive calls autonomously.
Fields:
- name: Display name for the agent
- system_prompt: Instructions that define the agent’s personality and behavior on calls
- initial_greeting: What the AI agent says when the call connects
- voice_id: TTS voice preset (e.g. “female-1”) or Cartesia UUID
- transfer_number: Phone number to transfer calls to (e.g. a human operator)
- voicemail_message: Message the agent leaves if the call goes to voicemail
Authorizations
AgentLine API key. Get one via the email OTP flow (POST /v1/auth/otp then POST /v1/auth/verify). Pass as: Authorization: Bearer sk_live_...
Body
Display name for the AI voice agent
Default instructions for the agent's personality and behavior on ALL calls (inbound and outbound). Can be overridden per-call via POST /v1/calls.
Default opening line spoken on ALL calls (inbound and outbound), e.g. 'Hello, how can I help you today?'. Can be overridden per-call via POST /v1/calls.
TTS voice preset name (e.g. 'female-1', 'male-1') or Cartesia voice UUID; defaults to system voice if not set
Phone number in E.164 format to transfer calls to (e.g. a human operator fallback)
Message the AI agent leaves if the call goes to voicemail
Owner's phone number in E.164 format (e.g. '+12125551234'). Calls from this number enter task mode — the agent treats speech as executable instructions.
Response
Successful Response
Unique agent identifier (e.g. 'agt_abc123')
Account that owns this agent
Display name of the AI voice agent
When the agent was created
Default system prompt for all calls (can be overridden per-call)
Default greeting for all calls (can be overridden per-call)
TTS voice preset or Cartesia UUID
Phone number for call transfers
Message left on voicemail
Owner's phone number for task mode