> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ocoya.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ocoya_create_post

> Create a draft, scheduled post, or immediate publishing job.

# `ocoya_create_post`

Creates a draft or scheduled social post in Ocoya. It can also publish immediately when `publishNow` is true.

## Arguments

| Name               | Type      | Required | Description                                         |
| ------------------ | --------- | -------- | --------------------------------------------------- |
| `workspaceId`      | string    | Yes      | Workspace ID from `ocoya_list_workspaces`.          |
| `caption`          | string    | No       | Post caption text.                                  |
| `mediaUrls`        | string\[] | No       | Optional publicly reachable media URLs. Maximum 5.  |
| `socialProfileIds` | string\[] | No       | Connected social profile IDs to attach to the post. |
| `scheduledAt`      | string    | No       | Optional ISO datetime. Omit to save as draft.       |
| `publishNow`       | boolean   | No       | Publish immediately through Ocoya scheduling.       |

At least one of `caption` or `mediaUrls` should be provided.

## Example

```json theme={null}
{
  "name": "ocoya_create_post",
  "arguments": {
    "workspaceId": "cmayvq3hk00017apshay5qezu",
    "caption": "Launching our summer campaign today.",
    "mediaUrls": ["https://example.com/image.jpg"],
    "socialProfileIds": ["clh49poxf008x8kov4ncbjty9"],
    "scheduledAt": "2026-07-01T09:00:00Z"
  }
}
```

## Returns

Returns post action details such as post group ID, status, and schedule.
