# Create a campaign

`POST https://www.getrevox.com/api/campaigns`

Create a new outbound calling campaign. Every contact is materialized as a call in the `not_launched` status — nothing is dialed. Use POST /campaigns/:id/launch-calls to send them.

## Request body (JSON)

- `name` (string, required): The name of the campaign Constraints: min length 1.
- `assistant_id` (string (uuid), required): The ID of the assistant to use
- `from_phone_number` (string, optional): The phone number to use for outbound calls (E.164 format, e.g., +1234567890)
- `max_concurrent_calls` (number, optional): Maximum number of concurrent calls allowed for this campaign Constraints: min 1.
- `call_retry_config` ([CallRetryConfig](https://www.getrevox.com/docs/api/objects/call-retry-config.md), optional): Retry configuration for calls in this campaign. If not provided, uses the default retry config.
- `contacts` (array of object, required): The list of contacts to call
  - `to_phone_number` (string, required)
  - `prompt_variables` (any, required): Default: `{}`.

## Example request

```bash
curl -X POST https://www.getrevox.com/api/campaigns \
  -H "Authorization: Bearer $REVOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Appointment reminder",
    "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "contacts": [
      {
        "to_phone_number": "+33612345678",
        "prompt_variables": {}
      }
    ]
  }'
```

## Responses

### 200: Success

- `campaign` ([Campaign](https://www.getrevox.com/docs/api/objects/campaign.md), required)

### 400: Invalid request: the body or a parameter failed validation

- `message` (string, optional)
- `error` (string, optional)
- `bodyErrors` (object, optional): The validation errors returned from the API.
  - `issues` (array of object, required)
    - `path` (array of one of, required)
      - One of, **string** (string)
      - One of, **number** (number)
    - `message` (string, required)
    - `code` (string, optional)

### 402: Not enough credits on the organization

- `error` (string, required)
- `code` (string (constant), required)