(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").
POST /api/tagsAuthentication
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name (body) | string | Yes | The name of the tag. Choose descriptive names that clearly indicate the tag's purpose. |
color (body) | string | No | The 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
curl -X POST "https://hoko.to/api/tags" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '[
{
"name": "Marketing",
"color": "blue"
}
]'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();[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing",
"color": "blue"
}
]