Skip to main content
POST
https://app.ocoya.com/api/_public/v1
/
post
Create a scheduled or a draft post
curl --request POST \
  --url https://app.ocoya.com/api/_public/v1/post \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "caption": "Happy new year everyone!",
  "mediaUrls": [
    "https://yourmediaurl.com"
  ]
}
'

Authorizations

X-API-Key
string
header
required

Query Parameters

workspaceId
string
required

Ocoya workspace ID. Get one from GET /workspaces.

Example:

"cmayvq3hk00017apshay5qezu"

Body

application/json
caption
string
required

Text caption for the post.

Example:

"Happy new year everyone!"

mediaUrls
array
required

Publicly accessible media URLs to attach to the post.

Example:
["https://yourmediaurl.com"]
socialProfileIds
array

Connected social profile IDs that should receive the post. Get IDs from GET /social-profiles.

Example:
["clh49poxf008x8kov4ncbjty9"]
scheduledAt
string

ISO 8601 datetime when the post should be scheduled. Omit to save as draft.

Example:

"2024-01-01T00:00:00Z"

Response

Created