Posts

Create a scheduled or a draft post

Changed on

Returns an id of the post

post/post

Request

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

Query parameters

brandIdstring required
Example:cmayvq3hk00017apshay5qezu

Ocoya brand ID. Get one from GET /brands.

Request body

captionstring

Text caption for the post.

mediaUrlsstring[]

Publicly accessible media URLs to attach to the post. Maximum 10.

channelIdsstring[]

Channel IDs that should receive the post. Get IDs from GET /channels.

scheduledAtstring

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

Example request

{
  "caption": "Happy new year everyone!",
  "mediaUrls": [
    "https://yourmediaurl.com"
  ],
  "channelIds": [
    "clh49poxf008x8kov4ncbjty9"
  ],
  "scheduledAt": "2024-01-01T00:00:00Z",
  "options": {
    "facebook": {
      "type": "reel"
    },
    "instagram": {
      "type": "reel"
    },
    "tiktok": {
      "privacyLevel": "PUBLIC_TO_EVERYONE",
      "allowComment": true
    }
  }
}

Response

Created

postGroupIdstring required

ID of the post.

Example response

{
  "postGroupId": "cmajvvb9q0003ja5vh0538j6r"
}

Changes

    • warning

      removed the request property

    • info

      added the new optional request property

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the request body oneOf list

    • breaking

      the request's body type changed from no type to object

    • info

      api operation id createPost was added

    • info

      api tag Posts added

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • 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