Posts

Returns an id of the updated post

patch/post/{postId}

Request

  • Base URL
    https://www.app.ocoya.com/api/_public/v1
  • Auth
    API key in header X-API-Key

Path parameters

postIdstring required
Example:cmajvvb9q0003ja5vh0538j6r

Ocoya post ID.

Request body

captionstring

New caption to apply to existing post variations.

scheduledAtstring nullable

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

publishNowboolean

Publish the existing post immediately without creating a new post.

mediaUrlsstring[]

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

addMediaUrlsstring[]

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

clearMediaboolean

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

channelIdsstring[]

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

addChannelIdsstring[]

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

Example request

{
  "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"
  ],
  "channelIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "addChannelIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "options": {
    "facebook": {
      "type": "reel"
    },
    "instagram": {
      "type": "reel"
    },
    "tiktok": {
      "privacyLevel": "PUBLIC_TO_EVERYONE",
      "allowComment": true
    }
  }
}

Response

Success

postGroupIdstring required

ID of the post.

Example response

{
  "postGroupId": "cmajvvb9q0003ja5vh0538j6r"
}

Changes

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • breaking

      the request property became not nullable

    • info

      api operation id updatePost was added

    • info

      api tag Posts added

    • info

      added the new optional request property

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status