Message2Give Logo
Message2Give DocsVersion 1.2.8

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}/cmrs

Authentication Required: Yes

Description

Creates a reusable message template.

Path Parameters

PropertyDescription
workspace_idThe ID of the workspace to create the template in.

Body Parameters

PropertyRequiredTypeDefaultDescription
messageYesStringThe content of the template.
enabledNoBooleantrueShows the template in lists when enabled.
nameNoStringThe name of the template. Used as an identifier for the template.
contentTypeNoStringtext/plainThe type of message. Accepts text/plain and text/html.
domainsNoArray['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)
categoriesNoArrayAn array of Category IDs that the template belongs to.
subjectNoStringThe subject for email and MMS messages.
defaultSenderNoStringThe default sender ID when this template is selected in Express Message. Can be changed by the user.
senderNoStringThe default sender ID when this template is selected in Express Message. Cannot be changed by the user.
defaultRecipientNoStringThe default recipient when this template is selected in Express Message. Can be changed by the user.
recipientNoStringThe default recipient when this template is selected in Express Message. Cannot be changed by the user.
bccRecipientNoStringArray of emails that will be BCC'd when sending Emails in Express Message.
offTheRecordNoBooleanfalseAutomatically redacts Express Messages sent using this template.
keywordsNoArrayList 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}/cmrs

Authentication Required: Yes

Description

Retrieve the details of all message templates in your workspace.

Path Parameters

PropertyDescription
workspace_idThe ID of the workspace to retrieve templates from.
Example Response
{
    "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

PropertyDescription
workspace_idThe ID of the workspace the template belongs to.
template_idThe ID of the template being retrieved.
Example Response
{
    "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?

On this page