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

# Create campaign

> Create a new outbound calling campaign.

Creates a new outbound calling campaign. The campaign is created with `draft` status and does not start calling until you [update its status](/api-reference/campaigns/update-status) to `start`.

## Endpoint

`POST /user/campaign`

## Request

<ParamField body="name" type="string" required>
  Name of the campaign. Maximum 255 characters.
</ParamField>

<ParamField body="assistant_id" type="integer" required>
  ID of the outbound assistant to use for this campaign.
</ParamField>

<ParamField body="timezone" type="string">
  Timezone for the campaign (e.g., `America/New_York`). Defaults to your account timezone.
</ParamField>

<ParamField body="max_calls_in_parallel" type="integer" default="3">
  Maximum simultaneous calls. Minimum: `1`. Maximum depends on your plan.
</ParamField>

<ParamField body="allowed_hours_start_time" type="string" default="00:00">
  Start of the allowed calling window. Format: `H:i` (e.g., `09:00`).
</ParamField>

<ParamField body="allowed_hours_end_time" type="string" default="23:59">
  End of the allowed calling window. Format: `H:i` (e.g., `17:00`).
</ParamField>

<ParamField body="allowed_days" type="array" default="all 7 days">
  Days when calls are allowed. Valid values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.
</ParamField>

<ParamField body="max_retries" type="integer" default="3">
  Maximum retry attempts for failed calls. Range: 1–5.
</ParamField>

<ParamField body="retry_interval" type="integer" default="60">
  Minutes between retry attempts. Range: 10–4320.
</ParamField>

<ParamField body="retry_on_voicemail" type="boolean">
  Whether to retry calls that reached voicemail.
</ParamField>

<ParamField body="retry_on_goal_incomplete" type="boolean">
  Whether to retry calls where the goal was not completed.
</ParamField>

<ParamField body="goal_completion_variable" type="string">
  Name of a boolean variable from your assistant's post-call schema to track goal completion. Maximum 255 characters.
</ParamField>

<ParamField body="mark_complete_when_no_leads" type="boolean" default="true">
  Whether to automatically mark the campaign complete when no leads remain.
</ParamField>

<ParamField body="phone_number_ids" type="array">
  Array of phone number IDs to use for outbound calls. Each ID must be distinct and belong to your account.
</ParamField>

## Response

<ResponseField name="message" type="string">Confirmation message.</ResponseField>

<ResponseField name="data" type="object">
  The created campaign.

  <Expandable title="properties">
    <ResponseField name="id" type="integer">Campaign ID.</ResponseField>
    <ResponseField name="name" type="string">Campaign name.</ResponseField>
    <ResponseField name="status" type="string">Status — always `draft` for new campaigns.</ResponseField>
    <ResponseField name="max_calls_in_parallel" type="integer">Maximum simultaneous calls.</ResponseField>
    <ResponseField name="mark_complete_when_no_leads" type="boolean">Auto-complete when no leads remain.</ResponseField>
    <ResponseField name="allowed_hours_start_time" type="string">Start of calling window.</ResponseField>
    <ResponseField name="allowed_hours_end_time" type="string">End of calling window.</ResponseField>
    <ResponseField name="allowed_days" type="array">Allowed calling days.</ResponseField>
    <ResponseField name="max_retries" type="integer">Maximum retries.</ResponseField>
    <ResponseField name="retry_interval" type="integer">Minutes between retries.</ResponseField>
    <ResponseField name="created_at" type="string">Creation timestamp.</ResponseField>
    <ResponseField name="updated_at" type="string">Last update timestamp.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://portal.intellixent.ai/api/user/campaign" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Product Demo Campaign",
      "assistant_id": 127,
      "timezone": "America/New_York",
      "max_calls_in_parallel": 3,
      "allowed_hours_start_time": "09:00",
      "allowed_hours_end_time": "17:00",
      "allowed_days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
      "max_retries": 3,
      "retry_interval": 60
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://portal.intellixent.ai/api/user/campaign', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'Product Demo Campaign',
      assistant_id: 127,
      timezone: 'America/New_York',
      max_calls_in_parallel: 3,
      allowed_hours_start_time: '09:00',
      allowed_hours_end_time: '17:00',
      allowed_days: ['monday', 'tuesday', 'wednesday', 'thursday', 'friday'],
      max_retries: 3,
      retry_interval: 60
    })
  });

  const data = await response.json();
  console.log(data.data.id); // New campaign ID
  ```
</CodeGroup>

```json 201 Created theme={null}
{
  "message": "Campaign created successfully",
  "data": {
    "id": 1,
    "name": "Product Demo Campaign",
    "status": "draft",
    "max_calls_in_parallel": 3,
    "mark_complete_when_no_leads": true,
    "allowed_hours_start_time": "09:00:00",
    "allowed_hours_end_time": "17:00:00",
    "allowed_days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
    "max_retries": 3,
    "retry_interval": 60,
    "created_at": "2026-02-23T10:00:00.000000Z",
    "updated_at": "2026-02-23T10:00:00.000000Z"
  }
}
```

```json 403 Plan limit reached theme={null}
{
  "message": "You have reached the maximum number of campaigns allowed by your plan."
}
```

```json 404 Assistant not found theme={null}
{
  "message": "Assistant not found or not an outbound assistant."
}
```
