Skip to main content

Update Pixel

Update the properties of an existing tracking pixel.

Endpoint

PUT /api/pixels/{pixelId}
This endpoint uses the POST HTTP method in the actual implementation, but follows PUT semantics for updating resources.

Headers

Authorization
string
required
Bearer token for authentication

Path Parameters

pixelId
string
required
Pixel UUID

Request Body

name
string
Pixel name (max 100 characters)
slug
string
Pixel slug (min 8 characters, max 100 characters). Must be unique.
All fields are optional. Only provide the fields you want to update.

Response

id
string
Pixel UUID
name
string
Updated pixel name
slug
string
Updated pixel slug
userId
string
Owner user UUID
teamId
string
Team UUID
updatedAt
string
ISO 8601 timestamp of last update

Example Request

curl -X POST "https://your-umami-instance.com/api/pixels/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Email Campaign Tracker"
  }'

Example Response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Updated Email Campaign Tracker",
  "slug": "email-campaign",
  "userId": "660e8400-e29b-41d4-a716-446655440001",
  "teamId": null,
  "updatedAt": "2024-03-15T09:20:00.000Z"
}

Error Responses

400
error
Bad Request - The slug is already taken by another pixel
401
error
Unauthorized - You don’t have permission to update this pixel
404
error
Not Found - Pixel does not exist
If you change the slug, any existing references to the pixel URL will no longer work. Make sure to update all embedded pixel references.
You must have update permissions for the pixel to modify it.

Build docs developers (and LLMs) love