Skip to main content
POST
/
templates
/
{id}
/
preview
Preview template
curl --request POST \
  --url https://api-message.nativehub.live/api/v1/templates/{id}/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "variables": {
    "name": "Alice",
    "otp": "123456",
    "validity": "5"
  }
}
'
{
  "preview": "Dear Alice, your OTP is 123456. Valid for 5 minutes."
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Template ID

Body

application/json
variables
object
required

Response

200 - application/json

Template preview generated

preview
string