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

# Getting started

> From zero to your first active campaign in 4 steps.

You need access credentials and the ID of the bot that will run the campaign.

## Step 1 — Authenticate and get the token

```bash theme={null}
POST /auth/login/
Content-Type: application/json

{
  "email": "user@company.com",
  "password": "••••••••"
}
```

Response:

```json theme={null}
{
  "access": "eyJhbGci...",
  "refresh": "eyJhbGci..."
}
```

Save the `access` token — you'll use it in every following request as `Authorization: Bearer <access_token>`.

<Tip>
  The access token expires. Use `POST /auth/token/refresh/` to renew it without logging in again.
</Tip>

***

## Step 2 — Get the bot ID

```bash theme={null}
GET /api/v2/bots/
Authorization: Bearer <access_token>
```

Response (excerpt):

```json theme={null}
[
  {
    "id": 116,
    "name": "Bot_Cobranza_Voz",
    "bot_type": "OUTBOUND",
    "conversation_type": "VOICE"
  }
]
```

Note down the bot's `id` — it's the `client_id` you'll use to create the campaign.

***

## Step 3 — Create the campaign

```bash theme={null}
POST /api/v2/create_campaign/
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "client_id": 116,
  "name": "July 2025 Campaign",
  "description": "First test campaign",
  "start_date": "2025-07-01",
  "call_from": "09:00",
  "call_to": "21:00",
  "closes_eod": false,
  "dialing_type": "HORIZONTAL_VERTICAL",
  "min_phone_priority": 0,
  "max_phone_priority": 1,
  "max_calls_per_case": 3
}
```

Response (excerpt):

```json theme={null}
{
  "id": 12345,
  "metrics": { "status": "SCHEDULED" }
}
```

Save the campaign's `id`.

<Note>
  The initial state depends on `start_date`: if it's a future date or the time window hasn't started yet → `SCHEDULED`. If it's today and within the time window → `ONGOING`.
</Note>

<Warning>
  **Priorities and retries:**

  * `min_phone_priority` / `max_phone_priority` are indexes (0-based, inclusive) into each case's `phone_list`. `min=0, max=1` → the bot uses the phones at position 0 and 1.
  * `max_calls_per_case` is the maximum number of attempts **per phone number**. With 2 phone numbers and `max_calls_per_case=3` → up to 6 total attempts per case.
</Warning>

***

## Step 4 — Upload the cases

```bash theme={null}
PUT /api/v2/create_campaign/12345/
Authorization: Bearer <access_token>
Content-Type: application/json

{
  "00001": {
    "products": [
      {
        "debt_code": "00001A",
        "pid": "Credit card",
        "debt": "15000.00",
        "expiration": "2025-12-01"
      }
    ],
    "params": {
      "limite_deuda": "2000.00"
    },
    "first_name": "María",
    "last_name": "González",
    "phone_settings": {
      "phone_list": ["1145671234", "1145679999"]
    }
  }
}
```

Successful response:

```json theme={null}
{
  "message": "Campaign id: 12345 > 1 cases were uploaded succcessfully"
}
```

If the campaign was `SCHEDULED` and the date and time are valid, it starts automatically. If it was already `ONGOING`, the bot starts dialing the newly uploaded cases.

<Note>
  **What goes in `params`?** The content of this field is specific to each bot — it varies depending on its configuration. To find out what parameters your bot accepts, check the **Bot Parameters → Additional** section in the [Parser configuration](/en/parser/bot-params). There you'll find the exact name of each additional field. If you don't have access to the parser, check with your administrator.
</Note>

***

## Limits to keep in mind

| Limit                                              | Value                            |
| -------------------------------------------------- | -------------------------------- |
| Cases per request                                  | 1,000 maximum                    |
| Wait time between upload requests                  | 1 second                         |
| Phones: no leading 0 area code or 15 mobile prefix | `1145671234` ✓ — `01145671234` ✗ |
| `params`                                           | Always required, minimum `{}`    |
