Create Tag
POST /api/v1/tags
Creates a new tag in your organization.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Tag name (must be unique within the organization) |
description | string | No | Optional description |
color | string | No | Hex color code (e.g., #0075ca). Defaults to #6b7280 |
Example Request
curl -X POST "https://orchestrator.assemblyline.sh/api/v1/tags" \
-H "api-key: al_xxxxxxxxxxxx" \
-H "api-secret: xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"name": "monthly",
"color": "#0075ca",
"description": "Monthly recurring stations"
}'
Response
Status: 201 Created
{
"data": {
"id": "tag_abc123",
"name": "monthly",
"description": "Monthly recurring stations",
"color": "#0075ca",
"created_at": "2024-01-10T08:00:00Z"
}
}
Errors
| Code | Description |
|---|---|
400 | Validation error (missing name, invalid color, duplicate name) |
401 | Invalid or missing API credentials |
403 | API key lacks tags:create permission |
Duplicate Name
{
"error": {
"code": "DUPLICATE_ERROR",
"message": "Tag \"monthly\" already exists"
}
}
Invalid Color
{
"error": {
"code": "VALIDATION_ERROR",
"message": "color must be a valid hex color (e.g., #0075ca)"
}
}