Skip to main content
PUT
Save a creator's Meta Pixel

Authorizations

Authorization
string
header
required

An API key (onx_sk_…) created in Onlyx under Settings → API & MCP, or an OAuth access token (onx_at_…) issued to a connected app. Send it as Authorization: Bearer <credential>. API keys may also be sent as X-API-Key: <key>.

Headers

Idempotency-Key
string

Optional. A unique value (8 to 64 letters, digits, - or _; a UUID is ideal) that makes a retry safe: the same key with the same request within 24 hours returns the stored response, with Idempotent-Replayed: true, instead of doing the work twice. The same key with a different request is 409 IDEMPOTENCY_KEY_REUSED; while the first request still runs it is 409 IDEMPOTENCY_IN_PROGRESS. A malformed key is 400 VALIDATION_ERROR.

Required string length: 8 - 64
Pattern: ^[A-Za-z0-9_-]{8,64}$

Path Parameters

creatorId
string
required

The creator id (cre_…). Ad tracking is for Telegram creators.

Body

application/json
accessToken
string | null

A Conversions API access token for this pixel (Events Manager → the pixel → Settings → Generate access token). Required the first time; leave it out (or empty) to keep the stored one. Never returned.

Maximum string length: 1000
enabled
boolean | null

false pauses sending without deleting anything; omit to keep (on for a new pixel).

leadEvent
enum<string> | null

The event sent when a fan reaches her on Telegram (Lead on a new pixel); omit to keep.

Available options:
Lead,
Subscribe,
CompleteRegistration,
Contact
pixelId
string | null

The Meta Pixel (dataset) id: digits only. Required the first time; omit to keep.

Maximum string length: 32
testEventCode
string | null

Meta's Test Events code, e.g. TEST12345; null or empty = live; omit to keep.

Maximum string length: 64

Response

The saved settings (never the token).

botUsername
string | null
required

Her own Telegram Stars bot, which a bot ad link opens; null if none.

configured
boolean
required

A Pixel ID and an access token are saved.

creatorId
string
required

The creator.

enabled
boolean
required

Events are being sent to Meta (false = paused).

leadEvent
string
required

The event sent when a fan reaches her on Telegram.

leadEvents
string[]
required

The events leadEvent may be.

pixelId
string | null
required

The Meta Pixel (dataset) id, or null when none is saved.

telegramUsername
string | null
required

Her Telegram username, which every ad link needs.

testEventCode
string | null
required

Meta's Test Events code. While set, every event shows only in Test Events in Events Manager.

tokenSaved
boolean
required

An access token is stored. The token itself is never returned.