Create or Update an Email
Creates a new email, or updates an existing email when the posted body includes a non-zero emailId. The URL path id is required by the route but is ignored by the endpoint — the server uses the emailId value from the JSON body. See Get Email for the full shape of the Email object.
Placeholder in the route. The actual target is taken from emailId in the request body; you can pass 0 here when creating.
{
"emailId": 0,
"name": "Welcome Email",
"campaignId": 69,
"parentId": 0,
"status": "Active",
"from": "hello@example.com",
"subject": "Welcome to Acme",
"preheader": "Thanks for signing up",
"body": "<p>Welcome!</p>",
"plaintext": "Welcome!",
"isEnabled": true,
"isOpenTrackingEnabled": true,
"isClickTrackingEnabled": true
}
{
"emailId": 128,
"name": "Welcome Email (v2)",
"subject": "Welcome to Acme — updated"
}
Id of the email to update. Omit or set to 0 to create a new email.
Display name of the email. Required.
Id of the campaign this email belongs to. Required when creating.
Id of the parent email (used when replying "on top of" another email). Set to 0 for standalone emails.
Email status. One of: Active, Paused, Archived, Deleted.
Standard email header fields. from is required for non-transactional sends; to is populated automatically at send time.
The rendered HTML body of the email.
Optional plaintext version of the body.
Optional CSS stylesheet applied to the email.
Optional JSON payload used by the DailyStory email designer to round-trip structured edits.
Optional AMP-for-Email variant.
Internal description shown in the email list.
Feature flags. isTransactional = true bypasses opt-out checks at send time.
{
"Status": true,
"Message": "",
"Response": {
"id": "128"
}
}
The id of the created or updated email, returned as a string.