Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID from ocoya_list_workspaces. |
prompt | string | Yes | What the post should be about. Minimum 10 characters. |
tone | string | No | Caption tone. One of professional, friendly, educational, bold, founder_led. Defaults to professional. |
postLength | string | No | Caption length. One of short, medium, long, extra_long. Defaults to medium. |
socialProfileIds | string[] | No | Connected social profile IDs to attach to the draft. |
brandId | string | No | Brand kit ID from ocoya_list_brand_kits. |
hashtagLibraryId | string | No | Hashtag library ID from ocoya_list_hashtag_libraries. |
generateImage | boolean | No | Whether to generate square image media for the draft. |
imageCount | number | No | Number of generated images when generateImage is true. Use 1 for a single image or 2-5 for a carousel. |
referenceUrls | string[] | No | Image URLs to use as visual references when generateImage is true. |
referenceDesignIds | string[] | No | Studio design IDs from ocoya_list_studio_templates to use as visual references when generateImage is true. |
Request example
Returns
Returns post action details such as post group ID, status, and schedule. The status starts asGENERATING; fetch the post later to see the completed draft.
The generated post is saved as an editable Ocoya draft when background generation finishes unless generation fails and the post moves to ERROR.