site logo

Tettra Help Docs

  • Category IconGetting Started
  • Category IconUsing Tettra
  • Category IconKai AI Features
  • Category IconIntegrations
    • Category IconSlack Integration
    • Category IconGoogle Workspace Integration
    • Category IconGitHub Integration
    • Category IconZapier Integration
    • Category IconNotion Integration
    • Category IconAPI Overview
      • What is the Tettra API?
      • How to find your API credentials
      • Category IconPages
      • Category IconCategories and Subcategories
        • API Endpoint: Create Category
        • API Endpoint: Get All Category Items
      • API Endpoint: Search
      • API Endpoint: Create a Question
  • Category IconUsers & Permissions
  • Category IconAccount Management
  • Category IconBilling & Payments
  • Category IconSecurity

API Endpoint: Create Category

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 ID
  • api_key (body): Your API key
  • name (body, required): Category name (max 191 characters, cannot contain < or >)
  • description (body, optional): Category description


Request 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 key
  • 422 Unprocessable Entity: Validation errors (missing name, duplicate name, invalid characters)



Previous
API Endpoint: Suggest a New Page
Next
API Endpoint: Get All Category Items
Powered by Tettra