(POST) Create tags

Create one or more tags. Each tag requires a name, and color is optional.

Endpoint

POST /api/tags

Create one or more tags. Accepts an array of tag objects.

Each tag requires a name. Color is optional (defaults to "slate").

Endpoint text
POST /api/tags

Authentication

Requires authentication with an API key that has the tagsWrite scope.

Request Body

The request body must be an array of tag objects. Each object represents one tag to create.

You can create up to 10,000 tags in a single request. However, the actual maximum may be lower based on your subscription plan limits and available resources.

ParameterTypeRequiredDescription
name (body)stringYesThe name of the tag. Choose descriptive names that clearly indicate the tag's purpose.
color (body)stringNoThe color of the tag. Must be one of the available color values (default: "slate").

Plan Limits

The actual maximum number of tags you can create per request may be lower than 10,000 based on your subscription plan limits and available resources. The system will enforce both the hard limit (10,000) and your plan-specific limits.

Examples

Available Colors
slate
gray
zinc
neutral
stone
red
orange
amber
yellow
lime
green
emerald
teal
cyan
sky
blue
indigo
violet
purple
fuchsia
pink
rose
Request cURL
curl -X POST "https://hoko.to/api/tags" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "name": "Marketing",
      "color": "blue"
    }
  ]'
Request JavaScript
const response = await fetch("https://hoko.to/api/tags", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify([
    {
      name: "Marketing",
      color: "blue"
    }
  ])
});
const tags = await response.json();
Response json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Marketing",
    "color": "blue"
  }
]