Manage campaigns with the API
Overview
With the Activation API, developers can create, update and manage the resources of the Activation module: advertisers, campaigns, line items, creatives, and budgets.
The API adheres to the JSON API specification for consistency and ease of integration.
This page documents the Activation API (JSON:API specification, /v1/ namespace, hosted at buyerconnectapis.smartadserver.com). A separate Manage API (REST/JSON, different contract and endpoints) also exists for legacy campaign management. Don't mix calls between the two APIs.
Authentication
The authentication workflow involves Equativ’s authentication provider (Auth0) and Equativ’s Activation API.
Swagger UI
The Swagger UI for Activation API provides documentation of all methods and operations, as well as a composer to build requests.
Required information
To authenticate and use the Activation API, you need the following credentials, which will be provided by your Equativ contact:
- the
client_idandclient_secret - the
usernameandpasswordused to access the Maestro platform
Treat any received credentials as confidential and don't share them with third parties.
Authentication workflow
Step 1: Request the access token from Auth0
Request the access token from Equativ’s authentication provider Auth0:
curl --request POST \ --url 'https://´smartadserver.eu.auth0.com/oauth/token' \ --header 'content-type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=http://auth0.com/oauth/grant-type/password-realm' \ --data 'realm=Username-Password-Authentication' \ --data 'audience=api.demand.smartadserver.com' \ --data-urlencode 'username={username}' \ --data-urlencode 'password={password}' \ --data 'client_id={client id}' \ --data 'client_secret={client secret}'
In the response, you will receive the access token, which has a time to live of 10 hours (36000 seconds):
{"access_token":"<access token>","expires_in": 36000,"token_type": "Bearer"}
Step 2: Request the user token
With the access token obtained in Step 1, you must now request the user token, which you will use in all future API requests:
curl --request GET \--url https://buyerconnectapis.smartadserver.com/authorize \--header 'Authorization: Bearer <access token>'
The response body will only contain the user token which has a time to live of 10 hours.
Step 3: Use the user token in API requests
Use the user token obtained in Step 2 in the Authorization header of all your API requests:
curl --request GET \--url https://buyerconnectapis.smartadserver.com/selfServe \--header 'Authorization: Bearer <user token>'
Work with Activation API
Endpoint
https://buyerconnectapis.smartadserver.com/selfServe
Setup sequence for Activation resources
To efficiently set up your Activation resources, it is important to follow the correct sequence, as illustrated in the following chart. Deviating from this order can lead to discovering that some elements should have been created first. While revisions are possible, starting with the right sequence from the beginning ensures a more efficient process.

Available resources
The table outlines the Activation module resources you can create, update, and manage. ⚠️ Warning: it is highly recommended to create these resources in the order presented in the table to ensure proper configuration.
| Resource | Description |
|---|---|
| advertisers | Creating an advertiser is the very first step since it can be linked to campaigns and creatives. |
| creatives | Creatives must be linked to an advertiser and a line item. Adding trackers to creatives is optional. |
| trackers | Trackers (optional) are used for measurement purposes. They are linked to creatives, TcfVendor, and TcfPurpose. Use GET TcfVendor and GET TcfPurpose to retrieve them. |
| campaigns | Campaigns contain information about the associated advertiser and the allocated period of time. Two campaign types exist: standardCampaigns and programmaticGuaranteedCampaigns (set via the type discriminator field). |
| campaign budgets | Campaign budgets are created and linked to an existing campaign. |
| line items | Line items contain information about the advertiser’s targeting (mandatory) and a dedicated budget (optional). A line item must be linked to an existing campaign and to a creative. |
| line item budgets | Optionally, line item budgets can be added to existing line items for a more granular budget management. |
| campaignGoals | Goals set at the campaign level that are linked to an existing campaign. |
| lineItemGoals | Goals set at the line item level that are linked to an existing line item. |
| nativeAssets | Assets (title, data, image) attached to a native creative. They are created after the native creative shell. |
Available methods
For each of the available resources mentioned above, you can use the following HTTP methods:
| Method | Description |
|---|---|
| POST | Creates an item |
| GET | Retrieves one or all items |
| PATCH | Updates an item. Requires Content-Type: application/vnd.api+json. The request body must be a full JSON:API envelope with data.type, data.id, and data.attributes. |
| DELETE | Deletes an item |
Single item and all items
In case of the GET method, you can retrieve a single item of a resource, for example, a single advertiser or all items of a resource, for example, all advertisers. The distinction is made by either specifying the ID of the item (for retrieval of a single item) or by specifying no ID at all (for retrieval of all items).
In case of the DELETE and PATCH methods, you can only operate on a single item of a resource; you must specify the ID to be deleted or patched. Bulk deletion or bulk patching of all items of a resource isn't supported.
Filter, sort, and apply pagination
You can set filters, sort the results, and apply pagination.
Examples
GET all advertisers
curl -X 'GET' \'https://buyerconnectapis.smartadserver.com/selfServe/advertisers' \
GET a single advertiser
Request
curl -X 'GET' \'https://buyerconnectapis.smartadserver.com/selfServe/advertisers/2' \
This request retrieves the advertiser with the advertiser ID: 2.
Response
HTTP 200{ "links": { "self": "string" }, "data": { "attributes": { "createdAt": "2024-06-10T14:10:38.990Z", "description": "string", "domain": "string", "id": 2, "lastUpdatedAt": "2024-06-10T14:10:38.990Z", "name": "string", "status": "Active" }, "id": "string", "included": [ { "id": "string", "type": "iabCategories", "attributes": {}, "relationships": {} } ], "relationships": { "campaigns": [ { "data": { "id": "string", "type": "standardCampaigns" } } ], "creatives": [ { "data": { "id": "string", "type": "bannerCreatives" } } ], "iabCategory": { "data": { "id": "string", "type": "iabCategories" } } }, "type": "advertisers" }}
GET all campaigns
curl -X 'GET' \'https://buyerconnectapis.smartadserver.com/selfServe/campaigns' \
POST a campaign
Request
curl -X 'POST' \ 'https://buyerconnectapis.smartadserver.com/selfServe/campaigns' \ -H 'accept: application/vnd.api+json' \ -H 'Authorization: Bearer xxxxx -H 'Content-Type: application/vnd.api+json' \ -d '{ "data": { "type": "standardCampaigns", "attributes": { "currencyCode": "EUR", "endDate": "2023-02-01T15:00:00", "fcImpressionsPerInterval": 100, "fcInterval": 480, "name": "My new campaign", "startDate": "2023-01-04T11:00:00", "timezone": "Europe/Paris" }, "relationships": { "advertiser": { "data": { "id": "1", "type": "advertisers" } } } }}'
fcInterval is specified in minutes and must be between 1 and 43,200 (maximum of 30 days).
Response
{ "links": { "self": "string" }, "data": { "attributes": { "createdAt": "2024-06-10T14:03:28.075Z", "currencyCode": "string", "endDate": "2024-06-10T14:03:28.075Z", "fcImpressionsPerInterval": 0, "fcInterval": 0, "id": 0, "lastUpdatedAt": "2024-06-10T14:03:28.075Z", "name": "string", "startDate": "2024-06-10T14:03:28.075Z", "status": "Active", "timezone": "string" }, "id": "string", "included": [ { "id": "string", "type": "iabCategories", "attributes": {}, "relationships": {} } ], "relationships": { "advertiser": { "data": { "id": "string", "type": "advertisers" } }, "budgets": [ { "data": { "id": "string", "type": "campaignBudgets" } } ], "lineItems": [ { "data": { "id": "string", "type": "lineItems" } } ] }, "type": "standardCampaigns" }}
Status is an enum with three possible values: Active, Inactive, Archived.
Update a campaign
Use the PATCH method to update a single campaign. To update a campaign, you must include the Content-Type: application/vnd.api+json header and provide a full JSON:API envelope containing data.type, data.id, and the specific attributes you want to change.
Only include the attributes you want to change. Equativ leaves omitted attributes unchanged.
Request
curl -X 'PATCH' \
'https://buyerconnectapis.smartadserver.com/selfServe/campaigns/42' \
-H 'accept: application/vnd.api+json' \
-H 'Authorization: Bearer xxxxx' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "standardCampaigns",
"id": "42",
"attributes": {
"name": "Renamed campaign"
}
}
}'Campaign types
The type field on a campaign is a discriminator with two values:
| Type | Description |
|---|---|
programmaticGuaranteedCampaigns |
Programmatic Guaranteed (PG) campaigns with buyer-side deal terms. |
standardCampaigns |
Standard campaigns with frequency capping and flexible budgets. |
Programmatic Guaranteed campaigns
PG campaigns require the following additional fields:
| Field | Type | Description |
|---|---|---|
buyerId |
string | The buyer identifier for the deal. |
buyerPrice |
decimal | The agreed price with the buyer. |
endDate |
datetime | The campaign end date (required). |
startDate |
datetime | The campaign start date (required). |
volume |
integer | The guaranteed volume of impressions. |
Campaign duplication
You can duplicate standard campaigns by passing the duplicateDependenciesFromCampaignId attribute in a POST request. This action copies budgets, line items, and their dependencies from the source campaign. This field is create-only and applies only to standard campaigns.
Computed properties
Campaigns include a read-only computedProperties relationship that contains derived values. These values include the effective startDate, endDate, and the overall and daily unit and spend totals. You cannot write to these properties directly.
Goals
You can attach goals to campaigns using the goals relationship.
Campaign budgets
To link a budget to an existing campaign, use a POST request.
Field reference
The following table describes the fields for campaign budgets. All tables are ordered alphabetically by the field name.
| Field | Type | Description |
|---|---|---|
dailyCents |
integer | Daily spend cap in cents (optional). |
dailyCentsPacingMode |
enum | The pacing mode for the daily spend cap. Supported values: Asap, Even, or Ahead. |
dailyUnits |
integer | Daily unit cap (optional). |
dailyUnitsPacingMode |
enum | The pacing mode for the daily unit cap. Supported values: Asap, Even, or Ahead. |
endDate |
datetime | The budget end date. This field doesn't include a timezone. |
overallCents |
integer | Overall spend cap in cents (optional). |
overallCentsPacingMode |
enum | The pacing mode for the overall spend cap. Supported values: Asap, Even, or Ahead. |
overallUnits |
integer | Overall unit cap (optional). |
overallUnitsPacingMode |
enum | The pacing mode for the overall unit cap. Supported values: Asap, Even, or Ahead. |
startDate |
datetime | The budget start date. This field doesn't include a timezone and is interpreted in the campaign's timezone. This date cannot be in the past. |
unitPriceCents |
decimal | Price in cents. Minimum value is 0.1, with a maximum of one decimal place. |
unitType |
enum | The type of unit for the budget. Supported values: Cpm, Cpc, or Cpcv. |
The DELETE method isn't supported for campaign budgets. To remove a budget, archive or modify the campaign.
Line items
Core fields
The following table describes the core fields for line items. All tables are ordered alphabetically by the field name.
| Field | Type | Description |
|---|---|---|
fcImpressionsPerInterval |
integer | The maximum number of impressions allowed per interval. |
fcInterval |
integer | The frequency cap interval in minutes. Supported values: 1–43200. |
name |
string | The name of the line item. |
status |
enum | The status of the line item. Supported values: Active, Inactive, or Archived. |
Targeting fields
Line item targeting settings propagate to SSP deal targeting. Key targeting fields include:
countryCodesplatformIdsimpressionTypeIdsisCTVaudienceSegmentsTargetingsemanticSegmentsTargetingdomainListIdviewabilityTargetingPercentagevideoCompletionTargetingPercentage- CTV targeting arrays
Line item budgets
Line item budgets use the same structure as campaign budgets, but they must comply with the following constraints:
- The
unitTypemust match theunitTypeof the parent campaign budget. - The budget
startDateandendDatemust fall within the date range of the parent campaign.
Goals
Goals are separate CRUD resources for campaigns and line items.
| Resource | Endpoint |
|---|---|
campaignGoals |
/selfServe/campaignGoals |
lineItemGoals |
/selfServe/lineItemGoals |
Field reference
The following table describes the fields for goals. All tables are ordered alphabetically by the field name.
| Field | Type | Description |
|---|---|---|
unitType |
enum | The type of unit for the goal. Supported values: Cpm, Cpc, ClickThroughRate, ViewabilityRate, or CompletionRate. |
value |
decimal | The target value for the goal. You can include a maximum of two decimal places. |
Creatives
Atomic operations for write actions
Creatives don't use standard REST methods for creation, update, or deletion. All write operations use atomic operations with the following endpoint and header:
POST /v1/operations
Content-Type: application/vnd.api+json; ext="https://jsonapi.org/ext/atomic"List and get creatives
To list or retrieve creatives, use a standard GET request with filters. For example:
GET /v1/creatives?filter[advertiser.id]=123GET /v1/creatives?filter[lineItems.id]=456GET /v1/creatives?filter[name]=MyCr
Creative types
You can set six different creative types using the type discriminator:
| Type |
|---|
audioCreatives |
bannerCreatives |
dynamicCreatives |
nativeCreatives |
skinCreatives |
videoCreatives |
Optional fields
The following optional fields are common to all creative types. The table is ordered alphabetically by the field name.
| Field | Type | Description |
|---|---|---|
clickUrl |
string | The click-through URL. |
impressionUrl |
string | The impression tracking URL. |
thirdPartyTrackingUrl |
string | The third-party tracking pixel URL. |
Link a creative to a line item
To link a creative to a line item, use the lineItems relationship on the creative object. You can perform this action when you create the creative or by using a PATCH update.
Native creative assets
Setting up native creatives is a two-step process:
- Create the
nativeCreativeshell using atomic operations. - Attach each asset by sending a
POSTrequest to/selfServe/nativeAssets.
Asset types
Specify the asset type using the type field. All asset types link to their parent nativeCreative through the creative relationship.
| Type value | Description |
|---|---|
dataNativeAssets |
Data fields such as sponsor name, description, and call to action (CTA). Supported DataAssetType values: 1–12. |
imageNativeAssets |
Image assets. Supported ImageAssetType values: 1 (Icon) or 3 (Main image). |
titleNativeAssets |
Title text for the native advertisement. |
Trackers
Trackers are impression or click pixels attached to a creative. To create a tracker, send a POST request to /v1/trackers.
Tracker modes
The following table describes the available tracker modes. The table is ordered alphabetically by the mode name.
| Mode | Description |
|---|---|
| Click tracker | Triggers when a user clicks the advertisement. |
| Impression tracker | Triggers when the advertisement is displayed. |
Optional GDPR relationships
You can include the following optional GDPR relationships:
-
tcfVendor: Links to a TCF vendor. To retrieve a list of vendors, useGET /v1/tcfVendors. -
tcfPurpose: Links to a TCF purpose. To retrieve a list of purposes, useGET /v1/tcfPurposes.
Delete a tracker
To delete a tracker, send a DELETE request to /v1/trackers/{id}.
Validation rules
The API enforces the following validation rules. If a request violates these rules, the API returns a 422 Unprocessable Entity error.
| Rule |
|---|
A campaign cannot be set to Active without at least one budget. |
Ahead pacing cannot be combined with any daily cap. |
The budget startDate cannot be in the past. |
| Line item budget dates must fall within the parent campaign's period. |
The unitType of a line item budget must match the unitType of the parent campaign budget. |
Only one overall dimension can use Ahead pacing at a time. |
Enum reference
The following table provides the allowed values for the enumerations used in the API. The table is ordered alphabetically by the enum name.
| Enum | Values |
|---|---|
BudgetPacingMode |
Asap, Even, Ahead
|
BudgetUnitType |
Cpm, Cpc, Cpcv
|
CampaignStatus |
Active, Inactive, Archived
|
DataAssetType |
1–12 |
GoalUnitType |
Cpm, Cpc, ClickThroughRate, ViewabilityRate, CompletionRate
|
ImageAssetType |
1 (Icon) or 3 (Main image) |
LineItemStatus |
Active, Inactive, Archived
|
NativeAssetType |
titleNativeAssets, dataNativeAssets, imageNativeAssets
|