For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGet API key
DocumentationIntegrationsAPI Reference
DocumentationIntegrationsAPI Reference
  • API Reference
      • GETList Voices
      • GETList Agents
      • POSTCreate Agent
      • GETGet Agent
      • DELDelete Agent
      • PATCHUpdate Agent
      • POSTAttach Number To Agent
      • DELDetach Number From Agent
      • GETList Agent Conversations
      • GETList Agent Calls
LogoLogo
HomeGet API key
API Referenceagents

Get Agent

GET
https://api.agentphone.ai/v1/agents/:agent_id
GET
/v1/agents/:agent_id
1const url = 'https://api.agentphone.ai/v1/agents/agent_id';
2const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
3
4try {
5 const response = await fetch(url, options);
6 const data = await response.json();
7 console.log(data);
8} catch (error) {
9 console.error(error);
10}
1{
2 "id": "string",
3 "name": "string",
4 "description": "string",
5 "voiceMode": "webhook",
6 "voice": "string",
7 "createdAt": "2024-01-15T09:30:00Z",
8 "enableMessaging": true,
9 "modelTier": "balanced",
10 "systemPrompt": "string",
11 "beginMessage": "string",
12 "transferNumber": "string",
13 "voicemailMessage": "string",
14 "sttMode": "fast",
15 "ambientSound": "none",
16 "denoisingMode": "noise-cancellation",
17 "maxSilenceMs": 600000,
18 "voiceSpeed": 1,
19 "interruptionSensitivity": 0.8,
20 "enableBackchannel": true,
21 "language": "en-US",
22 "numbers": [
23 {
24 "id": "string",
25 "phoneNumber": "string",
26 "status": "string",
27 "type": "sms"
28 }
29 ]
30}
Get a single agent with its attached numbers.
Was this page helpful?
Previous

Delete Agent

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

agent_idstringRequired

Response

Successful Response
idstring
namestring
descriptionstring or null
voiceModeenum
Allowed values:
voicestring
createdAtdatetime
enableMessagingbooleanDefaults to true
modelTierenumDefaults to balanced
Allowed values:
systemPromptstring or null
beginMessagestring or null
transferNumberstring or null
voicemailMessagestring or null
sttModeenumDefaults to fast

Speech-to-text mode. ‘fast’ optimizes for latency, ‘accurate’ optimizes for transcription accuracy (~200ms additional latency).

Allowed values:
ambientSoundenumDefaults to none

Background ambience to mask synthetic silence between turns. ‘none’ disables; ‘office’, ‘coffee-shop’, ‘outdoor’ enable a quiet bed.

Allowed values:
denoisingModeenumDefaults to noise-cancellation

Audio denoising. ‘noise-cancellation’ (default) handles general noise. ‘noise-and-background-speech-cancellation’ is more aggressive for callers in cars, cafes, or near TVs ($0.005/min surcharge).

Allowed values:
maxSilenceMsintegerDefaults to 600000

Hang up the call after this many milliseconds of caller silence. Range 10000 (10s) to 3600000 (1 hour). Default 600000 (10 min).

voiceSpeeddoubleDefaults to 1
Voice speed multiplier. Range 0.5 to 2.0. Default 1.0.
interruptionSensitivitydoubleDefaults to 0.8
How easily callers can interrupt the agent. Range 0.0 to 1.0. Default 0.8.
enableBackchannelbooleanDefaults to true

When true, the agent interjects short filler words like ‘uh-huh’ or ‘mhmm’ during longer caller utterances. Defaults to true.

languagestringDefaults to en-US

BCP-47 locale that drives the agent’s speech recognition and pronunciation. Defaults to ‘en-US’.

numberslist of objects or null

Errors

422
Unprocessable Entity Error