Templates

Using the developers.whispir.com API, messages can be stored as message templates that can be easily referenced within your API calls.

The purpose of using a message template rather than adding your content directly into your message’s API call is to ensure a separation of message content/design and application code.

If you're including the content and design of messages in your application code, changing the content or design often becomes a task for a developer, resulting in potentially lengthy change request cycles. Using a message template can remove this bottleneck: Designers control the look and feel of a message while the developers control when it's triggered.

  • JSON
  • XML

API endpoint

Generic

https://api.<region>.whispir.com/templates/?apikey=<your_api_key>
Content-Type: application/vnd.whispir.template-v1+json 

 

Limited to a workspace

https://api.<region>.whispir.com/workspaces/{:id}/templates/?apikey=<your_api_key>
Content-Type: application/vnd.whispir.template-v1+json 
 

  

Resource type

application/vnd.whispir.template-v1+xml
application/vnd.whispir.template-v1+json

 

Methods supported

GET
POST
PUT
DELETE