curl --request PUT \
--url https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessToken": "EAAB…",
"leadEvent": "Lead",
"pixelId": "123456789012345",
"testEventCode": "TEST12345"
}
'import requests
url = "https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking"
payload = {
"accessToken": "EAAB…",
"leadEvent": "Lead",
"pixelId": "123456789012345",
"testEventCode": "TEST12345"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessToken: 'EAAB…',
leadEvent: 'Lead',
pixelId: '123456789012345',
testEventCode: 'TEST12345'
})
};
fetch('https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"botUsername": "candy_pay_bot",
"configured": true,
"creatorId": "cre_4d1a541312154bfe9cd9",
"enabled": true,
"leadEvent": "Lead",
"leadEvents": [
"Lead",
"Subscribe",
"CompleteRegistration",
"Contact"
],
"pixelId": "123456789012345",
"telegramUsername": "candyyyxxx",
"testEventCode": "TEST12345",
"tokenSaved": true
}Save a creator's Meta Pixel
Saves her Meta Pixel ID and Conversions API access token, the Test Events code and the lead event. Every field you leave out keeps its saved value; the Pixel ID and token are required the first time, and the token is stored encrypted and never returned. testEventCode: null goes live. While testEventCode is set every event shows only under Test Events in Events Manager: clear it to go live. Check the setup with POST …/ad-tracking/test.
Scope: requires links:write.
Rate limit: the general limit of 120 requests per 60 seconds per credential.
Idempotency: send an Idempotency-Key header to make retries safe: a replay within 24 hours returns the original response with Idempotent-Replayed: true.
curl --request PUT \
--url https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accessToken": "EAAB…",
"leadEvent": "Lead",
"pixelId": "123456789012345",
"testEventCode": "TEST12345"
}
'import requests
url = "https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking"
payload = {
"accessToken": "EAAB…",
"leadEvent": "Lead",
"pixelId": "123456789012345",
"testEventCode": "TEST12345"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
accessToken: 'EAAB…',
leadEvent: 'Lead',
pixelId: '123456789012345',
testEventCode: 'TEST12345'
})
};
fetch('https://api.onlyx.ai/v1/creators/{creatorId}/ad-tracking', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"botUsername": "candy_pay_bot",
"configured": true,
"creatorId": "cre_4d1a541312154bfe9cd9",
"enabled": true,
"leadEvent": "Lead",
"leadEvents": [
"Lead",
"Subscribe",
"CompleteRegistration",
"Contact"
],
"pixelId": "123456789012345",
"telegramUsername": "candyyyxxx",
"testEventCode": "TEST12345",
"tokenSaved": true
}Authorizations
Headers
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.
8 - 64^[A-Za-z0-9_-]{8,64}$Body
Response
The saved settings (never the token).