> ## 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.

# Update status

> Start or stop a campaign.

Starts or stops a campaign. Use this to control when a campaign is actively dialing leads.

## Endpoint

`POST /user/campaigns/update-status`

## Request

<ParamField body="campaign_id" type="integer" required>
  ID of the campaign to update.
</ParamField>

<ParamField body="action" type="string" required>
  Action to perform: `start` or `stop`.
</ParamField>

## Response

<ResponseField name="message" type="string">
  Confirmation message (e.g., `Campaign started successfully.`).
</ResponseField>

<ResponseField name="success" type="boolean">
  Whether the operation succeeded.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="campaign_id" type="integer">ID of the updated campaign.</ResponseField>
    <ResponseField name="status" type="string">New status of the campaign. `in-progress` when started, `stopped` when stopped.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL — start theme={null}
  curl -X POST "https://portal.intellixent.ai/api/user/campaigns/update-status" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"campaign_id": 1, "action": "start"}'
  ```

  ```bash cURL — stop theme={null}
  curl -X POST "https://portal.intellixent.ai/api/user/campaigns/update-status" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"campaign_id": 1, "action": "stop"}'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://portal.intellixent.ai/api/user/campaigns/update-status', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ campaign_id: 1, action: 'start' })
  });

  const data = await response.json();
  console.log(data.data.status); // "in-progress"
  ```
</CodeGroup>

```json 200 Started theme={null}
{
  "message": "Campaign started successfully.",
  "success": true,
  "data": {
    "campaign_id": 1,
    "status": "in-progress"
  }
}
```

```json 200 Stopped theme={null}
{
  "message": "Campaign stopped successfully.",
  "success": true,
  "data": {
    "campaign_id": 1,
    "status": "stopped"
  }
}
```

<Note>
  A campaign must have leads assigned before it can be started. Add leads using the [Create lead](/api-reference/leads/create) endpoint.
</Note>
