Skip to main content

Get agent

Retrieves the full configuration of a single agent by its slug.

Endpoint

GET /v1/agents/:slug

Path parameters

ParameterTypeDescription
slugstringUnique slug of the agent. Get it from List agents or from your Fonema dashboard.

Request example

curl -X GET "https://api.fonema.ai/v1/agents/sales-agent-ab12cd34" \
-H "Authorization: Bearer YOUR_API_KEY_HERE"

Response

{
"name": "Sales Agent",
"slug": "sales-agent-ab12cd34",
"greeting": "Hi, thanks for calling!",
"prompt": "You are a helpful sales assistant.",
"textPrompt": "...",
"voiceId": "YOUR_VOICE_ID",
"sipDialTarget": null,
"numberOfAttempt": 3,
"allowReturnCall": true,
"recallLogic": { "totalCalls": 3 },
"workingHours": {},
"localizations": {},
"dtmf": false,
"transferCallDestinations": [],
"knowledgeBaseFiles": [],
"tools": [
{
"id": 12,
"name": "lookup_order",
"type": "API_CALL",
"description": "Look up an order by ID",
"variables": [
{ "orderId": { "type": "string", "description": "The order ID" } }
],
"content": {
"functionName": "lookup_order",
"url": "https://example.com/api/orders"
}
}
],
"config": {
"transcriberLanguage": "es-419",
"silenceTimeoutSeconds": 30,
"maxDurationSeconds": 600,
"endOfCallWebhook": "https://example.com/webhooks/end-of-call"
}
}

Response fields

FieldTypeDescription
namestringAgent name.
slugstringUnique agent identifier.
greetingstringOpening message the agent says when the call starts.
promptstringSystem prompt that defines the agent behavior.
textPromptstringPrompt used for text/chat conversations.
voiceIdstringVoice identifier used by the agent.
sipDialTargetstring | nullSIP destination, if configured.
numberOfAttemptintegerNumber of call attempts configured (from recallLogic).
allowReturnCallbooleanWhether the agent allows return calls.
recallLogicobjectRetry/recall configuration.
workingHoursobjectWorking-hours configuration.
localizationsobjectLocalization settings.
dtmfbooleanWhether DTMF (keypad) input is enabled.
transferCallDestinationsarrayConfigured call-transfer destinations.
knowledgeBaseFilesarrayIDs of attached knowledge base files.
toolsarrayTools/skills available to the agent.
configobjectAdditional agent configuration (transcriber language, timeouts, webhooks, etc.).
note

Sensitive tool credentials (apiKey, token, credentialId) are never returned in the tools response.

Errors

StatusDescription
404Agent not found or not accessible by this API key.