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

# Bulk Mutate

> Fallback for creating or updating many OpenAI Ads campaigns, ad groups and ads in one Bulk API job (up to 1,000 operations, with validate_only)

Fallback for creating or updating many OpenAI Ads campaigns, ad groups and ads in one Bulk API job (up to 1,000 operations, with validate\_only). Use this only when no dedicated operation supports the change. If a focused operation exists, such as openai\_ads\_create\_campaign or openai\_ads\_update\_ad\_status, always use that dedicated operation instead. Bulk API access is enabled per ad account by OpenAI.

| | |
| - | - |
| **App** | OpenAI Ads |
| **Operation ID** | `openai_ads_bulk_mutate` |
| **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 |
| - | - | - | - | - |
| `operations` | array of object or string | No | - | 1 to 1,000 native Bulk API operations as objects or a JSON array. Each has a unique operation\_id, a type (campaign.create, campaign.update, ad\_group.create, ad\_group.update, ad.create, ad.update) and an input object. Creates need a unique idempotency\_key and can reference parents created in the same job through campaign\_idempotency\_key / ad\_group\_idempotency\_key; updates need target\_resource\_id. Amounts are micros. Example: \[\{"operation\_id": "pause-ad", "type": "ad.update", "target\_resource\_id": "ad\_501", "input": \{"status": "paused"}}, \{"operation\_id": "new-campaign", "type": "campaign.create", "idempotency\_key": "spring-campaign", "input": \{"name": "Spring launch", "max\_budget\_micros": 100000000, "budget\_type": "lifetime", "billing\_event\_type": "click", "status": "paused"}}] |
| `validate_only` | boolean | No | `False` | true checks fields and dependencies without changing anything. It does not check update targets, image fetching or entity limits. |
| `partial_failure` | boolean | No | `True` | true (default) keeps running independent operations after an error; false skips later operations. Completed operations are never rolled back. |
| `idempotency_key` | string | No | - | Optional key for this job request. Reuse it with the same operations to retry after an uncertain response; use a new key to rerun a failed job. |
| `job_id` | string | No | - | An earlier bulk job id (blkmtnjob\_...) to read its status and results instead of submitting operations, e.g. when a previous run returned before the job finished. |

## Output

**Type**: `Dict`

Returns the job (id, status, operation\_count, created\_at, completed\_at) plus results: one entry per operation with operation\_id, type, status (created, updated, validated, failed, skipped), resource\_id and error fields. A note with the job id is added when the job is still running.

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

**Example**:

```json theme={"dark"}
{
  "id": "blkmtnjob_...",
  "status": "completed",
  "operation_count": 1,
  "results": [
    {
      "operation_id": "pause-ad",
      "type": "ad.update",
      "status": "updated",
      "resource_id": "ad_501",
      "error": null
    }
  ]
}
```


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