Using REST API Request Trigger Campaigns endpoint to update My Token values

Issue

Issue Description
You would like to update My Token values from the Request Trigger Campaigns endpoint, but are unsure of why My Token types can be updated.

 


Solution

Issue Resolution
The following My Token types can be updated from the Request Trigger Campaigns endpoint:

    • Date
    • Image
    • Number
    • Rich Text
    • Score
    • Text


An example of a JSON body in the POST request may look like:


{
   "input":
      {
         "leads" : [
            {
               "id" : 1
            }
         ],
         "tokens" : [
            {
               "name": "{{my.DateToken}}",
               "value": "10/16/2020"
            },
            {
               "name": "{{my.EmailScriptToken}}",
               "value": "{$lead.country}"
            },
            {
               "name": "{{my.ImageToken}}",
               "value": "https://www.marketo.com/"
            },
            {
               "name": "{{my.NumberToken}}",
               "value": 222
            },
            {
               "name": "{{my.RichTextToken}}",
               "value": "<strong>Hello World!</strong>"
            },
            {
               "name": "{{my.ScoreToken}}",
               "value": -10
            },
             {
               "name": "{{my.TextToken}}",
               "value": "Hello World!"
            }
         ]
      }
}