Skip to main content
POST
/
2026-01
/
marketing-solutions
/
ad-sets
/2026-01/marketing-solutions/ad-sets
curl --request POST \
  --url https://api.criteo.com/2026-01/marketing-solutions/ad-sets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "data": {
    "attributes": {
      "name": "test adset",
      "datasetId": "108002",
      "campaignId": "358313",
      "objective": "conversions",
      "schedule": {
        "startDate": "2026-04-04T16:21:06.3809615+02:00",
        "endDate": "2026-04-13T16:21:06.3809642+02:00"
      },
      "bidding": {
        "costController": "dailyBudget"
      },
      "targeting": {
        "deliveryLimitations": {
          "environments": [
            "web"
          ],
          "devices": [
            "desktop"
          ],
          "operatingSystems": [
            "android"
          ]
        },
        "geoLocation": {
          "countries": {
            "operand": "in",
            "values": [
              "FR",
              "IT"
            ]
          }
        },
        "frequencyCapping": {
          "frequency": "daily",
          "maximumImpressions": 1000
        }
      },
      "budget": {
        "budgetStrategy": "capped",
        "budgetRenewal": "weekly",
        "budgetDeliverySmoothing": "standard",
        "budgetDeliveryWeek": "mondayToSunday",
        "budgetAmount": 1000
      },
      "trackingCode": "Test123",
      "mediaType": "display",
      "attributionConfiguration": {
        "attributionMethod": "criteoAttribution"
      }
    },
    "type": "AdSet"
  }
}
'
import requests

url = "https://api.criteo.com/2026-01/marketing-solutions/ad-sets"

payload = { "data": {
        "attributes": {
            "name": "test adset",
            "datasetId": "108002",
            "campaignId": "358313",
            "objective": "conversions",
            "schedule": {
                "startDate": "2026-04-04T16:21:06.3809615+02:00",
                "endDate": "2026-04-13T16:21:06.3809642+02:00"
            },
            "bidding": { "costController": "dailyBudget" },
            "targeting": {
                "deliveryLimitations": {
                    "environments": ["web"],
                    "devices": ["desktop"],
                    "operatingSystems": ["android"]
                },
                "geoLocation": { "countries": {
                        "operand": "in",
                        "values": ["FR", "IT"]
                    } },
                "frequencyCapping": {
                    "frequency": "daily",
                    "maximumImpressions": 1000
                }
            },
            "budget": {
                "budgetStrategy": "capped",
                "budgetRenewal": "weekly",
                "budgetDeliverySmoothing": "standard",
                "budgetDeliveryWeek": "mondayToSunday",
                "budgetAmount": 1000
            },
            "trackingCode": "Test123",
            "mediaType": "display",
            "attributionConfiguration": { "attributionMethod": "criteoAttribution" }
        },
        "type": "AdSet"
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    data: {
      attributes: {
        name: 'test adset',
        datasetId: '108002',
        campaignId: '358313',
        objective: 'conversions',
        schedule: {
          startDate: '2026-04-04T16:21:06.3809615+02:00',
          endDate: '2026-04-13T16:21:06.3809642+02:00'
        },
        bidding: {costController: 'dailyBudget'},
        targeting: {
          deliveryLimitations: {environments: ['web'], devices: ['desktop'], operatingSystems: ['android']},
          geoLocation: {countries: {operand: 'in', values: ['FR', 'IT']}},
          frequencyCapping: {frequency: 'daily', maximumImpressions: 1000}
        },
        budget: {
          budgetStrategy: 'capped',
          budgetRenewal: 'weekly',
          budgetDeliverySmoothing: 'standard',
          budgetDeliveryWeek: 'mondayToSunday',
          budgetAmount: 1000
        },
        trackingCode: 'Test123',
        mediaType: 'display',
        attributionConfiguration: {attributionMethod: 'criteoAttribution'}
      },
      type: 'AdSet'
    }
  })
};

fetch('https://api.criteo.com/2026-01/marketing-solutions/ad-sets', 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/marketing-solutions/ad-sets",
  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' => [
                'name' => 'test adset',
                'datasetId' => '108002',
                'campaignId' => '358313',
                'objective' => 'conversions',
                'schedule' => [
                                'startDate' => '2026-04-04T16:21:06.3809615+02:00',
                                'endDate' => '2026-04-13T16:21:06.3809642+02:00'
                ],
                'bidding' => [
                                'costController' => 'dailyBudget'
                ],
                'targeting' => [
                                'deliveryLimitations' => [
                                                                'environments' => [
                                                                                                                                'web'
                                                                ],
                                                                'devices' => [
                                                                                                                                'desktop'
                                                                ],
                                                                'operatingSystems' => [
                                                                                                                                'android'
                                                                ]
                                ],
                                'geoLocation' => [
                                                                'countries' => [
                                                                                                                                'operand' => 'in',
                                                                                                                                'values' => [
                                                                                                                                                                                                                                                                'FR',
                                                                                                                                                                                                                                                                'IT'
                                                                                                                                ]
                                                                ]
                                ],
                                'frequencyCapping' => [
                                                                'frequency' => 'daily',
                                                                'maximumImpressions' => 1000
                                ]
                ],
                'budget' => [
                                'budgetStrategy' => 'capped',
                                'budgetRenewal' => 'weekly',
                                'budgetDeliverySmoothing' => 'standard',
                                'budgetDeliveryWeek' => 'mondayToSunday',
                                'budgetAmount' => 1000
                ],
                'trackingCode' => 'Test123',
                'mediaType' => 'display',
                'attributionConfiguration' => [
                                'attributionMethod' => 'criteoAttribution'
                ]
        ],
        'type' => 'AdSet'
    ]
  ]),
  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;
}
package main

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

func main() {

	url := "https://api.criteo.com/2026-01/marketing-solutions/ad-sets"

	payload := strings.NewReader("{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"test adset\",\n      \"datasetId\": \"108002\",\n      \"campaignId\": \"358313\",\n      \"objective\": \"conversions\",\n      \"schedule\": {\n        \"startDate\": \"2026-04-04T16:21:06.3809615+02:00\",\n        \"endDate\": \"2026-04-13T16:21:06.3809642+02:00\"\n      },\n      \"bidding\": {\n        \"costController\": \"dailyBudget\"\n      },\n      \"targeting\": {\n        \"deliveryLimitations\": {\n          \"environments\": [\n            \"web\"\n          ],\n          \"devices\": [\n            \"desktop\"\n          ],\n          \"operatingSystems\": [\n            \"android\"\n          ]\n        },\n        \"geoLocation\": {\n          \"countries\": {\n            \"operand\": \"in\",\n            \"values\": [\n              \"FR\",\n              \"IT\"\n            ]\n          }\n        },\n        \"frequencyCapping\": {\n          \"frequency\": \"daily\",\n          \"maximumImpressions\": 1000\n        }\n      },\n      \"budget\": {\n        \"budgetStrategy\": \"capped\",\n        \"budgetRenewal\": \"weekly\",\n        \"budgetDeliverySmoothing\": \"standard\",\n        \"budgetDeliveryWeek\": \"mondayToSunday\",\n        \"budgetAmount\": 1000\n      },\n      \"trackingCode\": \"Test123\",\n      \"mediaType\": \"display\",\n      \"attributionConfiguration\": {\n        \"attributionMethod\": \"criteoAttribution\"\n      }\n    },\n    \"type\": \"AdSet\"\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))

}
HttpResponse<String> response = Unirest.post("https://api.criteo.com/2026-01/marketing-solutions/ad-sets")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"test adset\",\n      \"datasetId\": \"108002\",\n      \"campaignId\": \"358313\",\n      \"objective\": \"conversions\",\n      \"schedule\": {\n        \"startDate\": \"2026-04-04T16:21:06.3809615+02:00\",\n        \"endDate\": \"2026-04-13T16:21:06.3809642+02:00\"\n      },\n      \"bidding\": {\n        \"costController\": \"dailyBudget\"\n      },\n      \"targeting\": {\n        \"deliveryLimitations\": {\n          \"environments\": [\n            \"web\"\n          ],\n          \"devices\": [\n            \"desktop\"\n          ],\n          \"operatingSystems\": [\n            \"android\"\n          ]\n        },\n        \"geoLocation\": {\n          \"countries\": {\n            \"operand\": \"in\",\n            \"values\": [\n              \"FR\",\n              \"IT\"\n            ]\n          }\n        },\n        \"frequencyCapping\": {\n          \"frequency\": \"daily\",\n          \"maximumImpressions\": 1000\n        }\n      },\n      \"budget\": {\n        \"budgetStrategy\": \"capped\",\n        \"budgetRenewal\": \"weekly\",\n        \"budgetDeliverySmoothing\": \"standard\",\n        \"budgetDeliveryWeek\": \"mondayToSunday\",\n        \"budgetAmount\": 1000\n      },\n      \"trackingCode\": \"Test123\",\n      \"mediaType\": \"display\",\n      \"attributionConfiguration\": {\n        \"attributionMethod\": \"criteoAttribution\"\n      }\n    },\n    \"type\": \"AdSet\"\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.criteo.com/2026-01/marketing-solutions/ad-sets")

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      \"name\": \"test adset\",\n      \"datasetId\": \"108002\",\n      \"campaignId\": \"358313\",\n      \"objective\": \"conversions\",\n      \"schedule\": {\n        \"startDate\": \"2026-04-04T16:21:06.3809615+02:00\",\n        \"endDate\": \"2026-04-13T16:21:06.3809642+02:00\"\n      },\n      \"bidding\": {\n        \"costController\": \"dailyBudget\"\n      },\n      \"targeting\": {\n        \"deliveryLimitations\": {\n          \"environments\": [\n            \"web\"\n          ],\n          \"devices\": [\n            \"desktop\"\n          ],\n          \"operatingSystems\": [\n            \"android\"\n          ]\n        },\n        \"geoLocation\": {\n          \"countries\": {\n            \"operand\": \"in\",\n            \"values\": [\n              \"FR\",\n              \"IT\"\n            ]\n          }\n        },\n        \"frequencyCapping\": {\n          \"frequency\": \"daily\",\n          \"maximumImpressions\": 1000\n        }\n      },\n      \"budget\": {\n        \"budgetStrategy\": \"capped\",\n        \"budgetRenewal\": \"weekly\",\n        \"budgetDeliverySmoothing\": \"standard\",\n        \"budgetDeliveryWeek\": \"mondayToSunday\",\n        \"budgetAmount\": 1000\n      },\n      \"trackingCode\": \"Test123\",\n      \"mediaType\": \"display\",\n      \"attributionConfiguration\": {\n        \"attributionMethod\": \"criteoAttribution\"\n      }\n    },\n    \"type\": \"AdSet\"\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "attributes": {
      "advertiserId": "<string>",
      "attributionConfiguration": {},
      "bidding": {
        "bidAmount": 123
      },
      "budget": {
        "budgetAmount": 123
      },
      "campaignId": "<string>",
      "datasetId": "<string>",
      "name": "<string>",
      "schedule": {
        "endDate": {
          "value": "2023-11-07T05:31:56Z"
        },
        "startDate": {
          "value": "2023-11-07T05:31:56Z"
        }
      },
      "targeting": {
        "deliveryLimitations": {
          "devices": [],
          "environments": [],
          "operatingSystems": []
        },
        "frequencyCapping": {
          "value": {
            "maximumImpressions": 123
          }
        },
        "geoLocation": {
          "countries": {
            "value": {
              "values": [
                "<string>"
              ]
            }
          },
          "subdivisions": {
            "value": {
              "values": [
                "<string>"
              ]
            }
          },
          "zipCodes": {
            "value": {
              "values": [
                "<string>"
              ]
            }
          }
        }
      }
    },
    "id": "<string>",
    "type": "ReadAdSetV24Q3"
  },
  "errors": [
    {
      "code": "<string>",
      "detail": "<string>",
      "instance": "<string>",
      "source": {},
      "stackTrace": "<string>",
      "title": "<string>",
      "traceId": "<string>",
      "traceIdentifier": "<string>"
    }
  ],
  "warnings": [
    {
      "code": "<string>",
      "detail": "<string>",
      "instance": "<string>",
      "source": {},
      "stackTrace": "<string>",
      "title": "<string>",
      "traceId": "<string>",
      "traceIdentifier": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

the ad sets to create

Data model for an input resources

data
object

Data model for a Resource

Response

201 - application/json

The ad set that has been created and errors / warnings

output resource

data
object | null

read model data for resources

errors
object[] | null
read-only
warnings
object[] | null
read-only