Get agent
Retrieves the full configuration of a single agent by its slug.
Endpoint
GET /v1/agents/:slug
Path parameters
| Parameter | Type | Description |
|---|---|---|
slug | string | Unique 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
| Field | Type | Description |
|---|---|---|
name | string | Agent name. |
slug | string | Unique agent identifier. |
greeting | string | Opening message the agent says when the call starts. |
prompt | string | System prompt that defines the agent behavior. |
textPrompt | string | Prompt used for text/chat conversations. |
voiceId | string | Voice identifier used by the agent. |
sipDialTarget | string | null | SIP destination, if configured. |
numberOfAttempt | integer | Number of call attempts configured (from recallLogic). |
allowReturnCall | boolean | Whether the agent allows return calls. |
recallLogic | object | Retry/recall configuration. |
workingHours | object | Working-hours configuration. |
localizations | object | Localization settings. |
dtmf | boolean | Whether DTMF (keypad) input is enabled. |
transferCallDestinations | array | Configured call-transfer destinations. |
knowledgeBaseFiles | array | IDs of attached knowledge base files. |
tools | array | Tools/skills available to the agent. |
config | object | Additional agent configuration (transcriber language, timeouts, webhooks, etc.). |
note
Sensitive tool credentials (apiKey, token, credentialId) are never returned in the tools response.
Errors
| Status | Description |
|---|---|
404 | Agent not found or not accessible by this API key. |