Templates
Create and view message templates. A template is a pre-made message that you can use in various endpoints instead of repetitively typing out the same message content. These templates may also include placeholder text like {{name}} that can be filled in with personalised content later.
POST Create Template
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/cmrsAuthentication Required: Yes
Description
Creates a reusable message template.
Path Parameters
| Property | Description |
|---|---|
| workspace_id | The ID of the workspace to create the template in. |
Body Parameters
| Property | Required | Type | Default | Description |
|---|---|---|---|---|
| message | Yes | String | The content of the template. | |
| enabled | No | Boolean | true | Shows the template in lists when enabled. |
| name | No | String | The name of the template. Used as an identifier for the template. | |
| contentType | No | String | text/plain | The type of message. Accepts text/plain and text/html. |
| domains | No | Array | ['chat'] | An array of strings that indicate where the template can be used in the Message2Give Portal. Valid values: chat (Message2Give Chat) messageGenerator (Express Message) campaigns (Campaigns) emailSignature (Email Signatures) |
| categories | No | Array | An array of Category IDs that the template belongs to. | |
| subject | No | String | The subject for email and MMS messages. | |
| defaultSender | No | String | The default sender ID when this template is selected in Express Message. Can be changed by the user. | |
| sender | No | String | The default sender ID when this template is selected in Express Message. Cannot be changed by the user. | |
| defaultRecipient | No | String | The default recipient when this template is selected in Express Message. Can be changed by the user. | |
| recipient | No | String | The default recipient when this template is selected in Express Message. Cannot be changed by the user. | |
| bccRecipient | No | String | Array of emails that will be BCC'd when sending Emails in Express Message. | |
| offTheRecord | No | Boolean | false | Automatically redacts Express Messages sent using this template. |
| keywords | No | Array | List of words that when detected in Message2Give Chat, will suggest the agent use this template. |
Code Snippet
GET Get All Templates
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/cmrsAuthentication Required: Yes
Description
Retrieve the details of all message templates in your workspace.
Path Parameters
| Property | Description |
|---|---|
| workspace_id | The ID of the workspace to retrieve templates from. |
{
"cmrs": [
{
"id": "1234",
"name": "Test 1-25",
"subject": "",
"message": "Hello. This is a test message for awesome fun times. Super duper",
"bccRecipient": "",
"defaultRecipient": "",
"recipient": "",
"defaultSender": "61400000000",
"sender": "",
"domains": [
"messageGenerator"
],
"format": "short",
"contentType": "text/plain",
"keywords": [],
"categories": [
"5678"
],
"offTheRecord": false,
"enabled": true
},
{
"id": "9876",
"name": "Test 1-26",
"subject": "",
"message": "Awesome placeholder message.",
"bccRecipient": "",
"defaultRecipient": "",
"recipient": "",
"defaultSender": "61400000001",
"sender": "",
"domains": [
"messageGenerator"
],
"format": "short",
"contentType": "text/plain",
"keywords": [],
"categories": [
"7654"
],
"offTheRecord": false,
"enabled": true
}
],
"status": "OK"
}Code Snippet
GET Get Template
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/cmrs/{template_id}Authentication Required: Yes
Description
Retrieve details for a single template in your workspace.
Path Parameters
| Property | Description |
|---|---|
| workspace_id | The ID of the workspace the template belongs to. |
| template_id | The ID of the template being retrieved. |
{
"cmrs": [
{
"id": "1234",
"name": "Test 1-25",
"subject": "",
"message": "Hello. This is a test message for awesome fun times. Super duper",
"bccRecipient": "",
"defaultRecipient": "",
"recipient": "",
"defaultSender": "61400000000",
"sender": "",
"domains": [
"messageGenerator"
],
"format": "short",
"contentType": "text/plain",
"keywords": [],
"categories": [
"5678"
],
"offTheRecord": false,
"enabled": true
}
],
"status": "OK"
}Code Snippet
How is this guide?