# campaign_state_conflict

- HTTP status: 409
- Retry: No
- Execution: not started
- Admin needed: no

**Campaign is in the wrong state.** Each action is allowed only in some statuses (see the campaign lifecycle). `details.status` is the status the campaign was in and `details.action` the action refused. The campaign `capabilities` object says which actions are allowed right now.

## What it means

The API returns HTTP 409 with `error.code` set to `campaign_state_conflict`. The default message is: "This action is not allowed in the campaign's current status."

## Common causes

- Pausing a campaign that is not running, or resuming one that is not paused.
- Editing a running campaign.
- Adding recipients to a campaign that has already been started.
- Starting a campaign that is already running.

## How to identify it

Check the response status (`409`) and `error.code` (`campaign_state_conflict`). Branch on `error.code`, not on the message text: messages can be reworded, codes do not change within v1. Log `error.request_id` (also sent as the `X-Request-Id` header) so support can find the request.

## How to fix it

- Retrieve the campaign, check `status` and `capabilities`, and choose an allowed action.

## Retry guidance

Sending the request unchanged fails the same way. Fix the cause first (see How to fix it), then send it again.

## Did anything happen?

This request was refused before any call was placed and before anything was charged.

## Idempotency

Nothing was done and the refusal is not stored under the Idempotency-Key. Fix the cause, then send the same request (with the same key if you sent one).

## Who can fix it

The developer who sends the request can fix it; no administrator action is normally needed.

## When to contact support

If the error persists after the steps above, contact [support@relationsai.com](mailto:support@relationsai.com). See [Support](/resources/support) for what to include (the `request_id`, the time in UTC, the operation, and whether you used a test or live key) and what never to send (API keys, Authorization headers, webhook signing secrets, recording links, transcripts or customer data).

## Example error response

```json
{
  "error": {
    "code": "campaign_state_conflict",
    "message": "This action is not allowed in the campaign's current status.",
    "details": {
      "status": "running",
      "action": "update"
    },
    "request_id": "req_e2x4ghsa6ap33uks6dy3icuy",
    "retry": "no",
    "doc_url": "https://docs.relationsai.com/errors/campaign_state_conflict"
  }
}
```

## Incorrect and corrected request

Incorrect: The campaign is a `draft`: there is nothing to pause.

```http
POST /v1/campaigns/cmp_2Kd7Fg4Hj9Lz3Xc8Vb5Nm1/pause
```

Corrected: Read `status` and `capabilities`, then send an action that is allowed (here: start).

```http
GET /v1/campaigns/cmp_2Kd7Fg4Hj9Lz3Xc8Vb5Nm1
```

## Operations that can return this error

- [`PATCH /campaigns/{campaign_id}`](/api/campaigns#update-a-campaign): Update a campaign
- [`POST /campaigns/{campaign_id}/recipients`](/api/campaigns#add-recipients): Add recipients
- [`POST /campaigns/{campaign_id}/start`](/api/campaigns#start-a-campaign): Start a campaign
- [`POST /campaigns/{campaign_id}/pause`](/api/campaigns#pause-a-campaign): Pause a campaign
- [`POST /campaigns/{campaign_id}/resume`](/api/campaigns#resume-a-campaign): Resume a campaign
- [`POST /campaigns/{campaign_id}/stop`](/api/campaigns#stop-a-campaign): Stop a campaign

See all codes in the [error-code reference](/fundamentals/error-codes).
