Pixels
Retargeting pixels fire on the redirect page when someone clicks one of your short links, letting you build an ad audience from your link traffic. Register a pixel here, then attach it to links with pixel_ids.
| Method | Path | Scope |
|---|---|---|
GET | /v1/pixels | pixels:read |
POST | /v1/pixels | pixels:write |
GET | /v1/pixels/{id} | pixels:read |
PATCH | /v1/pixels/{id} | pixels:write |
DELETE | /v1/pixels/{id} | pixels:write |
Supported platforms
| Value | Platform |
|---|---|
facebook | Meta (Facebook & Instagram) |
tiktok | TikTok |
pinterest | |
google_ads | Google Ads |
Any other value is rejected with 422 validation_error.
The pixel object
{
"id": "3f9c8a71-2b4d-4e60-8a15-9d7c6b3e21f8",
"platform": "facebook",
"name": "Meta Retargeting",
"created_at": "2026-08-28T10:14:02.000000Z",
"updated_at": "2026-08-28T10:14:02.000000Z"
}| Field | Type | Description |
|---|---|---|
id | uuid | The pixel’s identifier |
platform | string | One of the supported platform values above |
name | string | Your own label for the pixel |
created_at | timestamp | When the pixel was registered |
updated_at | timestamp | When the pixel was last modified |
pixel_id and access_token are write-only. Neither is ever returned by
the API, on creation or afterwards — the access token in particular is a
credential for your ad platform, and the API will not read it back out. Keep
your own record of which platform pixel id a given Link Squeeze pixel maps to,
or look it up in the dashboard.
List pixels
GET /v1/pixelsScope: pixels:read
Returns your pixels, newest first, in the standard paginated shape. Supports page and per_page (default 15, maximum 100).
curl https://app.linksqueeze.io/api/v1/pixels \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Accept: application/json"Create a pixel
POST /v1/pixelsScope: pixels:write
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | One of facebook, tiktok, pinterest, google_ads. |
name | string | Yes | Your label for the pixel, maximum 255 characters. |
pixel_id | string | Yes | The pixel identifier from the ad platform, maximum 255 characters. Write-only. |
access_token | string | No | Conversions API access token, where the platform supports server-side events. Write-only. |
Returns 201 Created with the pixel object.
curl -X POST https://app.linksqueeze.io/api/v1/pixels \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"platform": "facebook",
"name": "Meta Retargeting",
"pixel_id": "1234567890"
}'Where to find pixel_id for each platform is covered in the pixel setup guides — see adding a Meta pixel and adding a Google Ads tag.
Retrieve a pixel
GET /v1/pixels/{id}Scope: pixels:read
curl https://app.linksqueeze.io/api/v1/pixels/3f9c8a71-2b4d-4e60-8a15-9d7c6b3e21f8 \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Accept: application/json"Update a pixel
PATCH /v1/pixels/{id}Scope: pixels:write
Every field is optional; those you omit are left unchanged.
| Field | Type | Description |
|---|---|---|
platform | string | Change the platform. |
name | string | Rename the pixel. |
pixel_id | string | Replace the platform pixel identifier. |
access_token | string | Replace the Conversions API access token. |
Returns 200 OK with the updated pixel object.
curl -X PATCH https://app.linksqueeze.io/api/v1/pixels/3f9c8a71-2b4d-4e60-8a15-9d7c6b3e21f8 \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{ "name": "Meta Retargeting (Q3)" }'Updating pixel_id takes effect on the next click — links already attached to the pixel begin firing the new identifier without needing to be updated themselves.
Delete a pixel
DELETE /v1/pixels/{id}Scope: pixels:write
Returns 204 No Content. The pixel stops firing on every link it was attached to; the links themselves keep working.
curl -X DELETE https://app.linksqueeze.io/api/v1/pixels/3f9c8a71-2b4d-4e60-8a15-9d7c6b3e21f8 \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Accept: application/json"Attaching pixels to links
Pixels are attached when you create or update a link, by passing their UUIDs in pixel_ids:
curl -X POST https://app.linksqueeze.io/api/v1/links \
-H "Authorization: Bearer $LINKSQUEEZE_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"destination_url": "https://example.com/summer-sale",
"pixel_ids": ["3f9c8a71-2b4d-4e60-8a15-9d7c6b3e21f8"]
}'pixel_ids replaces the full set on the link — send every pixel you want attached, not just the new one. Send [] to detach all of them. A pixel that is not registered to your account is rejected with 422.
When a link with pixels attached is clicked, each pixel that fires emits a pixel.fired webhook event.