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

# Force Complete Campaign

> Force complete a running campaign immediately, halting all pending audience calls.

Use this endpoint to **force complete a running campaign** immediately, halting all pending audience calls.

## Endpoint

**POST** `/campaign-force-completed`

**Content-Type:** `application/json`
**Authentication:** Required (workspace auth)

## Request Body

```json theme={null}
{
  "campaign_id": 42,
  "campaign_status": "force_completed"
}
```

| Field             | Type   | Required | Description                                  |
| ----------------- | ------ | -------- | -------------------------------------------- |
| `campaign_id`     | number | Yes      | ID of the campaign to update                 |
| `campaign_status` | string | Yes      | Target status as a string (see values below) |

## Campaign Status Values

| Value             | Description                                                         |
| ----------------- | ------------------------------------------------------------------- |
| `draft`           | Campaign is in draft state                                          |
| `inprogress`      | Campaign is actively running                                        |
| `hold`            | Campaign is on hold                                                 |
| `pause`           | Campaign is paused                                                  |
| `force_completed` | Immediately halts all pending calls and marks campaign as completed |
| `deleted`         | Marks the campaign as deleted                                       |

## Response

```json theme={null}
{
  "message": "Campaign force completed successfully"
}
```

## Behavior

* Maps the string `campaign_status` to its internal numeric code before processing.
* When set to `force_completed`: all audience records with status `fresh` or `inqueue` are immediately set to `halted`.
* This action is **irreversible** — the campaign cannot be resumed after force completion.

## Example cURL

```bash theme={null}
curl -X POST https://www.tryunleashx.com/api/v1/global/campaign-force-completed \
  -H "Content-Type: application/json" \
  -H "Authorization: <api_key>" \
  -d '{
    "campaign_id": 42,
    "campaign_status": "force_completed"
  }'
```


## OpenAPI

````yaml api-reference/openapi.json POST /campaign-force-completed
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /campaign-force-completed:
    post:
      tags:
        - Campaigns
      summary: Force complete campaign
      description: >-
        Force complete a running campaign immediately, halting all pending
        audience calls.
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - campaign_id
                - campaign_status
              properties:
                campaign_id:
                  type: integer
                  description: ID of the campaign to force complete
                campaign_status:
                  type: string
                  enum:
                    - force_completed
                  description: Must be force_completed to mark as Force Completed
      responses:
        '200':
          description: Campaign force completed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Bad Request
        '404':
          description: Campaign does not exist
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````