The Create Category endpoint creates a new top-level category within a team.
URL: https://app.tettra.com/api/teams/{team_id}/categories
HTTP Method: POST
Parameters:
team_id
(path): Team IDapi_key
(body): Your API keyname
(body, required): Category name (max 191 characters, cannot contain <
or >
)description
(body, optional): Category descriptionRequest Example:
curl -X POST "https://tettra-wiki.test/api/teams/1/categories" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"name": "Engineering Documentation",
"description": "Technical documentation and guides"
}'
Response (201 Created):
{
"success": true,
"category": {
"id": 123,
"name": "Engineering Documentation",
"description": "Technical documentation and guides",
"team_id": 1,
"icon": "/img/category-icons/category.svg",
"icon_color_hex": "d8d8d8"
}
}
Error Responses:
401 Unauthorized
: Invalid API key422 Unprocessable Entity
: Validation errors (missing name, duplicate name, invalid characters)