# Create campaign on an existing agent

> A campaign run by an AI agent you already have.

Source: https://docs.mycrmsim.com/docs/dbr-campaigns/create-dbr-campaign

```http
POST https://backend.mysmsgateway.app/api/v1/ext/dbr-campaigns
```

- Category: myCRMSIM DBR Campaigns / DBR Campaigns
- Auth: Bearer access token
- Scope: `dbr_campaigns.write`

An agent runs one open campaign at a time. If the agent already has one, the answer is **409** `already_open` with that campaign's `campaign_id`; send `continue_open_campaign: true` to carry on with it instead.

`fitness_notes` in the answer lists anything about the agent that is not suited to reactivation (no opener, no goal …). Nothing is sent to anyone; next is Preview campaign.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspace_id` | body | number | yes | A workspace of the installer. Example: `7` |
| `agent_id` | body | string | yes | An agent id from List AI agents. |
| `campaign_name` | body | string | no | Name of the campaign. |
| `list_size_estimate` | body | number | no | About how many contacts are on the list. |
| `missed_call_first` | body | boolean | no | Ring each contact with a missed call before the opener. |
| `continue_open_campaign` | body | boolean | no | Carry on with the agent's open campaign rather than refuse. Default false. |

## Request body

```json
{
  "workspace_id": 7,
  "agent_id": "a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f607",
  "campaign_name": "Harbour Dental — check-up reactivation",
  "list_size_estimate": 400
}
```

## Response fields (campaign)

| Field | Type | Description |
| --- | --- | --- |
| `campaign_id` | string | Campaign id. |
| `campaign_name` | string | Campaign name. |
| `campaign_tag` | string | The contact tag that puts a contact on the list. Adding it to contacts is what launches them. |
| `campaign_stage` | string | `built` (draft) → `live` → `tested` → `launched` → `completed`; `aborted` when stopped. |
| `campaign_open` | boolean | Not completed or deleted. An agent runs one open campaign at a time. |
| `agent_id` | string | The AI agent that talks to the contacts. |
| `agent_name` | string, nullable | Its name. |
| `agent_status` | string, nullable | The agent's status: `draft`, `active`, `paused`. |
| `workflow_id` | string, nullable | The automation that sends the openers — set by the first Preview. |
| `list_size_estimate` | number, nullable | How many contacts you said the list has. |
| `tagged_count` | number, nullable | Contacts carrying the campaign tag now — the list's real size. |
| `previewed_at` | string (ISO 8601), nullable | Last preview. |
| `missed_call_first` | boolean | A missed call rings each contact before their opener. |
| `runs` | object | Launched / completed only: `total`, `active`, `completed`, `failed`, `cancelled`, `last_finished_at`. |
| `pacing` | object | How fast the openers go out. |
| `next_step` | string | What to do next, in words. |

## Response 201

Created

```json
{
  "success": true,
  "message": "Campaign created on the agent.",
  "data": {
    "campaign_id": "c7d2e9f0-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
    "campaign_name": "Harbour Dental — check-up reactivation",
    "campaign_tag": "dbr-harbour-dental",
    "campaign_stage": "built",
    "campaign_open": true,
    "agent_id": "a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f607",
    "agent_name": "Revive",
    "agent_status": "draft",
    "workflow_id": null,
    "list_size_estimate": 400,
    "tagged_count": 0,
    "previewed_at": null,
    "missed_call_first": false,
    "pacing": {
      "batch_size": 5,
      "every_seconds": 600,
      "random_seconds": [
        480,
        720
      ],
      "window": "9:00–18:00 Australia/Sydney, Mon–Fri",
      "per_day": 150,
      "list_size": 400,
      "working_days": 3,
      "waves_recommended": false
    },
    "pacing_sentence": "About 400 contacts, 5 every ~10 minutes in sending hours: about 150 a day, so 3 working days.",
    "next_step": "Preview the messages.",
    "created_at": "2026-10-28T09:00:00.000Z",
    "updated_at": "2026-10-28T09:00:00.000Z",
    "fitness_notes": []
  }
}
```

## Response 409

The agent already runs an open campaign

```json
{
  "success": false,
  "code": "already_open",
  "message": "Revive already runs an open campaign.",
  "campaign_id": "c7d2e9f0-1a2b-4c3d-8e4f-5a6b7c8d9e0f",
  "campaign_name": "Harbour Dental — check-up reactivation",
  "campaign_stage": "live",
  "agent_name": "Revive"
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): dbr_campaigns.write. This integration was granted: …"
}
```

## Response 404

workspace_id does not exist or is not the installer's (same response for both)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```

## Response 404

The agent is not in this workspace

```json
{
  "success": false,
  "message": "AI agent not found or not accessible to this token"
}
```
