Update Template

Update template

PUT https://api.cm.com/bulkemail/v1.0/accounts/{accountID}/templates/{templateID}

PUT Parameters

Name In Description Required Type Example
AccountID Path The account guid True Guid A8C062E4-ECFD-48D0-89B1-A37D2622B7A9
TemplateID Path The template guid True Guid 6C176F77-A2CD-45BF-B318-EC6150FEE028
Body Body The from address to update True Json object See example request
X-CM-PRODUCTTOKEN Header Your product token True Guid C24A5029-37DD-4161-9728-F80D8639588E
{
    "Name": "Demo",
    "Description": "",
    "HtmlBody": "Omitted for clarity",
    "TextBody": "Follow [[ SpecialLink.ViewInBrowser ]] to view the message in your browser",
    "Json": "Omitted for clarity",
    "MergeFields": {
        "MergeTags": [
            {
                "Name": "Sender.EmailAddress",
                "Value": "{{ Sender.EmailAddress }}",
                "Mapping": "Sender.EmailAddress"
            },
            {
                "Name": "Recipient.EmailAddress",
                "Value": "{{ Recipient.EmailAddress }}",
                "Mapping": "Recipient.EmailAddress"
            }
        ],
        "SpecialLinks": [
            {
                "Type": "system",
                "Label": "Unsubscribe",
                "Link": "[[ SpecialLink.Unsubscribe ]]",
                "Mapping": "SpecialLink.Unsubscribe",
                "Tag" : null
            },
            {
                "Type": "system",
                "Label": "Subscribe",
                "Link": "[[ SpecialLink.Subscribe ]]",
                "Mapping": "SpecialLink.Subscribe",
                "Tag" : null
            },
            {
                "Type": "system",
                "Label": "View in browser",
                "Link": "[[ SpecialLink.ViewInBrowser ]]",
                "Mapping": "SpecialLink.ViewInBrowser",
                "Tag" : null
            }
        ]
    },
    "TemplateEditorType": 2
}

Responses

Http status Description
200 Successful updated
400 Bad request
{
    "ID": "6c176f77-a2cd-45bf-b318-ec6150fee028",
    "AccountID": "a65b6ba1-7b13-4cff-aaf6-c736c977c1d4",
    "Name": "Demo",
    "Description": "",
    "HtmlBody": "Omitted for clarity",
    "TextBody": "Follow [[ SpecialLink.ViewInBrowser ]] to view the message in your browser",
    "Json": "Omitted for clarity",
    "MergeFields": {
        "MergeTags": [
            {
                "Name": "Sender.EmailAddress",
                "Value": "{{ Sender.EmailAddress }}",
                "Mapping": "Sender.EmailAddress"
            },
            {
                "Name": "Recipient.EmailAddress",
                "Value": "{{ Recipient.EmailAddress }}",
                "Mapping": "Recipient.EmailAddress"
            }
        ],
        "SpecialLinks": [
            {
                "Type": "system",
                "Label": "Unsubscribe",
                "Link": "[[ SpecialLink.Unsubscribe ]]",
                "Mapping": "SpecialLink.Unsubscribe"
            },
            {
                "Type": "system",
                "Label": "Subscribe",
                "Link": "[[ SpecialLink.Subscribe ]]",
                "Mapping": "SpecialLink.Subscribe"
            },
            {
                "Type": "system",
                "Label": "View in browser",
                "Link": "[[ SpecialLink.ViewInBrowser ]]",
                "Mapping": "SpecialLink.ViewInBrowser"
            }
        ]
    },
    "CreatedOn": "2017-08-04T14:16:26.283",
    "CreatedOnUtc": "2017-08-04T13:16:26.283Z",
    "ModifiedOn": "2017-08-04T14:16:26.283",
    "ModifiedOnUtc": "2017-08-04T13:16:26.283Z",
    "DeletedOn": null,
    "DeletedOnUtc": null
}

Did this page help you?