Edit email
Update an email by its ID with a PATCH request. All fields are optional and only the fields you send are changed. The old route /communications/email/edit/:id is deprecated.
ReferenceView as Markdown
Update an email by its ID with a PATCH request. All fields are optional and only the fields you send are changed. The old route /communications/email/edit/:id is deprecated.
Edit an email in Subrite.
PATCH{baseUrl}/api/v1/communications/:id/email/edit (get the :id from the email list)All fields are optional in the update request. Only the fields included in the request body will be updated; other fields will remain unchanged.
{
// Optional fields - include only what you want to update
"communicationType": "marketing", // Optional: "marketing" or "information"
"name": "coming from external", // Optional: template name
"senderId": 2, // Optional: sender ID
"consentId": null, // Optional: consent ID
"segmentId": 1, // Optional: segment ID
"subject": "email subject", // Optional: email subject
"emailPreviewText": "sample", // Optional: preview text
"emailContent": "<div>hello world</div>" // Optional: email HTML content
}// Only updating email content and subject
{
"subject": "Updated Subject",
"emailContent": "<div>New content</div>"
}{
"id": 156,
"name": "yy",
"communicationType": "information",
"smsContent": null,
"subject": "demo test",
"emailEditorRawContent": null,
"emailPreviewText": "demo preview data",
"template": null,
"status": "ready",
"communicationChannel": "email",
"createdAt": "2025-03-24T11:33:08.872Z",
"updatedAt": "2025-03-25T16:15:39.170Z",
"senderId": 1,
"sender": "mitsiden-email",
"segmentId": 1,
"segmentName": "Bangladeshi members",
"consentId": null,
"tenantId": 1,
"adminUserId": null,
"scheduledAt": null,
"completedAt": null,
"emailHtmlPreview": null,
"deliveryMethod": "API"
}