API Documentation
A quick look at how to use the PixelTrack API.
Create one or more pixels. The \`count\`, \`anonymizeIp\`, \`disableLocationTracking\`, and \`dataRetentionInDays\` parameters are optional.
curl -X POST /api/pixels \
-H "Authorization: Bearer pxl_key_demo_abc123" \
-H "Content-Type: application/json" \
-d '{"count": 5, "anonymizeIp": true, "disableLocationTracking": true, "dataRetentionInDays": 30}'
Example response:
{
"message": "5 pixel(s) created successfully.",
"pixels": [
{
"id": "user_demo_01-1672531200000-abcdef123",
"trackingUrl": "/track/user_demo_01-1672531200000-abcdef123/pixel.png"
},
{
"id": "user_demo_01-1672531200001-bcdef1234",
"trackingUrl": "/track/user_demo_01-1672531200001-bcdef1234/pixel.png"
},
{
"id": "user_demo_01-1672531200002-cdef12345",
"trackingUrl": "/track/user_demo_01-1672531200002-cdef12345/pixel.png"
},
{
"id": "user_demo_01-1672531200003-def123456",
"trackingUrl": "/track/user_demo_01-1672531200003-def123456/pixel.png"
},
{
"id": "user_demo_01-1672531200004-ef1234567",
"trackingUrl": "/track/user_demo_01-1672531200004-ef1234567/pixel.png"
}
]
}