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

# Create Campaign

> Creates a new campaign in the connected OpenAI Ads (ChatGPT Ads) account

Creates a new campaign in the connected OpenAI Ads (ChatGPT Ads) account.

| | |
| - | - |
| **App** | OpenAI Ads |
| **Operation ID** | `openai_ads_create_campaign` |
| **Type** | Action |
| **Connection** | `openai_ads` (required) |
| **Credits per run** | 1 |
| **Agent / MCP tool** | Yes |
| **Requires approval** | Yes (write operation) |

## Inputs

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `idempotency_key` | string | No | - | Optional reusable key for this create request. Reuse the same key and payload after an uncertain response to avoid duplicates; use a new key for a new resource. |
| `name` | string | Yes | - | Campaign name (3-1000 characters). |
| `status` | string or SelectableOption | Yes | - | Campaign status: 'active' or 'paused'. |
| `bidding_type` | string or SelectableOption | No | - | Campaign objective / bidding type: 'impressions' (the default if omitted), 'clicks', or 'conversions'. Use 'conversions' together with conversion\_event\_setting\_ids. |
| `budget_type` | string or SelectableOption | Yes | - | Budget type — a 'daily' or 'lifetime' spend limit. |
| `budget_amount` | number | Yes | - | Budget amount in your account currency (e.g. US dollars), i.e. 50 for \$50. This value is converted to micros automatically before sending to the API. |
| `mode` | string or SelectableOption | No | - | Campaign mode: 'standard' (the default if omitted) or 'product\_feed' for a campaign that advertises items from a product feed set up in OpenAI Ads Manager. The mode cannot be changed after creation; ad groups under a product-feed campaign inherit the campaign's feed. |
| `product_feed_id` | string | No | - | Product feed ID to link to the campaign (shown in the Feeds area of OpenAI Ads Manager). Used with mode 'product\_feed'; ad groups then inherit this feed automatically. |
| `description` | string | No | - | Optional campaign description. |
| `start_date` | string | No | - | Optional campaign start date in YYYY-MM-DD format (converted to a Unix timestamp). |
| `end_date` | string | No | - | Optional campaign end date in YYYY-MM-DD format (converted to a Unix timestamp). |
| `platforms` | array of enum (`ios_app`, `android_app`, `web`, `desktop_web`, `ios_web`, `android_web`) | No | - | ChatGPT platforms to target. web includes all browsers; omit for all platforms. |
| `custom_audience_ids` | array of string | No | - | Ready custom audience IDs to include. Audiences must be eligible for inclusion. |
| `excluded_custom_audience_ids` | array of string | No | - | Ready custom audience IDs to exclude. Small or empty exclusion-eligible audiences are supported. |
| `location_ids` | array (also accepts a comma-separated string) | No | - | Optional list of location IDs to target, obtained from the openai\_ads\_search\_geo node. Omit to reach all available locations. |
| `countries` | array (also accepts a comma-separated string) | No | - | Optional list of ISO country codes to target (e.g. 'US', 'GB') — a shortcut that needs no geo lookup. Can be combined with location\_ids. |
| `excluded_location_ids` | array (also accepts a comma-separated string) | No | - | Optional list of location IDs to exclude from targeting, obtained from the openai\_ads\_search\_geo node. |
| `excluded_countries` | array (also accepts a comma-separated string) | No | - | Optional list of ISO country codes to exclude from targeting (e.g. 'DE'). |
| `query_string_template` | string | No | - | Optional landing-page query string template appended to destination URLs for tracking, e.g. 'utm\_source=chatgpt\&utm\_campaign=\{campaign\_id}'. |
| `conversion_event_setting_ids` | array (also accepts a comma-separated string) | No | - | Optional list of conversion event setting IDs, obtained from the openai\_ads\_list\_conversion\_events node. Typically used when bidding\_type is 'conversions'. |

### SelectableOption

| Field | Type | Required | Default | Description |
| - | - | - | - | - |
| `value` | string | Yes | - | |
| `label` | string | Yes | - | |

## Output

**Type**: `Dict`

Returns the created campaign object exactly as returned by the OpenAI Ads API (id, name, status, budget, targeting, start\_time, end\_time, created\_at, updated\_at, etc.).

**Fields**: dynamic (depend on the inputs)

**Example**:

```json theme={"dark"}
{
  "id": "cmpn_...",
  "name": "Spring launch",
  "status": "active",
  "bidding_type": "clicks",
  "budget": {
    "lifetime_spend_limit_micros": 25000000
  },
  "targeting": {
    "locations": {
      "include": [
        {
          "id": "2000043"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.