Pixels
The pixels() method provides access to the pixels API endpoints.
Get all pixels
This method returns a list of all pixels available to the user.
Parameters
search(optional): A search string to filter the results.page(optional): The page number to return.pageSize(optional): The number of results to return per page.
Get a pixel by ID
This method returns the details of a specific pixel.
Create a pixel
This method creates a new tracking pixel.
val pixel = api.pixels().createPixel(
name = "New Pixel",
slug = "new-pixel-slug",
teamId = "team-id"
)
Parameters
name(required): The name for the pixel.slug(required): The slug for the pixel.teamId(optional): The ID of the team to associate the pixel with.
Update a pixel
This method updates the details of a specific pixel.
val pixel = api.pixels().updatePixel(
pixelId = "pixel-id",
request = UpdatePixelRequest(
name = "New Pixel Name",
slug = "new-pixel-slug"
)
)
Delete a pixel
This method deletes a specific pixel.