Создать пиксель
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: передайте его в привязку, чтобы поставить пиксель на кампанию. Пока пиксель не привязан, он ничего не отправляет.
Что передавать
Токен доступа
Токен только записывается. Он хранится в зашифрованном виде, ни один метод его не возвращает, и в журнал запросов API он не попадает. Чтобы заменить токен, передайте новый в изменении пикселя.События
Если не передаватьevents, пиксель получит значения платформы по умолчанию:
events. Список задаёт весь маппинг целиком: событие, которого в нём нет, отключено.
Subscribe, остальные платежи как Purchase, а диалоги не отправляются. На неверное название придёт ответ со списком допустимых.
После сохранения
Мы отправляем на платформу одну проверку с вашим токеном. Результат появляется вhealth в течение минуты: прочитайте список пикселей или посмотрите проверку пикселя. Пиксель TikTok проверяется, только если у него задан тестовый код.
У аккаунта может быть до 50 активных пикселей.
Ошибки
Авторизации
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.