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

# Execute campaign

> Launch a DRAFT campaign into media buys and submit to ADCP

`POST /api/v2/buyer/campaigns/:id/execute`

Executes any `DRAFT` media buys on the campaign, submitting them to ADCP. On a freshly-created campaign the call transitions `DRAFT` → `ACTIVE`. You can also call it on an `ACTIVE` or `PAUSED` campaign to execute newly-added media buys without affecting the rest of the campaign.

<Note>
  `execute` submits `DRAFT` media buys to ADCP. It does **not** resume a `PAUSED` campaign — [reactivate](/v2/buyer/campaigns/tasks/reactivate-campaign) is the only way to do that. They are different endpoints. `COMPLETED` and `ARCHIVED` campaigns cannot be executed.
</Note>

## Request

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.interchange.io/api/v2/buyer/campaigns/cmp_987654321/execute \
    -H "Authorization: Bearer $SCOPE3_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "debug": false }'
  ```

  ```json Body theme={null}
  {
    "debug": false
  }
  ```
</CodeGroup>

## Parameters

| Field   | Type    | Required | Notes                                                                                                                                    |
| ------- | ------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `id`    | string  | Yes      | Campaign ID (path parameter). Must be in `DRAFT`, `ACTIVE`, or `PAUSED` status. `COMPLETED` and `ARCHIVED` campaigns cannot be executed. |
| `debug` | boolean | No       | Defaults to `false`. When `true`, surfaces the raw ADCP request/response and A2A debug logs in each error entry.                         |

## Response

```json theme={null}
{
  "campaignId": "cmp_987654321",
  "success": true,
  "previousStatus": "DRAFT",
  "newStatus": "ACTIVE"
}
```

When individual media buy submissions fail, `success` is `false` and `errors[]` carries one entry per failure:

```json theme={null}
{
  "campaignId": "cmp_987654321",
  "success": false,
  "previousStatus": "DRAFT",
  "newStatus": "ACTIVE",
  "errors": [
    {
      "mediaBuyId": "mb_abc123",
      "salesAgentId": "agent_xyz",
      "message": "Sales agent returned 422: invalid format for product"
    }
  ]
}
```

* `previousStatus` / `newStatus` — campaign status before and after the call.
* `errors[]` — `{ mediaBuyId, salesAgentId, message }` per failed submission. With `debug: true`, each entry also includes the full ADCP request/response payloads.

## Errors

| Code               | When                                                                                           |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| `VALIDATION_ERROR` | Campaign is in `COMPLETED` or `ARCHIVED` status (non-executable), or has no selected products. |
| `NOT_FOUND`        | Campaign ID does not exist for the authenticated account.                                      |

See [Errors](/v2/reference/errors) for the full error shape and recovery semantics.

## Related

<CardGroup cols={2}>
  <Card title="Pause campaign" href="/v2/buyer/campaigns/tasks/pause-campaign" icon="pause">
    Halt spend across all media buys
  </Card>

  <Card title="Reactivate campaign" href="/v2/buyer/campaigns/tasks/reactivate-campaign" icon="play">
    Resume a PAUSED campaign back to ACTIVE
  </Card>

  <Card title="Media buy status" href="/v2/buyer/campaigns/tasks/get-media-buy-status" icon="signal-stream">
    Poll live ADCP status after execute
  </Card>

  <Card title="Campaign overview" href="/v2/object-guides/campaign" icon="rocket">
    The campaign object and lifecycle
  </Card>
</CardGroup>
