How do I use the `DynamicContent` via API?
We have a very simple setup, an email asset with one module containing dynamic content set up in the legacy email editor.
We get the email content using https://{{endpoint}}/rest/asset/v1/email/{{id}}/content.json and it returns a body similar to this
{
"success": true,
"errors": [],
"requestId": "4202#19ee08c5295",
"warnings": [],
"result": [
{
"htmlId": "foobar2026",
"value": "RVMtZm9vYmFyMjAyNg==",
"contentType": "DynamicContent",
"isLocked": false
}
]
}
However, if we attempt anything in the email DynamicContent whether it’s a GET or POST using either of these endpoints https://{{endpoint}}/rest/asset/v1/email/{{id}}/dynamicContent/{{htmlId}}.json where the htmlId is the one returned by the first email content endpoint, we get a no assets found response.
{
"success": true,
"errors": [],
"requestId": "e1d4#19ee08ffc81",
"warnings": [
"No assets found for the given search criteria."
]
}
Can you help clarify how to properly update a DynamicContent block in an email asset?