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

# Audiences Endpoints

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>;
};

## **Introduction**

Audiences give the ability to advertisers to define subsets of retailer visitors to be targeted in their campaigns.

Audiences are built of one or multiple audience segments that can be combined using logical [Algebra Nodes](/retail-media/docs/algebra-nodes) to define target campaigns' audiences.

<Warning>
  The corresponding App should have the "**Audiences Manage**" permission enabled for all endpoints on this page.
</Warning>

<Warning>
  **Note on Audience Computation**

  Audience updates are processed daily at 0h UTC and 12h UTC and can take around 5 hours to reflect on a live campaign. This is important for audiences that are frequently updated as changes should be ready for processing prior to these two times.
</Warning>

<Info>
  The endpoints and functionalities covered in this **page refers to features available exclusively in Preview** for now, which doesn't mean that they are the only ones available for this domain/scope.

  For more complete information about our API capabilities, check the Stable version in [Welcome to Criteo Retail Media API](/retail-media/docs/welcome-to-criteo)
</Info>

<Info>
  **Partial Approvals**

  Bulk operations (`create`, `update`, `delete`) use a **partial approval model**. Even if some items in the request fail, the response will return `200 OK`. Any failed items will be listed in the `error` section of the response with [an error code and details](/retail-media/v2026-preview/docs/audiences-endpoints#errors).

  Examples of possible error codes:

  * `audience-not-found` → Audience is not found.
  * `name-must-be-unique` → Audience name must be unique.
  * `name-must-not-be-empty` → Audience name property must not be empty.

  This list is not exhaustive. Additional warnings may be returned depending on the request context.
</Info>

***

## Endpoints

<table>
  <thead>
    <tr>
      <th>
        <p>
          Verb
        </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}/audiences/create
          </code>
        </p>
      </td>

      <td>
        <p>
          Create audience(s)
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <b>
            PATCH
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /accounts/\{account-id}/audiences
          </code>
        </p>
      </td>

      <td>
        <p>
          Update audience(s)
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <b>
            POST
          </b>
        </p>
      </td>

      <td>
        <p>
          <code>
            /accounts/\{account-id}/audiences/delete
          </code>
        </p>
      </td>

      <td>
        <p>
          Delete audience(s)
        </p>
      </td>
    </tr>
  </tbody>
</table>

***

## Audience Attributes

<table>
  <thead>
    <tr>
      <th>
        <p>
          Attribute
        </p>
      </th>

      <th>
        <p>
          Data Type
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          <code>
            id
          </code>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Audience ID, generated internally by Criteo
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            name
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Audience name, arbitrary and changeable. Must be unique in the account level.
        </p>

        <p>
          Accepted values: up to 256 chars string
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            description
          </code>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Audience description, arbitrary and changeable.
        </p>

        <p>
          Accepted values: up to 500 chars string
        </p>

        <p>
          Writeable? Y / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            accountId
          </code>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Account ID associated with the Audience, generated internally by Criteo
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            retailerId
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          Retailer ID associated with the Audience, generated internally by Criteo. Once created, the associated retailer cannot be changed
        </p>

        <p>
          Accepted values: string of int64
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            algebra
          </code>

          <span>\*</span>
        </p>
      </td>

      <td>
        <p>
          object
        </p>
      </td>

      <td>
        <p>
          Algebra node with the definition of how the different audience segments are combined to create the audience, using logical operators

          <code>
            and
          </code>

          ,

          <code>
            or
          </code>

          and

          <code>
            not
          </code>
        </p>

        <p>
          Accepted values: see Algebra Nodes
        </p>

        <p>
          Writeable? Y / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            channels
          </code>
        </p>
      </td>

      <td>
        <p>
          list\\
        </p>
      </td>

      <td>
        <p>
          Channels associated to the audience
        </p>

        <p>
          Accepted values:

          <code>
            Onsite
          </code>

          ,

          <code>
            Offsite
          </code>
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            createdAt
          </code>
        </p>
      </td>

      <td>
        <p>
          timestamp
        </p>
      </td>

      <td>
        <p>
          Timestamp of Audience creation, in UTC
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss.msZ
          </code>

          (in ISO-8601 )
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            createdById
          </code>
        </p>
      </td>

      <td>
        <p>
          string
        </p>
      </td>

      <td>
        <p>
          User ID who created the Audience (

          <code>
            null
          </code>

          if created by a service)
        </p>

        <p>
          Accepted values: string
        </p>

        <p>
          Writeable? N / Nullable? Y
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          <code>
            updatedAt
          </code>
        </p>
      </td>

      <td>
        <p>
          timestamp
        </p>
      </td>

      <td>
        <p>
          Timestamp of last Audience update, in UTC
        </p>

        <p>
          Accepted values:

          <code>
            yyyy-mm-ddThh:mm:ss.msZ
          </code>

          (in ISO-8601)
        </p>

        <p>
          Writeable? N / Nullable? N
        </p>
      </td>
    </tr>
  </tbody>
</table>

(\*) *Required for create operations*

<Info>
  **Field Definitions**

  * **Writeable (Y/N)**: Indicates if the field can be modified in requests.
  * **Nullable (Y/N)**: Indicates if the field can accept null/empty values.
  * **Primary Key**: A unique, immutable identifier of the entity, generated internally by Criteo. Primary keys are typically ID fields (e.g., `retailerId`, `campaignId`, `lineItemId`) and are usually required in the URL path.
</Info>

***

## Create Audiences

This endpoint allows the creation of one or multiple audiences in a single request.

Each audience must contain the required attributes marked above and is built of one or multiple segments.

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/preview/retail-media/accounts/{account-id}/audiences/create
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```json JSON expandable theme={null}
  curl -L -X POST 'https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/create' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
  -d '{
    "data": [
      {
        "attributes": {
          "name": "Audience made of CRM users list",
          "description": "Simple audience made of a single segment of CRM list",
          "retailerId": "1234",
          "algebra": {
            "audienceSegmentId": "735693505849913344"
          }
        }
      },
      {
        "attributes": {
          "name": "Audience of recent users from retailer not in CRM list",
          "description": "Combination of segments from User Events but not in CRM list",
          "retailerId": "4567",
          "algebra": {
            "and": [
              {
                "or": [
                  {
                    "audienceSegmentId": "738406687217913856" 
                  },
                  {
                    "audienceSegmentId": "738406688413290496"
                  }
                ]
              },
              {
                "not": { 
                  "audienceSegmentId": "735693505849913344" 
                }
              }
            ]
          }
        }
      }
    ]
  }'
  ```

  ```python Python expandable theme={null}
  import http.client
  import json
  conn = http.client.HTTPSConnection("api.criteo.com")
  payload = json.dumps({
    "data": [
      {
        "attributes": {
          "name": "Audience made of CRM users list",
          "description": "Simple audience made of a single segment of CRM list",
          "retailerId": "1234",
          "algebra": {
            "audienceSegmentId": "735693505849913344"
          }
        }
      },
      {
        "attributes": {
          "name": "Audience of recent users from retailer not in CRM list",
          "description": "Combination of segments from User Events but not in CRM list",
          "retailerId": "4567",
          "algebra": {
            "and": [
              {
                "or": [
                  {
                    "audienceSegmentId": "738406687217913856" 
                  },
                  {
                    "audienceSegmentId": "738406688413290496"
                  }
                ]
              },
              {
                "not": { 
                  "audienceSegmentId": "735693505849913344" 
                }
              }
            ]
          }
        }
      }
    ]
  })
  headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer &lt;TOKEN&gt;'
  }
  conn.request("POST", "https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/create", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, '{"data":[{"attributes":{"name":"Audience made of CRM users list","description":"Simple audience made of a single segment of CRM list","retailerId":"1234","algebra":{"audienceSegmentId":"735693505849913344"}}},{"attributes":{"name":"Audience of recent users from retailer not in CRM list","description":"Combination of segments from User Events but not in CRM list","retailerId":"4567","algebra":{"and":[{"or":[{"audienceSegmentId":"738406687217913856"},{"audienceSegmentId":"738406688413290496"}]},{"not":{"audienceSegmentId":"735693505849913344"}}]}}}]}');
  Request request = new Request.Builder()
    .url("https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/create")
    .method("POST", body)
    .addHeader("Content-Type", "application/json")
    .addHeader("Accept", "application/json")
    .addHeader("Authorization", "Bearer &lt;TOKEN&gt;")
    .build();
  Response response = client.newCall(request).execute();
  ```

  ```php PHP theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/create');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer &lt;TOKEN&gt;'
  ));
  $request->setBody('{"data":[{"attributes":{"name":"Audience made of CRM users list","description":"Simple audience made of a single segment of CRM list","retailerId":"1234","algebra":{"audienceSegmentId":"735693505849913344"}}},{"attributes":{"name":"Audience of recent users from retailer not in CRM list","description":"Combination of segments from User Events but not in CRM list","retailerId":"4567","algebra":{"and":[{"or":[{"audienceSegmentId":"738406687217913856"},{"audienceSegmentId":"738406688413290496"}]},{"not":{"audienceSegmentId":"735693505849913344"}}]}}}]}');
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response**

```json expandable theme={null}
{
    "data": [
        {
            "id": "740206991503921152",
            "type": "RetailMediaAudience",
            "attributes": {
                "accountId": "625702934721171442",
                "name": "Audience made of CRM users list",
                "description": "Simple audience made of a single segment of CRM list",
                "retailerId": "1234",
                "createdById": "514277",
                "createdAt": "2025-08-04T13:31:36.84Z",
                "updatedAt": "2025-08-04T13:31:36.84Z",
                "channels": [
                    "Onsite",
                    "Offsite"
                ],
                "algebra": {
                    "audienceSegmentId": "735693505849913344"
                }
            }
        },
        {
            "id": "740200271713996800",
            "type": "RetailMediaAudience",
            "attributes": {
                "accountId": "625702934721171442",
                "name": "Audience of recent users from retailer not in CRM list",
                "description": "Combination of segments from User Events but not in CRM list",
                "retailerId": "4567",
                "createdById": "514277",
                "createdAt": "2025-08-04T13:31:36.84Z",
                "updatedAt": "2025-08-04T13:31:36.84Z",
                "channels": [
                    "Offsite"
                ],
                "algebra": {
                    "and": [
                        {
                            "or": [
                                {
                                    "audienceSegmentId": "738406687217913856"
                                },
                                {
                                    "audienceSegmentId": "738406688413290496"
                                }
                            ]
                        },
                        {
                            "not": {
                                "audienceSegmentId": "735693505849913344"
                            }
                        }
                    ]
                }
            }
        }
    ],
    "warnings": [],
    "errors": []
}
```

***

## Update Audiences

This endpoint allows the modification of one or multiple audiences in a single request.

<EndpointBadge method="patch">
  ```http theme={null}
  https://api.criteo.com/preview/retail-media/accounts/{account-id}/audiences
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```json JSON expandable theme={null}
  curl -L -X PATCH 'https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
  -d '{
    "data": [
      {
        "id": "740219868425748480",
        "type": "RetailMediaAudience",
        "attributes": {
          "name": "Audience made of CRM users list (new name)",
          "description": {
            "value": "Simple audience made of a single segment of CRM list (new description)"
          },
          "algebra": {
            "audienceSegmentId": "735693505849913344"
          }
        }
      },
      {
        "id": "740200271713996800",
        "type": "RetailMediaAudience",
        "attributes": {
          "name": "Audience of recent users from retailer not in CRM list (new name)",
         "description": {
            "value": "Combination of segments from User Events but not in CRM list (new description)"
          },
          "retailerId": "4567",
          "algebra": {
            "and": [
              {
                "or": [
                  {
                    "audienceSegmentId": "738406687217913856" 
                  },
                  {
                    "audienceSegmentId": "738406688413290496"
                  }
                ]
              },
              {
                "not": { 
                  "audienceSegmentId": "735693505849913344" 
                }
              }
            ]
          }
        }
      }
    ]
  }'
  ```

  ```python Python expandable theme={null}
  import http.client
  import json
  conn = http.client.HTTPSConnection("api.criteo.com")
  payload = json.dumps({
    "data": [
      {
        "id": "740219868425748480",
        "type": "RetailMediaAudience",
        "attributes": {
          "name": "Audience made of CRM users list (new name)",
          "description": "Simple audience made of a single segment of CRM list (new description)",
          "retailerId": "1234",
          "algebra": {
            "audienceSegmentId": "735693505849913344"
          }
        }
      },
      {
        "id": "740200271713996800",
        "type": "RetailMediaAudience",
        "attributes": {
          "name": "Audience of recent users from retailer not in CRM list (new name)",
          "description": "Combination of segments from User Events but not in CRM list (new description)",
          "retailerId": "4567",
          "algebra": {
            "and": [
              {
                "or": [
                  {
                    "audienceSegmentId": "738406687217913856" 
                  },
                  {
                    "audienceSegmentId": "738406688413290496"
                  }
                ]
              },
              {
                "not": { 
                  "audienceSegmentId": "735693505849913344" 
                }
              }
            ]
          }
        }
      }
    ]
  })
  headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer &lt;TOKEN&gt;'
  }
  conn.request("PATCH", "https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, '{"data":[{"id":"740219868425748480","type":"RetailMediaAudience","attributes":{"name":"Audience made of CRM users list (new name)","description":"Simple audience made of a single segment of CRM list (new description)","retailerId":"1234","algebra":{"audienceSegmentId":"735693505849913344"}}},{"id":"740200271713996800","type":"RetailMediaAudience","attributes":{"name":"Audience of recent users from retailer not in CRM list (new name)","description":"Combination of segments from User Events but not in CRM list (new description)","retailerId":"4567","algebra":{"and":[{"or":[{"audienceSegmentId":"738406687217913856"},{"audienceSegmentId":"738406688413290496"}]},{"not":{"audienceSegmentId":"735693505849913344"}}]}}}]}');
  Request request = new Request.Builder()
    .url("https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences")
    .method("PATCH", body)
    .addHeader("Content-Type", "application/json")
    .addHeader("Accept", "application/json")
    .addHeader("Authorization", "Bearer &lt;TOKEN&gt;")
    .build();
  Response response = client.newCall(request).execute();
  ```

  ```php PHP theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences');
  $request->setMethod(HTTP_Request2::METHOD_PATCH);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer &lt;TOKEN&gt;'
  ));
  $request->setBody('{"data":[{"id":"740219868425748480","type":"RetailMediaAudience","attributes":{"name":"Audience made of CRM users list (new name)","description":"Simple audience made of a single segment of CRM list (new description)","retailerId":"1234","algebra":{"audienceSegmentId":"735693505849913344"}}},{"id":"740200271713996800","type":"RetailMediaAudience","attributes":{"name":"Audience of recent users from retailer not in CRM list (new name)","description":"Combination of segments from User Events but not in CRM list (new description)","retailerId":"4567","algebra":{"and":[{"or":[{"audienceSegmentId":"738406687217913856"},{"audienceSegmentId":"738406688413290496"}]},{"not":{"audienceSegmentId":"735693505849913344"}}]}}}]}');
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response**

```json expandable theme={null}
{
    "data": [
        {
            "id": "740219868425748480",
            "type": "RetailMediaAudience",
            "attributes": {
                "accountId": "625702934721171442",
                "name": "Audience made of CRM users list (new name)",
                "description": {
      					  "value": "Simple audience made of a single segment of CRM list (new description)"
   					 	  },
                "createdById": "514277",
                "createdAt": "2025-08-04T14:49:29.04Z",
                "updatedAt": "2025-08-04T14:54:20.38Z",
                "channels": [
                    "Onsite",
                    "Offsite"
                ],
                "algebra": {
                    "audienceSegmentId": "735693505849913344"
                }
            }
        },
        {
            "id": "740200271713996800",
            "type": "RetailMediaAudience",
            "attributes": {
                "accountId": "625702934721171442",
                "name": "Audience of recent users from retailer not in CRM list (new name)",
                "description": {
      					  "value": "Combination of segments from User Events but not in CRM list (new description)"
   					 	  },
                "retailerId": "4567",
                "createdById": "514277",
                "createdAt": "2025-08-04T13:31:36.84Z",
                "updatedAt": "2025-08-04T14:54:20.38Z",
                "channels": [
                    "Offsite"
                ],
                "algebra": {
                    "and": [
                        {
                            "or": [
                                {
                                    "audienceSegmentId": "738406687217913856"
                                },
                                {
                                    "audienceSegmentId": "738406688413290496"
                                }
                            ]
                        },
                        {
                            "not": {
                                "audienceSegmentId": "735693505849913344"
                            }
                        }
                    ]
                }
            }
        }
    ],
    "warnings": [],
    "errors": []
}
```

***

## Delete Audiences

This endpoint enables clients to delete one or multiple audiences in a single request.

<EndpointBadge method="post">
  ```http theme={null}
  https://api.criteo.com/preview/retail-media/accounts/{account-id}/audiences/delete
  ```
</EndpointBadge>

**Sample Request**

<CodeGroup>
  ```json JSON theme={null}
  curl -L -X POST 'https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/delete' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer <MY_ACCESS_TOKEN>' \
  -d '{
    "data": [
      {
        "id": "740197499249692672",
        "type": "RetailMediaAudience",
        "attributes": {}
      }
    ]
  }'
  ```

  ```python Python theme={null}
  import http.client
  import json
  conn = http.client.HTTPSConnection("api.criteo.com")
  payload = json.dumps({
    "data": [
      {
        "id": "740197499249692672",
        "type": "RetailMediaAudience",
        "attributes": {}
      },
      {
        "id": "740206991503921152",
        "type": "RetailMediaAudience",
        "attributes": {}
      }
    ]
  })
  headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer &lt;TOKEN&gt;'
  }
  conn.request("POST", "/preview/retail-media/accounts/625702934721171442/audiences/delete", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
  ```

  ```java Java theme={null}
  OkHttpClient client = new OkHttpClient().newBuilder()
    .build();
  MediaType mediaType = MediaType.parse("application/json");
  RequestBody body = RequestBody.create(mediaType, '{"data":[{"id":"740197499249692672","type":"RetailMediaAudience","attributes":{}},{"id":"740206991503921152","type":"RetailMediaAudience","attributes":{}}],"warnings":[],"errors":[]}');
  Request request = new Request.Builder()
    .url("https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/delete")
    .method("POST", body)
    .addHeader("Content-Type", "application/json")
    .addHeader("Accept", "application/json")
    .addHeader("Authorization", "Bearer &lt;TOKEN&gt;")
    .build();
  Response response = client.newCall(request).execute();
  ```

  ```php PHP theme={null}
  <?php
  require_once 'HTTP/Request2.php';
  $request = new HTTP_Request2();
  $request->setUrl('https://api.criteo.com/preview/retail-media/accounts/625702934721171442/audiences/delete');
  $request->setMethod(HTTP_Request2::METHOD_POST);
  $request->setConfig(array(
    'follow_redirects' => TRUE
  ));
  $request->setHeader(array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer &lt;TOKEN&gt;'
  ));
  $request->setBody('{"data":[{"id":"740197499249692672","type":"RetailMediaAudience","attributes":{}},{"id":"740206991503921152","type":"RetailMediaAudience","attributes":{}}],"warnings":[],"errors":[]}');
  try {
    $response = $request->send();
    if ($response->getStatus() == 200) {
      echo $response->getBody();
    }
    else {
      echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
      $response->getReasonPhrase();
    }
  }
  catch(HTTP_Request2_Exception $e) {
    echo 'Error: ' . $e->getMessage();
  }
  ```
</CodeGroup>

**Sample Response (200)**

```json theme={null}
{
    "data": [
        {
            "id": "740197499249692672",
            "type": "RetailMediaAudience",
            "attributes": {}
        }
    ],
    "warnings": [],
    "errors": []
}
```

***

## Responses

<table>
  <thead>
    <tr>
      <th>
        <p>
          Responses
        </p>
      </th>

      <th>
        <p>
          Description
        </p>
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <p>
          🔵
        </p>

        <p>
          <code>
            200
          </code>
        </p>
      </td>

      <td>
        <p>
          Success. All audiences operations were performed successfully; some warnings/errors may be returned inline.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴
        </p>

        <p>
          <code>
            400
          </code>
        </p>
      </td>

      <td>
        <p>
          Bad request. Check request body formatting or missing required parameters.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴
        </p>

        <p>
          <code>
            401
          </code>
        </p>
      </td>

      <td>
        <p>
          Authentication error. Verify the API token.
        </p>
      </td>
    </tr>

    <tr>
      <td>
        <p>
          🔴
        </p>

        <p>
          <code>
            403
          </code>
        </p>
      </td>

      <td>
        <p>
          Forbidden. The API client is not authorized to access this resource.
        </p>
      </td>
    </tr>
  </tbody>
</table>

***

## Errors and warnings

### Request Structure Errors

#### `empty-data-object`

**Error**: Cannot have an empty data object\
**Message**: The request must have at least one element in the data object.

***

#### `empty-attributes-object`

**Error**: Cannot have an empty attributes object\
**Message**: The request must have the attributes object provided.

***

#### `non-parsable-id`

**Error**: One or more IDs cannot be parsed\
**Message**: All IDs in the audience object must be a valid numerical ID.

***

#### `duplicate-id`

**Error**: Audience ID cannot be duplicated\
**Message**: The data object must not have multiple audience objects with the same ID.

***

#### `invalid-audience-type`

**Error**: Audience type is invalid\
**Message**: `abcdef` is not a valid audience type.

***

#### `payload-too-big`

**Error**: Cannot create more than 10 audiences at a time\
**Message**: Each request must have at most 10 audience objects.

***

#### `multiple-algebra-operators`

**Error**: Cannot have an algebra node with multiple operators defined\
**Message**: Each algebra node must have exactly one operator defined.

***

#### `audience-algebra-cannot-be-null-or-empty`

**Error**: Algebra cannot be null or empty\
**Message**: You must provide a definition for the algebra.

***

#### `audience-algebra-too-deep`

**Error**: Audience algebra too deep\
**Message**: The audience algebra tree cannot have a depth greater than 10.

***

#### `audience-algebra-has-too-many-segments`

**Error**: Audience algebra has too many segments\
**Message**: The audience algebra can include at most 10 segments defined inside.

***

### Validation Errors

#### `duplicate-name`

**Error**: Cannot have duplicated audience names\
**Message**: Each audience in the request must have a unique name.

***

#### `name-must-not-be-empty`

**Error**: Audience name property must not be empty\
**Message**: Cannot have an empty name in a `create audience` entity.

***

#### `name-must-not-be-too-long`

**Error**: Audience name property must not be too long\
**Message**: Audience names must be no longer than 10 characters.

***

#### `name-must-be-unique`

**Error**: Audience name must be unique\
**Message**: Another audience exists with the name: `abcdef`.

***

#### `audiences-limit-reached`

**Error**: Too many audiences\
**Message**: Advertiser(s) 30, 40 have reached the number of allowed audiences.

***

#### `audience-algebra-must-be-limited`

**Error**: Audience algebra must be limited\
**Message**: The audience algebra does not limit the amount of users it targets.

***

#### `audience-algebra-and-or-nodes-must-include-more-than-one-node`

**Error**: "And"/"or" nodes must include more than one node\
**Message**: The audience algebra "and" and "or" nodes must include more than one node, otherwise use an `audienceSegmentId` node.

***

#### `audience-channel-must-be-valid`

**Error**: Audience channel must be valid\
**Message**: The audience's algebra contains incompatible segment channels.

***

#### `audience-channel-must-match-line-item-channel`

**Error**: Audience channel must match line item channel\
**Message**: Your audience algebra contains segments which are incompatible with one or more line items.

***

#### `audience-retailer-must-match-segment-retailers`

**Error**: Audience retailer must match segment retailers\
**Message**: The segments: 30, 40 don't match the audience retailer. You must include only segments with the same retailer as the audience.

***

#### `audience-must-contain-only-existing-segments`

**Error**: Audience must contain only existing segments\
**Message**: The segments: 30, 40 don't exist. You must include only existing segments.

***

#### `audience-must-not-be-used-in-line-item`

**Error**: Audience must not be used in a line item\
**Message**: The audience must be removed from all line items to be able to delete it.

***

### Account & Retailer Errors

#### `account-must-exist`

**Error**: Account must exist\
**Message**: The account used must exist.

***

#### `account-must-be-active`

**Error**: Account must be active\
**Message**: The account used must be active.

***

#### `account-must-be-supply`

**Error**: Account must be supply\
**Message**: The account used must be a supply account.

***

#### `retailer-must-be-authorized`

**Error**: Retailer must be authorized\
**Message**: The retailer associated with the account must be authorized.

***

#### `retailer-must-be-live`

**Error**: Retailer must be live\
**Message**: The retailer used must be live.

***

### Pagination Errors

#### `pagination-is-required`

**Error**: Pagination is required\
**Message**: Pagination is required when no entity IDs are provided in the filters.

***

#### `pagination-limit-cannot-be-zero`

**Error**: Pagination limit cannot be zero\
**Message**: Pagination limit must be greater than 0 when offset is positive.

***

#### `pagination-limit-invalid`

**Error**: Pagination limit is invalid\
**Message**: Pagination limit must be a positive number lower than 10 (current limit set to 10).

***

#### `pagination-offset-invalid`

**Error**: Pagination offset is invalid\
**Message**: Pagination offset must be a positive number.

***

<br />

<br />

## What's next

* [Audience Segments Endpoints](/retail-media/v2026-preview/docs/audience-segments)
* [Audiences Size](/retail-media/v2026-preview/docs/audience-size)
* [Audience Segments Size](/retail-media/v2026-preview/docs/audience-segments-size)
