Skip to main content
POST
/
ai
/
sms
/
template
Generate Sms Template
curl --request POST \
  --url https://api.decodahealth.com/ai/sms/template \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "serviceName": "<string>",
  "templateType": "confirmation",
  "modelName": "gemini-2.0-flash",
  "useStructuredOutput": false,
  "previousGeneration": "<string>",
  "feedback": "<string>",
  "currentTemplate": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json

Request schema for generating SMS templates.

serviceName
string
required

Name of the service

templateType
enum<string>
required

Type of SMS template

Available options:
confirmation,
reminder,
cancellation,
followUp,
noShow,
overrideNotice
modelName
string
default:gemini-2.0-flash

Model to use for generation

useStructuredOutput
boolean
default:false

Whether to request structured JSON output

previousGeneration
string | null

Previous generated text for context

feedback
string | null

User feedback for regeneration

currentTemplate
string | null

Current template for reference

Response

Successful Response