> ## 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 an SMS template

> Updates name, body, type, or category on a template the authenticated user owns (or any template, for admins). At least one field must be supplied.



## OpenAPI

````yaml /api-reference/openapi.yaml put /api/user/sms-templates/{templateId}
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/sms-templates/{templateId}:
    put:
      tags:
        - User
        - Templates
      summary: Update an SMS template
      description: >-
        Updates name, body, type, or category on a template the authenticated
        user owns (or any template, for admins). At least one field must be
        supplied.
      operationId: put_user_sms_template
      parameters:
        - in: path
          name: templateId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserUpdateSmsTemplateRequest'
      responses:
        '200':
          description: Template updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSmsTemplateDocument'
        '400':
          description: At least one field is required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UserUpdateSmsTemplateRequest:
      type: object
      properties:
        name:
          type: string
          description: New human-readable template title; omit to leave unchanged.
        template:
          type: string
          description: >-
            New template body with `{{firstName}}`-style placeholders; omit to
            leave unchanged.
        type:
          type: string
          description: >-
            New template kind (`sms`, `campaign`, `script`, `automation`);
            switching to/from `automation` clears the `category` field.
        category:
          type: string
          description: New category slug; ignored when the template type is `automation`.
      additionalProperties: true
      example:
        name: Intro - new lead (v2)
        template: Hi {{firstName}}, just checking in — got a sec to chat today?
    UserSmsTemplateDocument:
      type: object
      description: >-
        A reusable template (`type`: sms / campaign / script / automation).
        Returned by create/update template endpoints.
      properties:
        _id:
          type: string
        name:
          type: string
        template:
          type: string
          description: Template body with `{{firstName}}`-style placeholders.
        type:
          type: string
          enum:
            - sms
            - email
            - campaign
            - script
            - automation
        category:
          type: string
        organizationId:
          type: string
        userId:
          type: string
        createdBy:
          type: string
        updatedBy:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - _id
        - name
        - template
        - type
      additionalProperties: true
      example:
        _id: 64d2f9c5e8a1d4e001a0b1c2
        name: Tour confirm — Maple Court
        template: >-
          Hi {{firstName}}! Confirming your tour for {{tour.date}} at
          {{tour.time}}.
        type: sms
        category: tours
        organizationId: 64a1b2c3d4e5f60012345678
        userId: 64a1b2c3d4e5f60012345679
        createdBy: 64a1b2c3d4e5f60012345679
        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

````