Create Pixel
Creates an ad-platform pixel, same as Add pixel in Tools -> Pixels. The answer carries the new pixel_id: attach it to campaigns with the attach endpoint.
Right after the save we send one check to the platform with your token. Its outcome lands in health within a minute: read the pixel list, or run the check endpoint again later. A TikTok pixel is checked only when it has a test event code; without one health stays unknown until the first event of a campaign.
Leave events out to get the defaults of the platform: Meta sends Subscribe, Purchase and Lead, TikTok sends ViewContent, Subscribe, CompletePayment and Contact, and renewals go as the purchase event.
Up to 50 active pixels per account.
Errors (status: "error", HTTP 200):
422Incorrect platform: facebook | tiktok.422platform_pixel_id is requiredoraccess_token is required.422Incorrect events: array of {event, platform_event},Unknown event: ...orUnknown platform event for ...: the message lists the allowed values.422Enable at least one event.422Event Source URL: enter a valid domain, e.g. https://yourdomain.com, or a message that Meta blocks onlyfans.com as an event source.422... is too long: N characters max.422Pixel limit reached (50). Archive unused pixels first.403Access denied: missing / unknown key, or the account is not an active partner.429Rate limit exceeded (30 writes per minute per key, see theRetry-Afterheader).503Service is temporarily unavailable: the platform did not answer in time. The action may still have been applied, read the pixel list before repeating it.
pixel_id: pass it to attach to put the pixel on a campaign. A new pixel sends nothing until it is attached.
What to send
The access token
The token is write-only. It is stored encrypted, no endpoint returns it, and it is not kept in the API request log. To replace it, send a new one with update.Events
Leaveevents out and the pixel gets the defaults of the platform:
events to choose yourself. The list is the whole mapping: an event you leave out is switched off.
Subscribe, every other payment as Purchase, and dialogs are not sent. A wrong name is answered with the list of allowed ones.
After the save
We send one check to the platform with your token. Its outcome lands inhealth within a minute: read the pixel list, or see Check Pixel. A TikTok pixel is checked only when it has a test event code.
An account holds up to 50 active pixels.
Errors
Authorizations
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.