RocketCOMS

Create a Message Template

You can create a template for a message, allowing you to easily reuse the same message content. You can use a message template when sending single or batch messages.

Endpoint

POST /v1/message-templates

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Request Body

name

string

Name of the message template.

message

string

Message content.

Returns

Returns the Message Template object. This object contains the template details, status, and a unique ID for the template.

SAMPLE REQUEST

				
					{
  "name": "Spring Campaign",
  "message": "Our spring sale starts tomorrow!"
}
				
			

SAMPLE RESPONSE

				
					{
  "id": "a9e1e4ce-0d9e-4298-8059-178e17d31c11",
  "name": "Spring Campaign",
  "message": "Our spring sale starts tomorrow!",
  "status": "ACTIVE",
  "createdAt": "2023-11-02T16:58:25.808Z",
  "updatedAt": "2023-11-03T16:58:25.808Z"
}