Skip to main content

Endpoint

POST /api/user/tags
Creates a new tag that can be used to organize and categorize files.

Authentication

Requires authentication via API token or session cookie.

Rate limiting

1 request per second

Request body

name
string
required
Tag name (trimmed of whitespace)
color
string
required
Hex color code (3 or 6 digits). Must match pattern #[0-9A-Fa-f]{3,6}Examples: #f00, #ff0000, #3b82f6

Response

Returns the created tag object.
id
string
Unique identifier for the tag
name
string
Tag name
color
string
Hex color code for the tag
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

Example

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

Response

{
  "id": "cld1234567890",
  "name": "Screenshots",
  "color": "#3b82f6",
  "userId": "user123",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}

Errors

400
error
Cannot create tag with the same name - A tag with this name already exists for your account
401
error
Unauthorized - Invalid or missing authentication token
429
error
Rate limit exceeded - Too many requests (max 1/second)

Build docs developers (and LLMs) love