Parameters
| Name | Type | Required | Description |
|---|---|---|---|
brandId | string | Yes | Ocoya brand id from ocoya_list_brands. |
prompt | string | Yes | What the email is about: the offer, news or message, with any facts, dates and links. At least 10 characters. |
templateId | string | No | Optional template id to write it into. |
withImages | boolean | No | Draw AI pictures for it. Defaults to true. |
name | string | No | — |
subject | string | No | Use this subject instead of the one AI writes. |
preheader | string | No | — |
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. |
Request example
{
"name": "ocoya_create_ai_email",
"arguments": {
"brandId": "cmayvq3hk00017apshay5qezu",
"prompt": "Write a launch post for our new analytics dashboard."
}
}Returns
Returns the result of the call as JSON.