Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brandId | string | Yes | Ocoya brand id from ocoya_list_brands. |
emailId | string | Yes | Email id from ocoya_list_emails or ocoya_create_email. |
name | string | No | — |
subject | string | No | — |
preheader | string | No | — |
document | object | No | The email body: {theme?, blocks: […]}. Each block has a type, e.g. {type: “heading”, text, level?: 1-4}, {type: “text”, text} (Markdown-style bold, italics, links), {type: “button”, label, href}, {type: “image”, src, alt?, href?}, {type: “divider”}, {type: “spacer”, height?}, {type: “hero”, title, text?, label?, href?, src?}. Read an existing email with ocoya_get_email to see the full format; the theme is the brand’s when left out. |
audience | object | No | Who gets it: every subscribed contact (omit groupIds), or the contacts in any of groupIds, minus anyone in excludeGroupIds. Group ids from ocoya_list_contact_groups. |
scheduledAt | string or null | No | ISO datetime to send it at, or null to unschedule. |
publishNow | boolean | No | Send it to its whole audience at once. Confirm with the user first. |
Request example
{
"name": "ocoya_update_email",
"arguments": {
"brandId": "cmayvq3hk00017apshay5qezu",
"emailId": "cmwdkjtfh005gy0k4ggzzg1bs",
"scheduledAt": "2026-07-01T09:00:00Z"
}
}Returns
Returns the result of the call as JSON.