/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove - Criteo Docs

Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove

cURL

curl --request POST \
  --url https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '\n{\n  "data": {\n    "attributes": {\n      "identifiers": [\n        "<string>"\n      ]\n    },\n    "type": "AddRemoveContactlist"\n  }\n}\n'```

### Python

```python
import requests

url = "https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove"

payload = { "data": {"attributes": { "identifiers": ["<string>"] }, "type": "AddRemoveContactlist"}}  
headers = {    
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

JavaScript

const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({data: {attributes: {identifiers: ['<string>']}, type: 'AddRemoveContactlist'}})
};

fetch('https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

PHP

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'data' => [
        'attributes' => [
                'identifiers' => [
                                '<string>'
                ]
        ],
        'type' => 'AddRemoveContactlist'
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

Go

package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove"

payload := strings.NewReader("{\n  \"data\": {\n    \"attributes\": {\n      \"identifiers\": [\n        \"<string>\"\n      ]\n    },\n    \"type\": \"AddRemoveContactlist\"\n  }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
    req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}

Unirest (Java)

HttpResponse<String> response = Unirest.post("https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"attributes\": {\n      \"identifiers\": [\n        \"<string>\"\n      ]\n    },\n    \"type\": \"AddRemoveContactlist\"\n  }\n}")
  .asString();

Ruby

require 'uri'
require 'net/http'

url = URI("https://api.criteo.com/2026-01/retail-media/audience-segments/{audience-segment-id}/contact-list/add-remove")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": {\n    \"attributes\": {\n      \"identifiers\": [\n        \"<string>\"\n      ]\n    },\n    \"type\": \"AddRemoveContactlist\"\n  }\n}"

response = http.request(request)
puts response.read_body

Response Example

{
  "type": "AddRemoveContactlistResult",
  "data": {
    "contactListId": 568708742535471100,
    "operation": "add",
    "requestDate": "2018-12-10T10:00:50.0000000+00:00",
    "identifierType": "madid",
    "nbValidIdentifiers": 7343,
    "nbInvalidIdentifiers": 13,
    "sampleInvalidIdentifiers": [
      "InvalidIdentifier"
    ]
  },
  "errors": [
    {
      "traceId": "667ac683ac797284.667ac683ac797284<:667ac683ac797284",
      "type": "availability",
      "code": "internal-error",
      "instance": "",
      "title": "Internal error"
    }
  ],
  "warnings": [
    {
      "traceId": "56ed4096-f96a-4944-8881-05468efe0ec9",
      "type": "deprecation",
      "code": "deprecated-field",
      "instance": "/audiences/314195",
      "title": "'nbValidIds' is deprecated",
      "detail": "The field 'nbValidIds' is deprecated please use 'nbValidIdentifiers'"
    }
  ]
}

Authorizations

Authorization

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

Body

Response

200 - application/json
Summary of created request