Configure a server-to-server conversions API integration (Meta/TikTok/Google Ads)
POST
/api/v1/capi-integrations
const url = 'https://example.com/api/v1/capi-integrations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"meta","credentials":{"pixelId":"1234567890","accessToken":"EAAG..."},"statusMapping":{"lead":"Lead","sale":"Purchase"},"isActive":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/capi-integrations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "meta", "credentials": { "pixelId": "1234567890", "accessToken": "EAAG..." }, "statusMapping": { "lead": "Lead", "sale": "Purchase" }, "isActive": true }'Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Media typeapplication/json
object
provider
required
string
credentials
required
Provider-specific credentials — Meta: { pixelId, accessToken }; TikTok: { pixelCode, accessToken }; Google Ads: { customerId, conversionActionId, developerToken, clientId, clientSecret, refreshToken; optional: loginCustomerId, adUserDataConsent (GRANTED|DENIED)}
object
Example
{ "pixelId": "1234567890", "accessToken": "EAAG..."}statusMapping
required
Maps our conversion statuses to the event name the provider expects
object
Example
{ "lead": "Lead", "sale": "Purchase"}isActive
boolean
Responses
Заголовок раздела «Responses»Media typeapplication/json
object
id
required
string
provider
required
string
statusMapping
required
object
isActive
required
boolean
hasCredentials
required
boolean
createdAt
required
string
updatedAt
required
string
Example
{ "provider": "meta"}