Hello,
I'm trying to replace the value of a my.token and send an email out using the REST API. I'm able to send the email just fine, but the my.token (my.bodyReplacement) is only adding the default value to my email. What am I doing wrong here?
This is the JSON we are sending to update the value of a token.
{
"input": {
"leads": [
{
"id": 327947
}
],
"tokens": [
{
"name": "{{my.bodyReplacement}}",
"value": "Hello World, this is your new body text"
}
]
}
}
Just
"name" : "bodyReplacement"
I tried that and it didn't pull through.
I also tried {{bodyReplacement}}
and bodyReplacement
with and without {{}}
{
"input": {
"leads": [
{
"id": 327947
}
],
"tokens": [
{
"name": "bodyReplacement",
"value": "Hello World, this is your new body text"
}
]
}
}
The documentation says:
It's definitely not all those options! This request to /trigger.json works for me:
{
"input": {
"leads": [
{
"id": 3893678
}
],
"tokens": [
{
"name": "apiToken2",
"value": "12345"
}
]
}
}
The token type needed to be type text.
They were created as script block.
Thank you for your help!
Right, Velocity tokens can't be (very unfortunately) overridden this way.