Skip to main content
PUT
Connect or update the CAPI pixel

Authorizations

Authorization
string
header
required

JWT token obtained from /api/auth/token endpoint. Token is verified using JWKS and must include a valid user identifier.

Path Parameters

projectId
string<uuid>
required

The project id.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Body

application/json
pixelId
string
required

The Meta Pixel id to send events to.

Minimum string length: 1
Example:

"1234567890"

accessToken
string

A pixel-scoped CAPI access token generated in Meta Events Manager. Omit and set useOauthToken: true to source the token from the project’s Meta OAuth connection instead.

testEventCode
string

Optional Events Manager test-event code, used to route test events to the Test Events tab.

Example:

"TEST12345"

useOauthToken
boolean

Set true to source the token from the Meta OAuth connection. Required when accessToken is omitted on first connect.

Response

CAPI pixel connected

connected
boolean
required

Whether a CAPI pixel is connected.

pixelId
string | null
required

The connected Meta Pixel id.

tokenSource
enum<string> | null
required

paste = a pixel-scoped token you supplied; oauth = derived from the Meta connection. The token itself is never returned.

Available options:
paste,
oauth,
null
testEventCode
string | null
required
updatedAt
string<date-time> | null
required