Skip to main content

Pixel Registration

Before generating pixel code, register a campaign to get a campaign ID. This ID links all pixel loads back to a single campaign or property for reporting.

Terminology

In Classify's pixel system, a "campaign" is a tracking configuration — not a DSP campaign. Each pixel campaign gets a unique ID that links all pixel loads for reporting. You'll typically create one pixel campaign per DSP campaign you want to track.


The campaign object

{
"id": 609,
"name": "H1 2026 EV Campaign",
"use_case": "campaign_optimization",
"description": "Classify curation deal tracking for EV segment",
"created_date": "2026-02-12T20:33:44Z",
"last_updated_date": "2026-02-12T20:33:44Z"
}
FieldTypeDescription
idintegerUnique campaign ID. Used in pixel code and reporting.
namestringDisplay name for the campaign or property
use_casestringHow this pixel will be used. See Use cases.
descriptionstring | nullOptional description
created_datestring (ISO 8601)When the campaign was registered
last_updated_datestring (ISO 8601)When the campaign was last modified

Use cases

ValueDescription
campaign_optimizationTracking delivery of a Classify curation deal or segment for optimization
campaign_reportingPost-delivery reporting for any programmatic campaign
publisher_bot_detectionDetecting bot, agent, and non-human traffic on a publisher property
publisher_agent_targetingMonitoring AI agent access patterns for monetization or content strategy
otherOther use cases not listed above

The use_case determines what reporting is available. Campaign use cases (campaign_optimization, campaign_reporting) produce campaign reports. Publisher use cases (publisher_bot_detection, publisher_agent_targeting) produce publisher reports.


Register a campaign

POST https://api.clsfy.me/v1/pixel/campaigns

Parameters

ParameterTypeRequiredDescription
namestringRequiredDisplay name for the campaign or property
use_casestringRequiredOne of the use case values above
descriptionstringOptionalFree-text description

Request

curl -X POST "https://api.clsfy.me/v1/pixel/campaigns" \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "H1 2026 EV Campaign",
"use_case": "campaign_optimization",
"description": "Classify curation deal tracking for EV segment"
}'

Response

{
"id": 609,
"name": "H1 2026 EV Campaign",
"use_case": "campaign_optimization",
"description": "Classify curation deal tracking for EV segment",
"created_date": "2026-02-12T20:33:44Z",
"last_updated_date": "2026-02-12T20:33:44Z"
}

List campaigns

Retrieve all campaigns associated with your API key.

GET https://api.clsfy.me/v1/pixel/campaigns
curl "https://api.clsfy.me/v1/pixel/campaigns" \
-H "X-API-Key: <your_api_key>"

Response

[
{
"id": 608,
"name": "H2 2025 Winter Campaign",
"use_case": "campaign_reporting",
"description": null,
"created_date": "2026-02-11T15:42:04Z",
"last_updated_date": "2026-02-11T15:42:04Z"
},
{
"id": 609,
"name": "H1 2026 EV Campaign",
"use_case": "campaign_optimization",
"description": "Classify curation deal tracking for EV segment",
"created_date": "2026-02-12T20:33:44Z",
"last_updated_date": "2026-02-12T20:33:44Z"
}
]

Get a campaign

GET https://api.clsfy.me/v1/pixel/campaigns/{id}
ParameterTypeDescription
idintegerThe campaign ID
curl "https://api.clsfy.me/v1/pixel/campaigns/609" \
-H "X-API-Key: <your_api_key>"

Update a campaign

Update an existing pixel campaign's name, description, or use case.

PUT https://api.clsfy.me/v1/pixel/campaigns/{id}

Parameters

ParameterTypeRequiredDescription
idinteger (path)RequiredThe campaign ID to update
namestringOptionalUpdated display name
use_casestringOptionalUpdated use case value
descriptionstringOptionalUpdated description

Only include the fields you want to change. Omitted fields are left unchanged.

Request

curl -X PUT "https://api.clsfy.me/v1/pixel/campaigns/609" \
-H "X-API-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"name": "H1 2026 EV Campaign — Updated",
"description": "Updated tracking configuration"
}'

Response

Returns the updated campaign object.

{
"id": 609,
"name": "H1 2026 EV Campaign — Updated",
"use_case": "campaign_optimization",
"description": "Updated tracking configuration",
"created_date": "2026-02-12T20:33:44Z",
"last_updated_date": "2026-03-10T14:22:15Z"
}

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": "Campaign with ID 999 not found"
}

HTTP status codes

StatusMeaning
200 OKSuccess
201 CreatedCampaign created
400 Bad RequestInvalid or missing parameters
401 UnauthorizedMissing or invalid API key
404 Not FoundCampaign not found
422 Unprocessable ContentValidation error (e.g. invalid use_case value)
429 Too Many RequestsRate limit exceeded