GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelogLog In

Managing Audiences

Creating A New Audience

A new audience can be created for a specific advertiser by making a POST call to the audience endpoint. The request body should specify the advertiser id, name, and description of the new audience.

https://api.criteo.com/2021-07/audiences
{
  "data": {
    "type": "Audience",
    "attributes": {
        "advertiserId": "1",
        "name": "audienceX",
        "description": "audience X targets people who like shoes"
    }
  }
}

The API will return a unique audience id associated with the newly created audience.

{
    "data": {
      "id": "12",
      "type": "Audience"
    },
    "errors": [],
    "warnings": []
}

 

Deleting An Audience

An audience can be deleted by specifying the audience id in the URL path of a DELETE call to the audiences endpoint.

https://api.criteo.com/2021-07/audiences/{audienceId}

The API will return an array with the audience ID that was deleted.

{
    "data": {
      "id": "12",
      "type": "Audience"
    },
    "errors": [],
    "warnings": []
}

 

Updating Audience Metadata

The audience name and description can be updated by making a PATCH request to the audiences endpoint with a specific audience ID in the URL path. The request body should include the updated name and description of the audience.

https://api.criteo.com/2021-07/audiences/{audienceId}
{
  "data": {
    "type": "Audience",
    "attributes": {
        "name": "audienceY",
        "description": "audience Y targets people who like pants"
    }
  }
}

The API will return an array of the updated name and description of the specified audience ID.

{
    "data": {
      "type": "Audience",
      "id": "12",
      "attributes": {
          "name": "audienceY",
          "description": "audience Y targets people who like pants"
      }
    },
    "errors": [],
    "warnings": []
}

What’s Next

Learn how to manage the users in your audiences