> ## 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.

# Update a template category (superadmin)

> Updates a template category fields (displayName, description, color, isActive). Superadmin only. Returns 400 if the new name conflicts with another category.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/user/template-categories/{id}
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/{id}:
    put:
      tags:
        - User
        - Templates
      summary: Update a template category (superadmin)
      description: >-
        Updates a template category fields (displayName, description, color,
        isActive). Superadmin only. Returns 400 if the new name conflicts with
        another category.
      operationId: put_user_template_category
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateTemplateCategoryRequest'
      responses:
        '200':
          description: Category updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserTemplateCategoryDocument'
        '400':
          description: Category name already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '404':
          description: Category not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UserUpdateTemplateCategoryRequest:
      type: object
      properties:
        name:
          type: string
          description: >-
            New internal slug; lower-cased and trimmed before uniqueness check —
            endpoint returns 400 if it collides with another category.
        displayName:
          type: string
          description: New human-readable label shown in the template picker.
        description:
          type: string
          description: New blurb describing the category; pass an empty string to clear.
        color:
          type: string
          description: New Tailwind class string (or hex) for the category badge.
        isActive:
          type: boolean
          description: >-
            Whether the category should appear in pickers and lists; setting
            `false` soft-hides without deleting.
      additionalProperties: true
      example:
        displayName: Introduction
        color: '#2563EB'
        isActive: true
    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

````