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

# Reorder template categories (superadmin)

> Updates the sortOrder of template categories to match the supplied id array (first id becomes sortOrder 0). Superadmin only.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/user/template-categories/reorder
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/reorder:
    post:
      tags:
        - User
        - Templates
      summary: Reorder template categories (superadmin)
      description: >-
        Updates the sortOrder of template categories to match the supplied id
        array (first id becomes sortOrder 0). Superadmin only.
      operationId: post_user_template_categories_reorder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserReorderTemplateCategoriesRequest'
      responses:
        '200':
          description: Categories reordered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSimpleMessageResponse'
        '400':
          description: categoryIds must be an array
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '403':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UserReorderTemplateCategoriesRequest:
      type: object
      properties:
        categoryIds:
          type: array
          items:
            type: string
          description: >-
            Category `_id`s in their desired display order; the first id becomes
            `sortOrder: 0`.
      required:
        - categoryIds
      additionalProperties: false
      example:
        categoryIds:
          - 64eea1110000000000000031
          - 64eea1110000000000000032
          - 64eea1110000000000000033
    UserSimpleMessageResponse:
      type: object
      description: >-
        Generic single-message success envelope used for reset-password /
        reorder / etc.
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: true
      example:
        message: Password reset successfully
    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

````