> ## 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_publish_post

> Create and publish a social post immediately.

# `ocoya_publish_post`

Creates and publishes a social post immediately. Use this when the user asks to publish now.

## 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 publish to.        |

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

## Example

```json theme={null}
{
  "name": "ocoya_publish_post",
  "arguments": {
    "workspaceId": "cmayvq3hk00017apshay5qezu",
    "caption": "We are live.",
    "socialProfileIds": ["clh49poxf008x8kov4ncbjty9"]
  }
}
```

## Returns

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