v1

latestOpenAPI 3.1.02026-08-0616024.0 KB

Update post

Returns an id of the updated post

patch/post/{postId}

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.

brandIdstring nullable

Brand kit ID to apply, or null to remove the brand kit.

mediaUrlsstring[]

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

addMediaUrlsstring[]

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

clearMediaboolean

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

socialProfileIdsstring[]

Full replacement set of connected social profile IDs that should receive the post. Get IDs from GET /social-profiles.

addSocialProfileIdsstring[]

Connected social profile IDs to add without removing profiles already attached to the post.

Example request

{
  "caption": "Launching our summer campaign today.",
  "scheduledAt": "2024-01-01T00:00:00Z",
  "publishNow": true,
  "brandId": "cmayw7l5200067apsmz2tv7e8",
  "mediaUrls": [
    "https://example.com/image.jpg"
  ],
  "addMediaUrls": [
    "https://example.com/image.jpg"
  ],
  "socialProfileIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "addSocialProfileIds": [
    "clh49poxf008x8kov4ncbjty9"
  ]
}

Response

Success