> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tetherai.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a template category (superadmin)

> Creates a new template category used to group SMS/campaign/script/automation templates. Superadmin only. Category names must be unique.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/user/template-categories
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/user/template-categories:
    post:
      tags:
        - User
        - Templates
      summary: Create a template category (superadmin)
      description: >-
        Creates a new template category used to group
        SMS/campaign/script/automation templates. Superadmin only. Category
        names must be unique.
      operationId: post_user_template_categories
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateTemplateCategoryRequest'
      responses:
        '201':
          description: Category created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserTemplateCategoryDocument'
        '400':
          description: Validation error or name exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UserCreateTemplateCategoryRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            Internal slug for the category; lower-cased and trimmed on save, and
            must be unique across all categories.
        displayName:
          type: string
          description: >-
            Human-readable label shown to users in the template picker (e.g.,
            "Introduction").
        description:
          type: string
          description: Optional short blurb describing when to use this category.
        color:
          type: string
          description: >-
            Tailwind class string (or hex) used for the category badge; defaults
            to `bg-gray-100 text-gray-800` when omitted.
      required:
        - name
        - displayName
      additionalProperties: true
      example:
        name: introduction
        displayName: Introduction
        description: First-touch templates for new leads.
        color: '#3B82F6'
    UserTemplateCategoryDocument:
      type: object
      description: >-
        Template category record used to group SMS / campaign / script /
        automation templates. Returned by category create/update.
      properties:
        _id:
          type: string
        name:
          type: string
        displayName:
          type: string
        description:
          type: string
        color:
          type: string
        sortOrder:
          type: integer
        isActive:
          type: boolean
        createdBy:
          type: object
          properties:
            fullName:
              type: string
            email:
              type: string
              format: email
          additionalProperties: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - name
      additionalProperties: true
      example:
        _id: 64d2f9c5e8a1d4e001a0b1c2
        name: tours
        displayName: Tours
        description: Tour-confirmation and follow-up templates.
        color: '#3B82F6'
        sortOrder: 0
        isActive: true
        createdBy:
          fullName: Acme Admin
          email: admin@acme.example
        createdAt: '2026-05-18T12:34:56.000Z'
        updatedAt: '2026-05-18T12:34:56.000Z'
    UserErrorResponse:
      type: object
      description: >-
        Generic error envelope returned by Users endpoints. Most paths only
        include `error`; some add `details` for diagnostic context.
      properties:
        error:
          type: string
        details:
          type: string
      required:
        - error
      additionalProperties: true
      example:
        error: User not found
        details: No user with id 64ee9a8b1e7f2a0011223399
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````