> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getraya.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getraya.app/_mcp/server.

# Getting started with Raya Voice AI Agents

This guide will help you get up and running with Raya Voice AI Agents API.

## Prerequisites

* An API key (contact your administrator)
* HTTP client (cURL, Postman, or your preferred tool)
* Basic understanding of REST APIs

## Step 1: List Your Agents

See all available agents:

```bash
curl "https://v1.getraya.app/api/agent" \
  -H "X-API-Key: <YOUR_API_KEY>"
```

**Response:**

```json
{
  "agents": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Customer Support Agent",
      "created_at": "2024-01-15T10:25:00Z"
    }
  ],
  "total": 1,
  "offset": 0,
  "limit": 10
}
```

## Step 2: Initiate a Call

Make a call using an agent. Optional **agent_args** lets you pass extra context (e.g. contact name, order ID); it must be a **JSON object** `{}`, not an array.

```bash
curl -X POST https://v1.getraya.app/api/call \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "to_number": "1234567890",
    "country_code": "91",
    "timezone": "Asia/Kolkata",
    "agent_args": {"contact_name": "John", "order_id": "123"}
  }'
```

**Response:**

```json
{
  "message": "Call initiated successfully",
  "uuid": "123e4567e89b12d3a456426614174000"
}
```

## Step 3: Check Call Status

Poll for call completion (recommended: every 2 minutes):

```bash
curl "https://v1.getraya.app/api/call/123e4567e89b12d3a456426614174000" \
  -H "X-API-Key: <YOUR_API_KEY>"
```

**Response:**

```json
{
  "uuid": "123e4567e89b12d3a456426614174000",
  "outcome": "Completed",
  "call_start_time": "2024-01-15T10:30:00Z",
  "call_end_time": "2024-01-15T10:35:00Z",
  "call_duration": 300,
  "call_transcript": {...},
  "call_recording_url": "https://example.com/recordings/call-123.wav"
}
```

## Step 4: Create or configure an agent (Optional)

Create a new agent with optional voice and runtime settings. Only `name` is required.

```bash
curl -X POST https://v1.getraya.app/api/agent \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Customer Support Agent",
    "instructions": "You are a helpful support agent.",
    "say_hello": true,
    "max_call_duration_mins": 30
  }'
```

Use `GET /api/agent/{id}` to read full configuration (including `language_id`, `voice_id`, tools, and call messages). Use `PATCH /api/agent/{id}` to update individual fields.

> **Note**
>
> For `language_id` and `voice_id` UUIDs, see [Language Options](/voice-agents/language-options) and [Voice Options](/voice-agents/voice-options). Enabled options vary per team — confirm with your administrator if a UUID is rejected.

See [Core Concepts — Voice and runtime settings](/voice-agents/core-concepts#voice-and-runtime-settings-api) for all optional fields. For `tools`, see [LLM function tools](/voice-agents/llm-tools).

## Step 5: Create a Batch (Optional)

For multiple calls, create a batch:

```bash
curl -X POST https://v1.getraya.app/api/batch \
  -H "X-API-Key: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "123e4567-e89b-12d3-a456-426614174000",
    "batch_name": "Customer Follow-up",
    "contacts": [
      {
        "contact_name": "John Doe",
        "contact_phone": "1234567890",
        "country_code": "91"
      }
    ]
  }'
```

## Next Steps

* Learn about [Core Concepts](/voice-agents/core-concepts)
* Explore [Use Cases](/voice-agents/use-cases)
* Review [Best Practices](/voice-agents/best-practices)
* Browse the [API Reference](/api-reference/introduction)