Skip to main content
POST
https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1
/
get-agent
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-agent \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "550e8400-e29b-41d4-a716-446655440000"}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Sarah - Receptionist",
  "greeting": "Hello, thank you for calling Acme Dental. This is Sarah, how can I help you today?",
  "system_prompt": "You are Sarah, a friendly receptionist for Acme Dental Clinic...",
  "voice_id": "21m00Tcm4TlvDq8ikWAM",
  "voice_provider": "elevenlabs",
  "voice_speed": 1.0,
  "language": "en-US",
  "agent_type": "both",
  "max_call_duration": 1800,
  "end_call_phrases": ["goodbye", "have a nice day"],
  "transfer_number": "+16045559999",
  "organization_name": "Acme Dental",
  "owner_name": "Dr. Smith",
  "agent_role": "Receptionist",
  "is_active": true,
  "is_default": true,
  "created_at": "2024-01-10T10:00:00Z",
  "updated_at": "2024-01-15T14:30:00Z"
}
Get the full configuration and details of an AI agent.

Request Body

agent_id
string
required
The unique identifier of the agent to retrieve.

Response

id
string
Unique agent identifier.
name
string
Agent display name.
greeting
string
Message spoken when answering calls.
system_prompt
string
Instructions defining the agent’s behavior and knowledge.
voice_id
string
Voice identifier for text-to-speech.
voice_provider
string
TTS provider: openai or elevenlabs.
voice_speed
number
Speech speed multiplier (0.5 to 2.0).
language
string
Agent language code (e.g., en-US).
agent_type
string
Agent type: inbound, outbound, or both.
max_call_duration
integer
Maximum call duration in seconds.
end_call_phrases
array
Phrases that trigger call termination.
transfer_number
string
Phone number for call transfers.
organization_name
string
Organization name for context.
owner_name
string
Owner name the agent represents.
agent_role
string
Agent’s role (e.g., “Receptionist”).
is_active
boolean
Whether the agent is enabled.
is_default
boolean
Whether this is the default agent.
created_at
string
When the agent was created.
updated_at
string
When the agent was last modified.
curl -X POST https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/get-agent \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "550e8400-e29b-41d4-a716-446655440000"}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Sarah - Receptionist",
  "greeting": "Hello, thank you for calling Acme Dental. This is Sarah, how can I help you today?",
  "system_prompt": "You are Sarah, a friendly receptionist for Acme Dental Clinic...",
  "voice_id": "21m00Tcm4TlvDq8ikWAM",
  "voice_provider": "elevenlabs",
  "voice_speed": 1.0,
  "language": "en-US",
  "agent_type": "both",
  "max_call_duration": 1800,
  "end_call_phrases": ["goodbye", "have a nice day"],
  "transfer_number": "+16045559999",
  "organization_name": "Acme Dental",
  "owner_name": "Dr. Smith",
  "agent_role": "Receptionist",
  "is_active": true,
  "is_default": true,
  "created_at": "2024-01-10T10:00:00Z",
  "updated_at": "2024-01-15T14:30:00Z"
}