Skip to main content

Parameters

NameTypeRequiredDescription
workspaceIdstringYesWorkspace ID from ocoya_list_workspaces.
promptstringYesWhat the post should be about. Minimum 10 characters.
tonestringNoCaption tone. One of professional, friendly, educational, bold, founder_led. Defaults to professional.
postLengthstringNoCaption length. One of short, medium, long, extra_long. Defaults to medium.
socialProfileIdsstring[]NoConnected social profile IDs to attach to the draft.
brandIdstringNoBrand kit ID from ocoya_list_brand_kits.
hashtagLibraryIdstringNoHashtag library ID from ocoya_list_hashtag_libraries.
generateImagebooleanNoWhether to generate square image media for the draft.
imageCountnumberNoNumber of generated images when generateImage is true. Use 1 for a single image or 2-5 for a carousel.
referenceUrlsstring[]NoImage URLs to use as visual references when generateImage is true.
referenceDesignIdsstring[]NoStudio design IDs from ocoya_list_studio_templates to use as visual references when generateImage is true.

Request example

{
  "name": "ocoya_create_ai_post",
  "arguments": {
    "workspaceId": "cmayvq3hk00017apshay5qezu",
    "prompt": "Create a LinkedIn post announcing our new analytics dashboard for ecommerce brands.",
    "tone": "professional",
    "postLength": "medium",
    "socialProfileIds": ["clh49poxf008x8kov4ncbjty9"],
    "brandId": "cmayw38dz00047apsue9nw4tf",
    "hashtagLibraryId": "cmayw7l5200067apsmz2tv7e8",
    "generateImage": true,
    "imageCount": 3,
    "referenceDesignIds": ["design_123"]
  }
}

Returns

Returns post action details such as post group ID, status, and schedule. The status starts as GENERATING; 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.