Skip to main content

Segment Activation

Once a segment has finished building (status complete), you activate it by specifying a target DSP and buyer seat. Classify pushes the segment into the DSP's supply chain and returns a Deal ID you can target directly in your campaigns.

Activation is asynchronous. You receive an activation ID immediately, and the Deal ID is typically ready within a few hours.

tip

Need to check whether your segment is ready to activate? See Segment Creation — Polling for completion.


The activation object

{
"id": 142,
"segment_ids": [61],
"dsp": "The Trade Desk",
"buyer_seat": "seat-abc123",
"status": "complete",
"deal_id": "classify-ttd-61-a8f3c",
"ttl_hours": 720,
"start_date": "2026-01-15",
"end_date": "2026-02-15",
"geo": ["US", "CA"],
"formats": ["banner", "video"],
"devices": ["desktop", "mobile"],
"kpis": [
{"metric": "ctr", "target": 0.003},
{"metric": "viewability", "target": 0.70}
],
"budget": {"amount": 50000, "currency": "USD"},
"created_date": "2026-02-12T22:09:38Z",
"processed_date": "2026-02-12T22:41:22Z"
}
FieldTypeDescription
idintegerUnique identifier for this activation
segment_idsarray[integer]The segment IDs included in this deal
dspstringThe DSP the deal was pushed to
buyer_seatstringYour buyer seat ID in the DSP
statusstringpendingprocessingcomplete or failed
deal_idstring | nullThe Deal ID to target in your DSP. null until status is complete.
ttl_hoursinteger | nullHow long the deal remains active, in hours. null until status is complete.
start_datestring (ISO 8601) | nullCampaign start date, if provided
end_datestring (ISO 8601) | nullCampaign end date, if provided
geoarray[string] | nullTargeted countries, if provided
formatsarray[string] | nullAd formats, if provided
devicesarray[string] | nullDevice types, if provided
kpisarray[object] | nullKPI targets, if provided
budgetobject | nullCampaign budget, if provided
created_datestring (ISO 8601)When the activation request was submitted
processed_datestring (ISO 8601) | nullWhen the Deal ID was issued. null until complete.

Activate a segment

POST https://api.clsfy.me/v1/clsfy/activations

Parameters

ParameterTypeRequiredDescription
segment_idsarray[integer]RequiredOne or more segment IDs to include in the deal. Segments must have status: "complete".
dspstringRequiredThe DSP to push the deal to. Must be a value from the supported DSP list.
buyer_seatstringRequiredYour buyer seat identifier in the target DSP.
start_datestring (ISO 8601)OptionalCampaign start date (e.g. "2026-01-15").
end_datestring (ISO 8601)OptionalCampaign end date.
geoarray[string]OptionalISO 3166-1 alpha-2 country codes to target (e.g. ["US", "CA", "GB"]). Omit for global.
formatsarray[string]OptionalAd formats to include. Values: banner, video, native, ctv, audio. Omit for all formats.
devicesarray[string]OptionalDevice types to target. Values: desktop, mobile, tablet, ctv. Omit for all devices.
kpisarray[object]OptionalPerformance targets. Each object has a metric (string) and target (number). See KPIs.
budgetobjectOptionalCampaign budget. Object with amount (number) and currency (string, ISO 4217).

Request

curl -X POST "https://api.clsfy.me/v1/clsfy/activations" \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"segment_ids": [61],
"dsp": "The Trade Desk",
"buyer_seat": "seat-abc123",
"start_date": "2026-01-15",
"end_date": "2026-02-15",
"geo": ["US", "CA"],
"formats": ["banner", "video"],
"devices": ["desktop", "mobile"],
"kpis": [
{"metric": "ctr", "target": 0.003},
{"metric": "viewability", "target": 0.70}
],
"budget": {"amount": 50000, "currency": "USD"}
}'

Response

Returns the newly created activation object with status: "pending".

{
"id": 142,
"segment_ids": [61],
"dsp": "The Trade Desk",
"buyer_seat": "seat-abc123",
"status": "pending",
"deal_id": null,
"ttl_hours": null,
"start_date": "2026-01-15",
"end_date": "2026-02-15",
"geo": ["US", "CA"],
"formats": ["banner", "video"],
"devices": ["desktop", "mobile"],
"kpis": [
{"metric": "ctr", "target": 0.003},
{"metric": "viewability", "target": 0.70}
],
"budget": {"amount": 50000, "currency": "USD"},
"created_date": "2026-02-12T22:09:38Z",
"processed_date": null
}

Get an activation

Retrieves an activation by ID. Use this to poll for the Deal ID.

GET https://api.clsfy.me/v1/clsfy/activations/{id}
ParameterTypeDescription
idintegerThe activation ID returned at creation
curl "https://api.clsfy.me/v1/clsfy/activations/142" \
-H "X-API-Key: <your_api_key>"

Polling for your Deal ID

Poll GET /v1/clsfy/activations/{id} until status is "complete" or processed_date is not null. Once ready, the response will include deal_id and ttl_hours.

Take the deal_id into your DSP and set it as the deal target on your line item or campaign.

import requests
import time

def wait_for_deal_id(activation_id: int, api_key: str, poll_interval: int = 60):
"""Poll until a Deal ID is issued. Returns the completed activation object."""
url = f"https://api.clsfy.me/v1/clsfy/activations/{activation_id}"
headers = {"X-API-Key": api_key}

while True:
activation = requests.get(url, headers=headers).json()

if activation["status"] == "complete":
print(f"Deal ID: {activation['deal_id']}")
print(f"Expires in: {activation['ttl_hours']} hours")
return activation
elif activation["status"] == "failed":
raise RuntimeError(f"Activation {activation_id} failed.")

print(f"Status: {activation['status']} — retrying in {poll_interval}s")
time.sleep(poll_interval)

KPIs

Use the kpis array to communicate performance targets to Classify. These inform how the segment is configured and tuned.

MetricDescriptionExample target
ctrClick-through rate0.003 (0.3%)
conversionConversion rate0.01 (1%)
viewabilityViewable impression rate0.70 (70%)
vcrVideo completion rate0.75 (75%)
cpaCost per acquisition (dollar amount)25.00
roasReturn on ad spend (multiplier)4.0
"kpis": [
{"metric": "ctr", "target": 0.003},
{"metric": "viewability", "target": 0.70}
]

Supported DSPs

The dsp field must exactly match one of the following values:

View all 93 supported DSPs
DSP Name
Aarki DSP
Active Agent/Adition DSP
Addictive Mobility
Adform
AdKernel DSP
Admixer
Adobe
AdRoll
AdTheorent
Advanced Store Germany
Amazon DSP
ArabyAds DSP
Arpeely DSP
Basis Technologies
Beeswax io
BidSwitch
BidTheatre AB
Blis Media
Blockboard DSP
BridgeCorp
Cadent
Cloud Technologies S.A.
Cognitiv
Conversant
Cox Automotive DSP
Crimtan DSP
Criteo
DeepIntent
Define Media
Delta Projects/Azerion
DV360
Edge226
Emodo
Eskimi DSP
Exponential DSP
Gamoshi DSP
Hawk
illumin
Infillion DSP
InMobi DSP
iPROM DSP
IQM
IQZone DSP
Jaduda GMBH/Splicky
Jampp
Krush Media
Local Sensor
Loopme DSP
MadHive
Madopi Medi
Mars Media
Mediaforce
MediaSmart
MobPro NL
molocoads DSP
Nexxen
Octillion
OneVie
Opera Ads
Point2Web
PubMatic Activate
PulsePoint DSP
Quantcast
Remerge GmbH
Reset Digital
RTB House PL
RTB Mi
Samsung DSP
Sift.co
Simpli.fi
Smaato DSP
Smadex S.L.
Sqreem DSP
StackAdapt
SurfSide
TapTap DSP
TargetSmart
The Trade Desk
ThinkNear
Travelaudience GmbH/Amadeus
Tubia DSP
Unruly
Valassis Digital
Viant
Xandr
Yahoo DSP
YouAppi
Zemanta/Outbrain
Zeta DSP
note

Don't see your DSP? Contact your Classify representative to request support for additional platforms.


Error responses

When a request fails, the API returns a JSON object with an error code and a human-readable message:

{
"error": "not_found",
"message": "Activation with ID 999 not found"
}

HTTP status codes

StatusMeaning
200 OKSuccess
201 CreatedActivation created
400 Bad RequestInvalid or missing parameters
401 UnauthorizedMissing or invalid API key
404 Not FoundActivation not found
422 Unprocessable ContentValidation error (e.g. segment not yet complete)
429 Too Many RequestsRate limit exceeded