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

# Get template with contact data placeholders resolved

> Returns the template body with placeholders (`{{firstName}}`, `{{lastName}}`, etc.) resolved against the supplied contact phone/channel. Used by the composer to preview the final message.



## OpenAPI

````yaml /api-reference/openapi.yaml post /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}:
    post:
      tags:
        - User
        - Templates
      summary: Get template with contact data placeholders resolved
      description: >-
        Returns the template body with placeholders (`{{firstName}}`,
        `{{lastName}}`, etc.) resolved against the supplied contact
        phone/channel. Used by the composer to preview the final message.
      operationId: post_user_sms_template_with_data
      parameters:
        - in: path
          name: templateId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserGetTemplateWithDataRequest'
      responses:
        '200':
          description: Resolved template returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResolvedTemplateResponse'
        '404':
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UserGetTemplateWithDataRequest:
      type: object
      properties:
        phoneNumber:
          type: string
          description: >-
            Contact phone number used to locate the contact record for SMS/voice
            placeholder resolution; formatted before lookup.
        selectedUser:
          type: object
          description: >-
            Channel target used to locate the contact when not addressing them
            by phone (e.g., Facebook Messenger).
          properties:
            channelType:
              type: string
              description: >-
                Conversation channel: `sms`, `facebook`, etc. When `facebook`,
                lookup is by `messengerId` instead of `phoneNumber`.
            messengerId:
              type: string
              description: >-
                Channel-specific contact identifier (e.g., Facebook Page-scoped
                user id) used to find the contact when `channelType` is non-SMS.
          additionalProperties: true
      additionalProperties: true
      example:
        phoneNumber: '+14155550133'
        selectedUser:
          channelType: sms
          messengerId: '+14155550133'
    UserResolvedTemplateResponse:
      type: object
      description: >-
        Template body with placeholders resolved against the supplied contact
        context. Returned by `POST /api/user/sms-templates/{templateId}`.
      properties:
        message:
          type: string
          description: The fully-resolved message body.
        type:
          type: string
          enum:
            - sms
            - email
            - automation
        category:
          type: string
      required:
        - message
        - type
      additionalProperties: true
      example:
        message: Hi Alex! Confirming your tour for Friday at 2:00pm.
        type: sms
        category: tours
    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

````