Templates

Overriding templates

Users can easily override the content of the message template by supplying the content inline with the request to the /messages endpoint.

Any information provided in the message request will take precedence over the templated content.

All of the features that are specified in the template (for example, any message aliasing) will still be respected when the message is delivered.

  • JSON
  • XML

Overriding templates

You can override content in the template by supplying it inline with the message request:

{{codeStart}}

HTTP 1.1 POST https://api.<region>.whispir.com/messages?apikey=[your_api_key]

Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk

x-api-key: your_api_key

Content-Type: application/vnd.whispir.message-v1+json

{

"to" : "+1000000000",

"messageTemplateName" : "Sample SMS Template",

"subject" : "This will override the template subject",

"body" : "This will override the template SMS body"

}

{{codeEnd}}