PATCH
https://www.app.ocoya.com/api/_public/v1/post/{postId}
Update post
curl --request PATCH \
  --url https://www.app.ocoya.com/api/_public/v1/post/{postId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "caption": "Launching our summer campaign today.",
  "scheduledAt": "2024-01-01T00:00:00Z",
  "publishNow": true,
  "mediaUrls": [
    "https://example.com/image.jpg"
  ],
  "addMediaUrls": [
    "https://example.com/image.jpg"
  ],
  "clearMedia": false,
  "channelIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "addChannelIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "options": {
    "facebook": {
      "type": "reel"
    },
    "instagram": {
      "type": "reel"
    },
    "tiktok": {
      "privacyLevel": "PUBLIC_TO_EVERYONE",
      "allowComment": true
    }
  }
}
'
{
  "postGroupId": "cmajvvb9q0003ja5vh0538j6r"
}

Authorizations

X-API-Keystringheaderrequired

Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.

Path Parameters

postIdstringrequired

Ocoya post ID.

Example:"cmajvvb9q0003ja5vh0538j6r"

Body

application/json
captionstring

New caption to apply to existing post variations. To tag a LinkedIn company Page, write @[Exact Page Name](urn:li:organization:<id>): GET /linkedin/organizations answers it as mention. Or write @https://www.linkedin.com/company/<vanity>, which is looked up when the post is published. LinkedIn shows a tag; every other network shows "@Name". Limited availability: internal beta for now.

Example:"Launching our summer campaign today."
scheduledAtstring | null

ISO 8601 datetime when the post should be scheduled, or null to make it unscheduled.

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

Publish the existing post immediately without creating a new post.

Example:true
mediaUrlsstring[]

Full replacement set of publicly reachable image or video URLs. Maximum 10. Use an empty array to remove all media.

Maximum array length: 10
Example:
[
  "https://example.com/image.jpg"
]
addMediaUrlsstring[]

Publicly reachable image or video URLs to add without removing existing media. Maximum 10 total.

Example:
[
  "https://example.com/image.jpg"
]
clearMediaboolean

Remove all media from the post. Ignored when mediaUrls is provided.

Example:false
channelIdsstring[]

Full replacement set of channel IDs that should receive the post. Get IDs from GET /channels.

Example:
[
  "clh49poxf008x8kov4ncbjty9"
]
addChannelIdsstring[]

Channel IDs to add without removing channels already attached to the post.

Example:
[
  "clh49poxf008x8kov4ncbjty9"
]
optionsobject

Settings for individual networks, keyed by network. Each one only applies when the post has a channel on that network. On update, only the fields you send change.

The values are returned by GET /post in each post's options (type, tiktok.profiles keyed by social profile ID, or title and pinterest.link; a YouTube title is the YouTube post's title).

Example:
{
  "facebook": {
    "type": "reel"
  },
  "instagram": {
    "type": "reel"
  },
  "tiktok": {
    "privacyLevel": "PUBLIC_TO_EVERYONE",
    "allowComment": true
  }
}
Show child attributesHide child attributes
options.facebookobject
Show child attributesHide child attributes
options.facebook.typeenum<string>

Publish as a regular post or as a Reel. A Reel needs exactly one vertical video.

Available options: post, reel
Example:"reel"
options.instagramobject
Show child attributesHide child attributes
options.instagram.typeenum<string>

Publish to the feed, as a Reel, or as a Story. A single video sent as post already publishes as a Reel that also appears on the profile grid; reel publishes it to the Reels tab only.

Available options: post, reel, story
Example:"post"
options.tiktokobject

Applied to every TikTok channel on the post. A TikTok channel added later without these settings takes them from one already on the post.

Show child attributesHide child attributes
options.tiktok.privacyLevelenum<string>

Who can see the post. Required before a TikTok post can publish; there is no default, as TikTok requires the creator to choose. Some accounts do not offer every level (private accounts cannot use PUBLIC_TO_EVERYONE); an unavailable level fails the post when it publishes.

Available options: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
Example:"PUBLIC_TO_EVERYONE"
options.tiktok.allowCommentboolean

Let viewers comment. Defaults to false. Ignored when the creator has turned comments off in TikTok.

Example:true
options.tiktok.allowDuetboolean

Let viewers Duet the video. Defaults to false. Videos only.

Example:false
options.tiktok.allowStitchboolean

Let viewers Stitch the video. Defaults to false. Videos only.

Example:false
options.tiktok.autoAddMusicboolean

Let TikTok add music. Photo posts only. Defaults to false.

Example:false
options.tiktok.titlestring

Title for a photo post. Videos use the caption.

options.tiktok.isAigcboolean

Label the post as AI-generated content. Defaults to false.

Example:false
options.tiktok.commercialContentboolean

The post promotes a brand, product or service. Needs brandOrganic or brandContent.

Example:false
options.tiktok.brandOrganicboolean

Promotes your own brand.

Example:false
options.tiktok.brandContentboolean

Paid partnership promoting a third party. Not allowed with SELF_ONLY.

Example:false
options.pinterestobject

Applied to every Pinterest channel on the post.

Show child attributesHide child attributes
options.pinterest.titlestring

The Pin title, up to 100 characters. Left out, the Pin has no title.

Maximum string length: 100
Example:"Summer linen collection"

Where the Pin takes people. Left out or empty, the first link in the caption is used.

Example:"https://example.com/summer"
options.youtubeobject

Applied to every YouTube channel on the post.

Show child attributesHide child attributes
options.youtube.titlestring

The video title, up to 100 characters. Left out, the first line of the caption is used.

Maximum string length: 100
Example:"How we bake 300 cinnamon rolls before 9 a.m."

Response

application/json

Success

postGroupIdstring

ID of the post.

Example:"cmajvvb9q0003ja5vh0538j6r"