Easymailing
Email composing

Preview an email's tags for its recipient

POST /email_personalization_previews

POST/email_personalization_previews

Shows the values the tags of an email would take for its first recipient, as plain text, using the same engine as the real send. It does not save or send anything.

When to use: To check how the greeting and other tags will read before sending, or to catch a missing value that would fall back to the default.

When not to use: To know which tags exist, use list_email_personalization_tags. To send, use send_email.

Side effects: None: it is a read-only calculation that uses POST so that addresses do not travel in the URL.

Permissions: Requires a CRM seat and the crm.contacts_companies.write capability. The sender must be a mailbox the user can send from: one of their own or one shared with them (see list_email_senders). Writing from an opportunity also requires crm.opportunities.read and the Work level on its pipeline.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Request Body

The new EmailPersonalizationPreview resource

TypeScript Definitions

Use the request body type in TypeScript.

preview_email_personalization (fase 5): what the tags of an email would say for its first recipient. Generated from the proposal by fase-5/tools/gen_email_sending_api.py; the texts are the proposal's. Read-only: nothing is stored, so the resource has no identifier of its own.

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.easymailing.com/email_personalization_previews" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "record": "/entity/1",    "sender_uuid": "6fd60e87-ecde-4069-8fdb-aebbacafea6d",    "to": "string",    "subject": "string",    "tags": [      {}    ]  }'
{  "recipient": {},  "subject": "string",  "tags": [    {}  ]}