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

# Get SMS Template

> Fetches a single template's body and its placeholder variables.



## OpenAPI

````yaml GET /text/templates/{templateId}
openapi: 3.0.1
info:
  title: CollectWise API
  description: >-
    An API for managing debtors, tracking statuses, and automating debt
    collection processes
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://collectwiseapi.com
security:
  - apiKey: []
paths:
  /text/templates/{templateId}:
    get:
      summary: Get an SMS template
      description: Fetches a single template's body and its placeholder variables.
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            type: integer
          description: The template's identifier.
      responses:
        '200':
          description: The template.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SmsTemplate'
              example:
                templateId: 100
                accountId: '99999'
                message: >-
                  {Consumer Name}, {Company Name} is a debt collector attempting
                  to collect a debt. Visit {Website Payment} using your account#
                  {Account Number} or call {Phone#}. Reply STOP to opt out.
                placeholders:
                  - Consumer Name
                  - Company Name
                  - Website Payment
                  - Account Number
                  - Phone#
        '400':
          description: '`templateId` is not a valid integer.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: templateId must be an integer
        '403':
          description: Texting is not enabled for your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Texting is not enabled for this organization
        '404':
          description: No template with that id exists in your organization's account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Template not found
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextError'
              example:
                error: Too many requests
components:
  schemas:
    SmsTemplate:
      type: object
      required:
        - templateId
        - accountId
        - message
        - placeholders
      properties:
        templateId:
          type: integer
          description: Identifier for the template.
        accountId:
          type: string
          description: >-
            The account the template belongs to (your organization's configured
            account).
        message:
          type: string
          description: The template body, containing `{placeholder}` tokens.
        placeholders:
          type: array
          items:
            type: string
          description: Variable names you must supply in `variables` when sending.
    TextError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
      example:
        error: Texting is not enabled for this organization
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: collectwise_key

````