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

# Generate Sms Template

> Generate SMS templates.



## OpenAPI

````yaml post /ai/sms/template
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /ai/sms/template:
    post:
      tags:
        - provider
        - ai
      summary: Generate Sms Template
      description: Generate SMS templates.
      operationId: generate_sms_template_ai_sms_template_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SMSTemplateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SMSTemplateRequest:
      properties:
        modelName:
          type: string
          title: Modelname
          description: Model to use for generation
          default: gemini-2.5-flash
        useStructuredOutput:
          type: boolean
          title: Usestructuredoutput
          description: Whether to request structured JSON output
          default: false
        previousGeneration:
          anyOf:
            - type: string
            - type: 'null'
          title: Previousgeneration
          description: Previous generated text for context
        feedback:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedback
          description: User feedback for regeneration
        serviceName:
          type: string
          title: Servicename
          description: Name of the service
        templateType:
          type: string
          enum:
            - confirmation
            - reminder
            - cancellation
            - followUp
            - noShow
            - overrideNotice
          title: Templatetype
          description: Type of SMS template
        currentTemplate:
          anyOf:
            - type: string
            - type: 'null'
          title: Currenttemplate
          description: Current template for reference
      type: object
      required:
        - serviceName
        - templateType
      title: SMSTemplateRequest
      description: Request schema for generating SMS templates.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````