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."
}Preview template with variable substitution
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."
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Template ID
Template preview generated