Tracking pixels
Update a tracking pixel
Rename a tracking pixel or replace its provider or custom-code configuration.
PATCH
Update a tracking pixel
PATCH /v1/tracking-pixel/{pixel_id} updates one tracking pixel in the API
key’s workspace. It requires Tracking pixels: Write
(tracking_pixels.update).
The API playground provides three request variants: Rename only,
Provider configuration, and Custom code configuration.
Select Custom code configuration above the request fields when editing
custom code.
custom is not a provider dropdown option.Rename without changing configuration
Send onlyname to preserve the current type and all compatible configuration.
Update a provider pixel
When changing provider configuration, includetype and pixel_id together.
You may also include name in the same request.
head_code or body_code. After a successful update,
both custom-code fields are null.
Update custom code
Includetype: "custom" whenever changing head_code or body_code.
null to clear one code field. The resulting configuration must
still have a non-empty head_code or body_code.
Change between provider and custom
Type changes are atomic and remove fields that do not belong to the new type.- Provider to custom: send
type: "custom"and at least one code field. Biqli clears the oldpixel_id. - Custom to provider: send the new provider
typeandpixel_id. Biqli clears both custom-code fields. - Provider to provider: send the new
typeand its matchingpixel_id.
Validation behavior
The endpoint returns422 validation_error when:
pixel_idis sent withouttype.head_codeorbody_codeis sent withouttype: "custom".- A provider request includes either custom-code field.
- A custom request includes
pixel_id. - A provider request does not include a non-empty
pixel_id. - The resulting custom configuration has no non-empty code field.
- The body is empty or contains an unknown field.
409 pixel_name_taken. Success returns 200 OK with
the complete updated resource.
Shared API behavior
Authentication is workspace-scoped; see Authentication. Errors use the standard envelope and request IDs described in Errors, and requests are subject to Rate limits.Authorizations
A workspace API key beginning with biqli_.
Path Parameters
Pattern:
^biq_pxl_[0-9A-HJKMNP-TV-Z]{26}$Body
application/json
- Rename only
- Provider configuration
- Custom code configuration
Required string length:
3 - 80
