> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verbose.cx/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Import a contact, then create and start a campaign.

This walks through the common path: add contacts to a list, create an SMS
campaign against it, and start sending. Replace `as_live_…` with your key.

<Steps>
  <Step title="Add a contact to a list">
    Upsert contacts by phone. The list is created if it doesn't exist; the
    response includes its `list_id`.

    ```bash theme={null}
    curl -X POST https://astrasend-mocha.vercel.app/api/public/contacts \
      -H "Authorization: Bearer as_live_…" \
      -H "Content-Type: application/json" \
      -d '{"contacts":[{"phone":"+15551234567","first_name":"Jo"}],"list":"API leads"}'
    ```

    ```json theme={null}
    { "ok": true, "imported": 1, "skipped": 0, "list_id": "8f3c…" }
    ```
  </Step>

  <Step title="Find a sending number">
    List your numbers and grab an `id` to send from.

    ```bash theme={null}
    curl https://astrasend-mocha.vercel.app/api/public/numbers \
      -H "Authorization: Bearer as_live_…"
    ```
  </Step>

  <Step title="Create the campaign">
    Pass the `list_id` and a `number_id`. The campaign is built but not yet
    sending.

    ```bash theme={null}
    curl -X POST https://astrasend-mocha.vercel.app/api/public/campaigns \
      -H "Authorization: Bearer as_live_…" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Welcome blast",
        "message": "Hi {{first_name}}, welcome! Reply STOP to opt out.",
        "list_id": "8f3c…",
        "number_id": "1a2b…"
      }'
    ```

    ```json theme={null}
    { "ok": true, "campaign": { "campaignId": "c_…", "audienceCount": 1, "status": "ready" } }
    ```
  </Step>

  <Step title="Start sending">
    ```bash theme={null}
    curl -X POST https://astrasend-mocha.vercel.app/api/public/campaigns/c_…/start \
      -H "Authorization: Bearer as_live_…"
    ```
  </Step>
</Steps>

## Send a one-off SMS

Skip campaigns entirely for transactional messages:

```bash theme={null}
curl -X POST https://astrasend-mocha.vercel.app/api/public/messages \
  -H "Authorization: Bearer as_live_…" \
  -H "Content-Type: application/json" \
  -d '{"to":"+15551234567","body":"Your code is 4821."}'
```

## Create a voice agent + voice campaign

```bash theme={null}
# 1. Pick a voice
curl https://astrasend-mocha.vercel.app/api/public/voices -H "Authorization: Bearer as_live_…"

# 2. Create the agent
curl -X POST https://astrasend-mocha.vercel.app/api/public/agents \
  -H "Authorization: Bearer as_live_…" -H "Content-Type: application/json" \
  -d '{"name":"Booking bot","channel":"voice","system_prompt":"You book callbacks for Acme.","greeting":"Hi, this is Acme!","voice_id":"voice_abc"}'

# 3. Create + start a voice campaign (number_id is the caller ID)
curl -X POST https://astrasend-mocha.vercel.app/api/public/campaigns \
  -H "Authorization: Bearer as_live_…" -H "Content-Type: application/json" \
  -d '{"type":"voice","name":"Callbacks","list_id":"8f3c…","voice_agent_id":"ag_…","number_id":"1a2b…"}'
```

<Note>
  Campaign create/start and message send require the platform's send
  infrastructure to be online. Reads (contacts, numbers, agents, campaigns) work
  on their own.
</Note>
