Pixels API
Add, list, change and delete Meta, Google, TikTok, LinkedIn, Pinterest, X, Snapchat, Microsoft, Reddit and Quora pixels, then fire them on links, with the siz.la REST API.
A pixel is an ad or analytics id, such as a Meta pixel or a Google Analytics measurement id, that fires when someone clicks a link, before the visitor moves on. Reading needs a key. Adding, changing and deleting pixels need a key with write access.
To use a pixel, send its id in the pixels list when you make or change a link (see (https://siz.la/docs/links)). A link can fire a limited number of pixels at once. Deleting a pixel takes it off every link that used it.
List pixels
GET/api/pixels
Your pixels by name. Send their ids as pixels when you make or change a link.
Needs: API key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | Query | integer | How many pixels to return on a page. 1 to 100. Default 15. |
page | Query | integer | Which page to return. At least 1. Default 1. |
Example request
curl "https://siz.la/api/pixels?limit=10&page=1" \
-H "Authorization: Bearer $SIZLA_API_KEY"const response = await fetch("https://siz.la/api/pixels?limit=10&page=1", {
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://siz.la/api/pixels",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
params={
"limit": 10,
"page": 1,
},
)
print(response.json())$ch = curl_init('https://siz.la/api/pixels?limit=10&page=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": "0",
"data": {
"result": 1,
"perpage": 10,
"currentpage": 1,
"nextpage": null,
"maxpage": 1,
"pixels": [
{
"id": 9,
"type": "meta",
"name": "Spring campaign",
"tag": "123456789012345",
"date": "2026-11-12 08:20:00"
}
]
}
}Errors specific to this call
403: The plan does not include pixels.
Notes
erroris the text"0"on this endpoint and the number0on the others.
Add a pixel
POST/api/pixel/add
Add a pixel. The id is checked against the format of the type you pick.
Needs: API key with write access.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
type (required) | Body | string | Where the pixel reports to. One of meta, google_ads, ga4, tiktok, linkedin, pinterest, x, snapchat, microsoft, reddit, quora. |
name (required) | Body | string | A name for you. Only you see it. Up to 80 characters. |
tag (required) | Body | string | The pixel id from the provider. It must fit the format of the type. Up to 60 characters. |
Example request
curl -X POST "https://siz.la/api/pixel/add" \
-H "Authorization: Bearer $SIZLA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"meta","name":"Spring campaign","tag":"123456789012345"}'const response = await fetch("https://siz.la/api/pixel/add", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"type": "meta",
"name": "Spring campaign",
"tag": "123456789012345"
}),
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.post(
"https://siz.la/api/pixel/add",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
json={
"type": "meta",
"name": "Spring campaign",
"tag": "123456789012345",
},
)
print(response.json())$ch = curl_init('https://siz.la/api/pixel/add');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'meta',
'name' => 'Spring campaign',
'tag' => '123456789012345',
]),
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": 0,
"id": 9
}Errors specific to this call
400: The type or id is not valid, you already have that pixel, or the account has the most pixels it can keep.messagesays which.403: The plan does not include pixels.
Notes
- Ids by type:
metais the pixel id, all digits, from Events Manager;google_adsis the conversion id that starts with AW-;ga4is the measurement id that starts with G-;tiktokis the pixel id from TikTok Events Manager;linkedinis the Insight Tag partner id, all digits;pinterestis the tag id, all digits, from Pinterest Ads;xis the pixel id from X Ads events manager;snapchatis the pixel id from Snapchat Ads Manager, with its dashes;microsoftis the UET tag id, all digits;redditis the pixel id from Reddit Ads, starting with t2_ or a2_;quorais the pixel id from Quora Ads Manager, 32 letters and digits.
Update a pixel
PUT/api/pixel/{id}/update
Change a pixel. Only the fields you send change. Links that use it fire the new id from then on.
Needs: API key with write access.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | Path | integer | The pixel's id. At least 1. |
type | Body | string | Where the pixel reports to. One of meta, google_ads, ga4, tiktok, linkedin, pinterest, x, snapchat, microsoft, reddit, quora. |
name | Body | string | A name for you. Only you see it. Up to 80 characters. |
tag | Body | string | The pixel id from the provider. It must fit the format of the type. Up to 60 characters. |
Example request
curl -X PUT "https://siz.la/api/pixel/9/update" \
-H "Authorization: Bearer $SIZLA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Spring campaign 2026"}'const response = await fetch("https://siz.la/api/pixel/9/update", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Spring campaign 2026"
}),
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.put(
"https://siz.la/api/pixel/9/update",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
json={
"name": "Spring campaign 2026",
},
)
print(response.json())$ch = curl_init('https://siz.la/api/pixel/9/update');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Spring campaign 2026',
]),
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": 0,
"message": "Pixel has been updated successfully"
}Errors specific to this call
400: A value is not valid.messagesays which.403: The plan does not include pixels.404: The pixel does not exist or belongs to someone else.
Delete a pixel
DELETE/api/pixel/{id}/delete
Delete a pixel. Every link that used it stops firing it.
Needs: API key with write access.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id (required) | Path | integer | The pixel's id. At least 1. |
Example request
curl -X DELETE "https://siz.la/api/pixel/9/delete" \
-H "Authorization: Bearer $SIZLA_API_KEY"const response = await fetch("https://siz.la/api/pixel/9/delete", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.SIZLA_API_KEY}`,
},
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.delete(
"https://siz.la/api/pixel/9/delete",
headers={"Authorization": f"Bearer {os.environ['SIZLA_API_KEY']}"},
)
print(response.json())$ch = curl_init('https://siz.la/api/pixel/9/delete');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.getenv('SIZLA_API_KEY'),
],
]);
$data = json_decode(curl_exec($ch), true);Example answer, status 200
{
"error": 0,
"message": "Pixel has been deleted successfully"
}Errors specific to this call
403: The plan does not include pixels.404: The pixel does not exist or belongs to someone else.