Enable or disable a tracking connection
curl --request POST \
--url https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": true
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle"
payload = { "enabled": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"storeUrl": "<string>",
"pixels": [
{
"id": "<string>",
"store": "<string>",
"name": "<string>",
"pixel": "<string>",
"channel": "<string>",
"enabled": true,
"settings": {
"enabled": true,
"hideOriginalIP": true,
"gaAnalytics": true,
"baseDomain": "<string>",
"metadata": {},
"eventSettings": {
"includeEvents": [
"<string>"
],
"excludeEvents": [
"<string>"
]
},
"disableSubscribeEvents": true
},
"createdAt": 123,
"updatedAt": 123,
"published": true,
"hasUnpublishedChanges": true
}
],
"ok": true
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Tracking connections
Enable or disable a tracking connection
Changes the enabled state of an existing store-scoped tracking connection.
POST
/
pixels
/
{storeUrl}
/
{pixelId}
/
toggle
Enable or disable a tracking connection
curl --request POST \
--url https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": true
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/pixels/{storeUrl}/{pixelId}/toggle"
payload = { "enabled": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"storeUrl": "<string>",
"pixels": [
{
"id": "<string>",
"store": "<string>",
"name": "<string>",
"pixel": "<string>",
"channel": "<string>",
"enabled": true,
"settings": {
"enabled": true,
"hideOriginalIP": true,
"gaAnalytics": true,
"baseDomain": "<string>",
"metadata": {},
"eventSettings": {
"includeEvents": [
"<string>"
],
"excludeEvents": [
"<string>"
]
},
"disableSubscribeEvents": true
},
"createdAt": 123,
"updatedAt": 123,
"published": true,
"hasUnpublishedChanges": true
}
],
"ok": true
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Required for GET /stores and optional for store-scoped paths.
Example:
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Path Parameters
The exact store URL returned by GET /context or GET /stores.
Example:
"store.example.com"
A tracking connection ID returned by the list endpoint.
Example:
"pix_01J8W8D5GSPN3XQYF4K2A6M7RT"
Body
application/json