Skip to main content
POST
Attach a pixel to a campaign
Same as ticking the pixel under Ad platforms in the campaign’s Postbacks window. Take pixel_id from the pixel list.

Which campaigns

A pixel needs the click id of the ad click, so it works on Smart Link campaigns only:
  • RevShare: campaigns with type smartlink_tracking or smartlink_trial. Pass the revc_… id.
  • CPL: campaigns that run on an OT tracking link. Pass the cplo_… id.
Any other campaign answers 422 Ad platform pixels are only available for tracking-link campaigns. Completed campaigns can be changed too: they keep sending the purchases of the fans they brought.

What changes

Only the pixel you name. Custom postbacks of the campaign and its other pixels stay as they are. A campaign holds up to 20 pixels. Attaching a pixel that is already attached answers success, so you can repeat the call safely. The answer is the campaign row with its new ad_pixels: the shape of RevShare campaigns for a revc_… id and of CPL campaigns for a cplo_… id.

Errors

Authorizations

Authorization
string
header
required

API key from the partner cabinet, Tools -> API (https://partners.onlytraffic.com/tools/api): up to 5 named keys per account, each Full or Read-only, ot_partners_ prefix, shown once at creation. Raw value or Bearer form. Read-only keys cannot call the POST endpoints (403 This API key is read-only); expired or revoked keys get 403 Error! Access denied.

Body

application/json
campaign_id
string
required

Campaign public id (revc_…) or CPL campaign public id (cplo_…).

pixel_id
string<uuid>
required

Pixel id in OnlyTraffic: pixel_id from the pixel list or from ad_pixels of a campaign. Not the Pixel ID of the ad platform.

Response

200 - application/json

Success (check status; errors are also HTTP 200)

status
enum<string>
Available options:
success
message
string
data
object

The campaign after the change: a RevShare campaign row for a revc_… id, a CPL campaign row for a cplo_… id. Its ad_pixels is the new pixel list.