Skip to main content
Facebook AdsVersion: v3

Upsert conversion pixel

PUT/ad-publishing/facebook/pixels

Create a Facebook conversion pixel, or rename an existing one by passing conversionPixelId. The two paths acknowledge differently: a create returns the new id, a rename returns only { success: true }. Renaming is the only update supported, and it rejects type: INSTAGRAM_DM. Creating an INSTAGRAM_DM dataset requires igUserId and fails if one already exists for that account.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:adPublishing.write
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Body

locationIdstringrequired

Location identifier

Example:loc_abc123
conversionPixelIdstring

Conversion pixel ID

Example:px_123
namestring

Pixel name

Example:My Pixel
igUserIdstring

Instagram user ID

Example:ig_user_123
typestringrequired

Pixel event type

Available optionsLEAD_EVENTFUNNEL_EVENTINSTAGRAM_DM
Example:LEAD_EVENT

Response

The new id when a pixel was created, or a success flag when an existing pixel was renamed

oneOf
idstringrequired

Id of the pixel or dataset that was created

Example:1712619223343735