Update Dynamic Content Profile
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/dynamic_content_profiles/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Mailchimp Profile","locale_conditional":{"if_syntax":"{% if ${language} == \"{{locale}}\" %}","else_if_syntax":"{% elsif ${language} == \"{{locale}}\" %}","end_syntax":"{% endif %}","locale_values":{"fr-FR":"fr","en-GB":"UKEN"}}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/dynamic_content_profiles/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Mailchimp Profile", "locale_conditional": { "if_syntax": "{% if ${language} == \"{{locale}}\" %}", "else_if_syntax": "{% elsif ${language} == \"{{locale}}\" %}", "end_syntax": "{% endif %}", "locale_values": { "fr-FR": "fr", "en-GB": "UKEN" } } }'Updates a DynamicContentProfile.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Workspace ID
Conditional ID
Request Body
Section titled “Request Body”object
Example
Mailchimp ProfileThe ESP syntax used to wrap each locale’s content in a conditional when locales are combined into a single email. In the if and else if syntax, {{locale}} is replaced with the locale’s code in the ESP: its mapping in locale_values, or the locale code itself if it has no mapping.
object
Opening syntax for the first locale. Must include {{locale}}.
Example
{% if ${language} == "{{locale}}" %}Opening syntax for every locale after the first. Must include {{locale}}.
Example
{% elsif ${language} == "{{locale}}" %}The closing syntax for the conditional.
Example
{% endif %}Maps a locale code (e.g. fr-FR) to the code the ESP stores for that locale (e.g. fr), for ESPs that use their own locale format. Locales without a mapping use their locale code unchanged.
object
Example
{ "fr-FR": "fr", "en-GB": "UKEN"}Responses
Section titled “ Responses ”Successful
object
The ESP syntax used to wrap each locale’s content in a conditional when locales are combined into a single email. In the if and else if syntax, {{locale}} is replaced with the locale’s code in the ESP: its mapping in locale_values, or the locale code itself if it has no mapping.
object
Opening syntax for the first locale. Must include {{locale}}.
Opening syntax for every locale after the first. Must include {{locale}}.
The closing syntax for the conditional.
Maps a locale code (e.g. fr-FR) to the code the ESP stores for that locale (e.g. fr), for ESPs that use their own locale format. Locales without a mapping use their locale code unchanged.
object
Example
{ "id": "uuid TODO", "name": "Mailchimp Profile", "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z", "organization_id": 12345, "locale_conditional": { "if_syntax": "{% if ${language} == \"{{locale}}\" %}", "else_if_syntax": "{% elsif ${language} == \"{{locale}}\" %}", "end_syntax": "{% endif %}", "locale_values": { "fr-FR": "fr", "en-GB": "UKEN" } }}Unauthorized
object
Example
{ "message": "Record not found", "code": "share_link_expired"}Forbidden
object
Example
{ "message": "Record not found", "code": "share_link_expired"}Not Found
object
Example
{ "message": "Record not found", "code": "share_link_expired"}Unprocessable Entity
object
object
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}