Skip to main content

Endpoint

PATCH /api/user/tags/:id
Updates a tag’s name and/or color. You can only update tags that belong to your account.

Authentication

Requires authentication via API token or session cookie.

Path parameters

id
string
required
The tag ID

Request body

All fields are optional. Provide only the fields you want to update.
name
string
New tag name (trimmed of whitespace)
color
string
New hex color code (3 or 6 digits). Must match pattern #[0-9A-Fa-f]{3,6}

Response

Returns the updated tag object.
id
string
Unique identifier for the tag
name
string
Updated tag name
color
string
Updated hex color code
userId
string
ID of the user who owns this tag
createdAt
string
ISO 8601 timestamp of when the tag was created
updatedAt
string
ISO 8601 timestamp of when the tag was last updated

Examples

Update tag color

curl -X PATCH https://your-zipline.com/api/user/tags/cld1234567890 \
  -H "Authorization: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "#10b981"
  }'

Update tag name and color

curl -X PATCH https://your-zipline.com/api/user/tags/cld1234567890 \
  -H "Authorization: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Work Screenshots",
    "color": "#f59e0b"
  }'

Response

{
  "id": "cld1234567890",
  "name": "Work Screenshots",
  "color": "#f59e0b",
  "userId": "user123",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T14:25:00.000Z"
}

Errors

400
error
tag name already exists - Another tag with this name already exists
404
error
Not found - Tag does not exist or doesn’t belong to your account
401
error
Unauthorized - Invalid or missing authentication token

Build docs developers (and LLMs) love