> ## 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 Conversion Event

> Create an OpenAI Ads conversion event setting connected to one conversion source (pixel)

Create an OpenAI Ads conversion event setting connected to one conversion source (pixel). Standard events like order\_created can then be used as oCPC optimization goals via conversion\_event\_setting\_ids on campaign creation; custom events are reporting-only.

|                       |                                      |
| --------------------- | ------------------------------------ |
| **App**               | OpenAI Ads                           |
| **Operation ID**      | `openai_ads_create_conversion_event` |
| **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                                                                                                                                                                    |
| ------------------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `name`              | string                     | Yes      | -       | Display name for the conversion event setting.                                                                                                                                 |
| `event_type`        | string or SelectableOption | Yes      | -       | Conversion event type. Standard events (e.g. 'order\_created', 'lead\_created') can be used as oCPC optimization goals; 'custom' events cannot and need a custom\_event\_name. |
| `custom_event_name` | string                     | No       | -       | Name of the custom event. Required when event\_type is 'custom'.                                                                                                               |
| `source_id`         | string or SelectableOption | Yes      | -       | Exactly one conversion source ID to connect (the cds\_/clidsrc\_ `id` from openai\_ads\_list\_pixels or openai\_ads\_create\_pixel, not the pixel\_id).                        |

### SelectableOption

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

## Output

**Type**: `Dict`

Returns the created event setting exactly as returned by the OpenAI Ads API (id, name, event\_type, custom\_event\_name, attribution\_window\_days, source\_ids, sources, campaigns, archived, version).

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

**Example**:

```json theme={"dark"}
{
  "id": "ces_...",
  "name": "Purchases",
  "event_type": "order_created",
  "attribution_window_days": 30,
  "source_ids": [
    "cds_..."
  ]
}
```
