Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getsmartalex.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Agents API allows you to create, configure, and manage AI voice agents programmatically.

List Agents

Get all agents in your account.
curl -X GET "https://api.getsmartalex.com/v1/agents" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": [
    {
      "id": "agent_abc123",
      "name": "Alex",
      "language": "en-US",
      "is_active": true,
      "voice_provider": "cloud",
      "created_at": "2026-01-15T10:30:00Z"
    },
    {
      "id": "agent_def456",
      "name": "Sarah",
      "language": "en-US",
      "is_active": true,
      "voice_provider": "cloud",
      "created_at": "2026-01-14T08:15:00Z"
    }
  ]
}

Get Agent

Retrieve a single agent by ID.
curl -X GET "https://api.getsmartalex.com/v1/agents/agent_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "data": {
    "id": "agent_abc123",
    "name": "Alex",
    "assistant_name": "Alex",
    "company_name": "ABC Company",
    "assistant_personality": "friendly and professional",
    "objective": "Answer caller questions and schedule appointments",
    "first_message": "Hello, this is Alex from ABC Company. How can I help you today?",
    "call_direction": "inbound",
    "language": "en-US",
    "is_active": true,
    "voice_provider": "cloud",
    "created_at": "2026-01-15T10:30:00Z",
    "updated_at": "2026-01-15T14:22:00Z"
  }
}

Create Agent

Create a new AI voice agent. Provide a website_url and SmartAlex will auto-build an agent trained on your business in under 60 seconds. Or supply your own configuration fields directly.
curl -X POST "https://api.getsmartalex.com/v1/agents" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "website_url": "https://example.com",
    "company_name": "ABC Company",
    "assistant_name": "Alex"
  }'

Parameters

ParameterTypeRequiredDescription
website_urlstringNoURL to crawl and auto-build the agent from
company_namestringNoCompany name shown to callers
namestringNoInternal name for the agent in your dashboard
assistant_namestringNoThe name the agent introduces itself with
objectivestringNoWhat the agent should accomplish on calls
first_messagestringNoThe agent’s opening line
voicestringNoVoice ID (see Available Voices)
accentstringNoAccent code
At minimum, provide either website_url (Standard creation) or the manual configuration fields like name, assistant_name, and objective (Advanced creation).

Update Agent

Update an existing agent’s configuration. Only provide the fields you want to change.
curl -X PATCH "https://api.getsmartalex.com/v1/agents/agent_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "objective": "Updated objective for the agent",
    "is_active": true
  }'

Parameters

All parameters are optional. Only included fields will be updated.
ParameterTypeDescription
namestringInternal name in your dashboard
assistant_namestringThe name the agent introduces itself with
company_namestringCompany name shown to callers
assistant_personalitystringPersonality descriptor (e.g., “warm and professional”)
is_activebooleanToggle the agent on or off
objectivestringWhat the agent should accomplish on calls
product_descriptionstringDescription of what your business sells
first_messagestringThe agent’s opening line
call_directionenuminbound, outbound, or both
languagestringLanguage code (e.g., en-US)
custom_instructionsarray of stringsAdditional behavioural rules
background_soundenumoffice or off
enabled_toolsarray of stringsList of tool names the agent can use
knowledge_item_idsarray of UUIDsKnowledge base documents linked to this agent
phone_number_idUUID or nullPhone number to assign to the agent

Delete Agent

Delete an agent. This action cannot be undone.
curl -X DELETE "https://api.getsmartalex.com/v1/agents/agent_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"
Deleting an agent will unassign it from all phone numbers and cancel any active campaigns using that agent.

Agent Status

The is_active boolean field controls whether the agent answers calls.
is_activeBehaviour
trueAgent is live and ready to take calls
falseAgent is toggled off and won’t answer calls
Newly-created agents may take a few seconds to finish provisioning before is_active becomes true.

Error Codes

CodeDescription
agent_not_foundAgent ID doesn’t exist
invalid_voiceVoice ID not recognised
invalid_languageLanguage code not supported