> ## 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 Ad

> Creates a new ad under an ad group in the connected OpenAI Ads account — a chat_card creative with its own image and URL, or a product_ad_template creative for product-feed campaigns

Creates a new ad under an ad group in the connected OpenAI Ads account — a chat\_card creative with its own image and URL, or a product\_ad\_template creative for product-feed campaigns.

|                       |                         |
| --------------------- | ----------------------- |
| **App**               | OpenAI Ads              |
| **Operation ID**      | `openai_ads_create_ad`  |
| **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                                                                                                                                                                                                                                                                                   |
| --------------- | -------------------------- | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ad_group_id`   | string or SelectableOption | Yes      | -           | Parent ad group ID to create the ad under (from openai\_ads\_list\_ad\_groups).                                                                                                                                                                                                               |
| `name`          | string                     | Yes      | -           | Ad name (3-1000 characters).                                                                                                                                                                                                                                                                  |
| `status`        | string or SelectableOption | Yes      | -           | Ad status: 'active' or 'paused'.                                                                                                                                                                                                                                                              |
| `creative_type` | string or SelectableOption | No       | `chat_card` | Creative type. 'chat\_card' (the default) is a standard ad with its own image and URL. 'product\_ad\_template' is for ad groups in a product-feed campaign: the image and URL come from the feed items, and title/body/price support tokens like \{\{product.title}} and \{\{product.price}}. |
| `title`         | string                     | Yes      | -           | Creative title / headline (3-50 characters). Product template ads can use tokens, e.g. \{\{product.title}}.                                                                                                                                                                                   |
| `body`          | string                     | Yes      | -           | Creative body text (up to 100 characters). Product template ads can use tokens, e.g. \{\{product.body}}.                                                                                                                                                                                      |
| `price`         | string                     | No       | -           | Optional price text shown on the creative, e.g. '\$29.99' — or the \{\{product.price}} token on product template ads.                                                                                                                                                                         |
| `target_url`    | string                     | No       | -           | Destination URL the ad links to. Required for chat\_card ads; unused for product template ads (the URL comes from each feed item).                                                                                                                                                            |
| `image_url`     | string                     | No       | -           | Image for the ad creative. Accepts a Markifact file URL, a Google Drive share link, or a public image URL — it is downloaded and uploaded to OpenAI Ads automatically. chat\_card ads need this or file\_id; product template ads take images from the feed.                                  |
| `file_id`       | string                     | No       | -           | An already-uploaded OpenAI Ads file\_id to use for the creative instead of image\_url (get one with openai\_ads\_upload\_media). Only for chat\_card ads.                                                                                                                                     |

### SelectableOption

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

## Output

**Type**: `Dict`

Returns the created ad object exactly as returned by the OpenAI Ads API (id, name, status, creative, review, review\_status, created\_at, updated\_at).

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

**Example**:

```json theme={"dark"}
{
  "id": "ad_...",
  "name": "Planner launch card",
  "status": "active",
  "creative": {
    "type": "chat_card",
    "title": "Try the planner",
    "body": "All in one place.",
    "target_url": "https://example.com",
    "file_id": "file_..."
  },
  "review_status": "pending"
}
```
