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

# Campaigns Endpoints

> View and manage all your campaigns

export const EndpointBadge = ({method = "GET", children}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-[#2AB673]"
    },
    POST: {
      bg: "mint-bg-[#3064E3]"
    },
    PUT: {
      bg: "mint-bg-[#C28C30]"
    },
    PATCH: {
      bg: "mint-bg-[#DA622B]"
    },
    DELETE: {
      bg: "mint-bg-[#CB3A32]"
    },
    API: {
      bg: "mint-bg-black"
    }
  };
  const key = method.toUpperCase();
  const styles = METHOD_STYLES[key] ?? METHOD_STYLES.API;
  return <div className="relative mt-7">
      <span className={`absolute -top-2 -left-2 z-10 ${styles.bg} text-white px-2.5 py-0.5 rounded-full text-xs font-bold tracking-wide`}>
        {key}
      </span>
      {children}
    </div>;
};

## Endpoints

<table>
  <thead>
    <tr>
      <th><p>Method</p></th>
      <th><p>Endpoint</p></th>
      <th><p>Description</p></th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td><p><b>POST</b></p></td>
      <td><p><code>/accounts/\{account-id}/campaigns</code></p></td>
      <td><p>Create a new campaign for the specified account.</p></td>
    </tr>

    <tr>
      <td><p><b>GET</b></p></td>
      <td><p><code>/accounts/\{account-id}/campaigns</code></p></td>
      <td><p>Retrieve all campaigns associated with the specified account.</p></td>
    </tr>

    <tr>
      <td><p><b>GET</b></p></td>
      <td><p><code>/campaigns/\{campaignId}</code></p></td>
      <td><p>Retrieve details of a specific campaign by its ID.</p></td>
    </tr>

    <tr>
      <td><p><b>PUT</b></p></td>
      <td><p><code>/campaigns/\{campaignId}</code></p></td>
      <td><p>Update details of a specific campaign by its ID.</p></td>
    </tr>
  </tbody>
</table>

<Info>
  **Create Operations:**

  * When using the `POST` method to create a resource, all Required fields must be included. Any Optional fields that are omitted will be set to their default values.

  **Update Operations:**

  * When using the `PUT` method to update a resource, all Write fields can be specified. Omitting any of these fields is treated as setting them to `null`, where applicable.
</Info>

***

## Campaign Attributes

| Attribute | Type | Writeable | Nullable | Description |
| - | - | :-: | :-: | - |
| `accountId` | string | N | N | Account ID. |
| `budget` | double | Y | Y | Total campaign budget. Must be ≥ 0. Preferred (uncapped) campaign types cannot have a budget. |
| `budgetRemaining` | double | N | Y | Remaining campaign budget. |
| `budgetSpent` | double | N | N | Amount the campaign has already spent. Must be ≥ 0. |
| `clickAttributionScope` | string | Y | Y | Post-click attribution scope. |
| `clickAttributionWindow` | string | Y | N | Post-click attribution window. |
| `companyName` | string | Y | Y | DSA field (EU marketplaces only). Name of the company associated with the ad. Max 255 characters. |
| `createdAt` | datetime | N | N | Timestamp of campaign creation, in UTC. |
| `dailyPacing` | double | Y | Y | Maximum daily spend for the campaign. |
| `drawableBalanceIds` | array\[string] | Y | N | Retailer budget balance IDs mapped to this campaign. Default: empty list. |
| `endDate` | datetime | Y | Y | Campaign end date. Campaign starts inactive if end date is in the past. |
| `isAutoDailyPacing` | boolean | Y | N | Whether automatic daily pacing is enabled. |
| `monthlyPacing` | double | Y | Y | Maximum monthly spend for the campaign. Resets at the start of each month (account timezone). |
| `name` | string | Y | N | Campaign name. Max 255 characters. |
| `onBehalfCompanyName` | string | Y | Y | On-behalf company name. Max 255 characters. |
| `promotedBrandIds` | array\[string] | N | N | List of promoted brand IDs. Default: empty list. |
| `retailerId` | integer | Y (create only) | Y | Retailer this campaign is associated with. Required for retailer budget campaigns. |
| `startDate` | datetime | Y | Y | Campaign start date. Defaults to creation timestamp. Campaign starts inactive if start date is not today or end date is in the past. |
| `status` | string | N | N | Campaign status. |
| `type` | string | Y | N | Campaign type. A value must be specified if this attribute is included. |
| `updatedAt` | datetime | N | N | Timestamp of last campaign update, in UTC. |
| `viewAttributionScope` | string | Y | Y | Post-view attribution scope. |
| `viewAttributionWindow` | string | Y | N | Post-view attribution window. |

(\*) *Required for create operations*

<Note>
  ### **Digital Service Act (DSA)**

  In compliance with the Digital Services Act (DSA), marketplaces within the European Union will receive information about the company name associated with each advertisement.
</Note>

***

## Create a Campaign

This endpoint creates a Sponsored Products (`type: auction`) or Onsite Display (`type: preferred`) campaign.

**Retailer budget vs Criteo budget:** Including `retailerId` in the request creates a retailer budget campaign. Omitting `retailerId` (or setting it to `null`) creates a standard Criteo budget campaign — `retailerId` will be `null` in the response.

**Balance mapping at create time:** You may optionally include `drawableBalanceIds` to map the campaign to one or more retailer budget balances at creation. All compatibility rules apply (same retailer, same billing type, same demand account). You can also map balances separately after creation using `POST /balances/{balanceId}/campaigns/append`.

<Warning>
  **Note on `403` vs `400`**

  A `403` on campaign create means the `retailerId` you set is not recognized as an authorized retailer for your account. A `400` with a specific mismatch code means the retailer is valid but incompatible with the balance you included (see [Error responses](#responses)).

  **Legacy version behavior (`2025-10` and earlier):** Returns `400` when attempting to create a retailer budget campaign.
</Warning>

<Warning>
  **Retailer Budgets Campaigns**

  When creating a campaign for a retailer-budget balance, `retailerId` must be provided and must match the `retailerId` of the balance. Mismatched values will return a `RetailerMismatchWithBalance` error. Learn more about Retailer budgets [here](/retail-media/docs/retailer-budgets).
</Warning>

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/accounts/{accountId}/campaigns
  ```
</EndpointBadge>

**Sample Request**

```bash cURL theme={null}
curl -L -X POST 'https://api.criteo.com/2026-01/retail-media/accounts/{accountId}/campaigns' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
-d '{
  "data": {
    "type": "Campaign",
    "attributes": {
      "name": "My Retailer Budget Campaign",
      "type": "auction",
      "retailerId": "123",
      "drawableBalanceIds": ["100000000000000001"],
      "startDate": "2026-06-01T00:00:00+00:00",
      "clickAttributionWindow": "30D",
      "viewAttributionWindow": "none",
      "clickAttributionScope": "sameSkuCategory",
      "viewAttributionScope": "sameSkuCategory",
      "isAutoDailyPacing": false
    }
  }
}'
```

**Sample Response**

```json expandable theme={null}
{
  "data": {
    "id": "100000000000000001",
    "type": "RetailMediaCampaignV202301",
    "attributes": {
      "accountId": "123",
      "promotedBrandIds": [],
      "budgetSpent": 0.0,
      "budgetRemaining": null,
      "status": "inactive",
      "createdAt": "2026-05-29T20:33:27+00:00",
      "updatedAt": "2026-05-29T20:33:27+00:00",
      "type": "auction",
      "drawableBalanceIds": ["100000000000000001"],
      "clickAttributionWindow": "30D",
      "viewAttributionWindow": "none",
      "retailerId": 123,
      "name": "My Retailer Budget Campaign",
      "budget": null,
      "monthlyPacing": null,
      "dailyPacing": null,
      "isAutoDailyPacing": false,
      "startDate": "2026-06-01T00:00:00+00:00",
      "endDate": null,
      "clickAttributionScope": "sameSkuCategory",
      "viewAttributionScope": "sameSkuCategory",
      "companyName": null,
      "onBehalfCompanyName": null
    }
  }
}
```

***

## Get All Campaigns by Account ID

This endpoint returns all campaigns for an account.

<Warning>
  As of `2026-01`, `retailerId` is included in each campaign's attributes. Use the `retailerId` query parameter to filter campaigns by retailer.

  **Legacy version behavior (`2025-10` and earlier):** Retailer budget campaigns are not returned; `retailerId` is not present in the attribute set.
</Warning>

Results are paginated using `pageIndex` and `pageSize` query parameters; if omitted, defaults to `0` and `25`, respectively. See [API Response](/criteo-apis/docs/api-response#pagination).

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/accounts/{accountId}/campaigns
  ```
</EndpointBadge>

**Sample Request**

```bash cURL theme={null}
curl -L -X GET 'https://api.criteo.com/2026-01/retail-media/accounts/{accountId}/campaigns' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>'
```

**Sample Response**

```json expandable theme={null}
{
    "metadata": {
        "totalItemsAcrossAllPages": 2533,
        "currentPageSize": 2,
        "currentPageIndex": 8,
        "totalPages": 153,
        "currentPageSize": 25,
        "currentPageIndex": 0,
        "totalPages": 102
    },
    "data": [
        {
            "id": "100000000000000001",
            "type": "RetailMediaCampaignV202301",
            "attributes": {
                "accountId": "123",
                "promotedBrandIds": [],
                "budgetSpent": 0.0,
                "budgetRemaining": null,
                "status": "inactive",
                "createdAt": "2026-05-29T20:00:47+00:00",
                "updatedAt": "2026-05-29T20:00:47+00:00",
                "type": "auction",
                "drawableBalanceIds": ["100000000000000002"],
                "clickAttributionWindow": "30D",
         	      "viewAttributionWindow": "none",
                "retailerId": 123,
                "name": "Sample Name",
                "budget": null,
                "monthlyPacing": null,
                "dailyPacing": null,
                "isAutoDailyPacing": false,
                "startDate": "2026-06-01T00:00:00+00:00",
                "endDate": null,
                "clickAttributionScope": "sameSkuCategory",
                "viewAttributionScope": "sameSkuCategory",
                "companyName": null,
                "onBehalfCompanyName": null
            }
        }
    ]
}
```

***

## Get a Specific Campaign

This endpoint retrieves the specified campaign.

<Warning>
  As of `2026-07`, `retailerId` is included in the response attributes. Retailer budget campaigns also surface `criteoPoNumber` and `retailerPoNumber` from the mapped balance.

  **Legacy version behavior (`2026-01` and earlier):** Returns `400` for retailer budget campaigns.
</Warning>

<EndpointBadge method="get">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/campaigns/{campaignId}
  ```
</EndpointBadge>

**Sample Request**

```bash cURL theme={null}
curl -L -X GET 'https://api.criteo.com/{version}/retail-media/campaigns/{campaignId}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>'
```

**Sample Response**

```json expandable theme={null}
{
    "data": {
        "id": "100000000000000001",
    "type": "RetailMediaCampaignV202301",
    "attributes": {
      "accountId": "123",
      "promotedBrandIds": [],
      "budgetSpent": 0.0,
      "budgetRemaining": null,
      "status": "inactive",
      "createdAt": "2026-05-29T20:00:47+00:00",
      "updatedAt": "2026-05-29T20:00:47+00:00",
      "type": "auction",
      "drawableBalanceIds": ["100000000000000002"],
      "clickAttributionWindow": "30D",
      "viewAttributionWindow": "none",
      "retailerId": 123,
      "name": "Sample Name",
      "budget": null,
      "isAutoDailyPacing": false,
      "startDate": "2026-06-01T00:00:00+00:00",
      "endDate": null,
      "clickAttributionScope": "sameSkuCategory",
      "viewAttributionScope": "sameSkuCategory",
      "companyName": null,
      "onBehalfCompanyName": null
    }
  }
}
```

***

## Update a Specific Campaign

This endpoint allows you to update a specified campaign. The following example demonstrates how to switch to an uncapped campaign budget and modify the post-view attribution window.

<Warning>
  **Legacy version behavior (`2025-10` and earlier):** Returns `400` for retailer budget campaigns.
</Warning>

<EndpointBadge method="put">
  ```http theme={null}
  https://api.criteo.com/{version}/retail-media/campaigns/{campaignId}
  ```
</EndpointBadge>

**Sample Request**

```bash cURL theme={null}
curl -L -X PUT 'https://api.criteo.com/2026-01/retail-media/campaigns/{campaignId}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
-d '{
  "data": {
    "type": "Campaign",
    "attributes": {
      "name": "Updated Campaign Name",
      "endDate": "2026-12-31T23:59:59+00:00"
    }
  }
}'
```

**Sample Response**

```json expandable theme={null}
{
  "data": {
    "id": "100000000000000001",
    "type": "RetailMediaCampaignV202301",
    "attributes": {
      "accountId": "123",
      "promotedBrandIds": [],
      "budgetSpent": 0.0,
      "budgetRemaining": null,
      "status": "inactive",
      "createdAt": "2026-05-29T20:00:47+00:00",
      "updatedAt": "2026-05-29T20:00:47+00:00",
      "type": "auction",
      "drawableBalanceIds": ["100000000000000002"],
      "clickAttributionWindow": "30D",
      "viewAttributionWindow": "none",
      "retailerId": 123,
      "name": "Sample Name",
      "budget": null,
      "isAutoDailyPacing": false,
      "startDate": "2026-06-01T00:00:00+00:00",
      "endDate": null,
      "clickAttributionScope": "sameSkuCategory",
      "viewAttributionScope": "sameSkuCategory",
      "companyName": null,
      "onBehalfCompanyName": null
    }
  }
}
```

***

## Responses

<Info>
  All validation errors on **campaign create** use `code: "validation-error"`.

  The error type is identified by a bracketed prefix in the `title` field.
</Info>

| Status | Title | Description |
| :- | :- | :- |
| 🟢 `200` | | Call completed with success |
| 🟢 `201` | | Campaign was created successfully |
| 🔴 `400` | `[retailer-id-mismatch]` | The `retailerId` on the campaign doesn't match the `retailerId` on one of the balances in `drawableBalanceIds`. Also returned when balances from multiple retailers are included. |
| 🔴 `400` | `[balance-type-mismatch]` | Billing type mismatch — e.g. retailer budget campaign with a Criteo budget balance. |
| 🔴 `400` | `[account-mismatch]` | The balance in `drawableBalanceIds` belongs to a different demand account than the campaign being created. |
| 🔴 `403` | `authorization-unknown` | The `retailerId` in the request is not recognized as an authorized retailer for this account. Use `GET /retailers/search` to discover eligible retailers first. |
| 🔴 `400` | Invalid `isAutoDailyPacing` | Cannot turn on `IsAutoDailyPacing` and add a `DailyPacing` value. `IsAutoDailyPacing` and `Daily Pacing` cannot be active at the same time. |
| 🔴 `400` | Invalid `Budget` | Budget is not allowed for the Preferred campaign. |
| 🔴 `400` | `RetailerMismatchWithBalance` | Campaign `retailerId` does not match the balance `retailerId`. Ensure the `retailerId` in campaign settings matches the `retailerId` on the balance you are associating. |
| 🔴 `400` | `BillingTypeMismatchWithBalance` | The billing type on the campaign doesn't match the billing type on the balance. |
| 🔴 `400` | `AccountMismatchWithBalance` | The balance in `drawableBalanceIds` does not belong to the request account. |
| 🔴 `400` | `RetailerMismatchWithCampaign` | The line item `targetRetailerId` does not match the campaign's `retailerId`. |

***

<br />
