Posts

Returns information about all posts

get/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.

statusesstring[]

Post statuses to include in the result.

[
  "DRAFT"
]
querystring
Example:launch

Only posts whose caption or title contains this text.

pageinteger

Zero-based page number for paginated results.

perPageinteger
Example:10

Maximum number of items to return per page.

Response

Success. Newest scheduled first.

idstring required

Post ID.

status'GENERATING' | 'DRAFT' | 'PENDING_CLIENT_APPROVAL' | 'PENDING_INTERNAL_APPROVAL' | 'SCHEDULED' | 'POSTED' | 'NEEDS_ATTENTION' | 'ERROR' required

Where the post is in its life.

createdAtstring required

When the post was created.

scheduledAtstring nullable required

When the post is scheduled to publish, or null for a draft.

campaignIdstring nullable required

AI campaign the post belongs to.

workflowIdstring nullable required

Workflow that created the post.

Example response

[
  {
    "id": "cmajvvb9q0003ja5vh0538j6r",
    "status": "SCHEDULED",
    "createdAt": "2024-01-01T00:00:00Z",
    "scheduledAt": "2024-01-01T00:00:00Z",
    "posts": [
      {
        "id": "cmajvvbaa0004ja5v2c0c8k1x",
        "provider": "instagram",
        "caption": "Happy new year everyone!",
        "options": {
          "type": "post"
        },
        "creatives": [
          {
            "id": "cm2d687bf000q5h5vct2hdmyg",
            "image": "https://cdn.ocoya.com/prod/creative/13a76677.jpeg"
          }
        ],
        "boardIds": []
      }
    ],
    "channels": [
      {
        "id": "clh49poxf008x8kov4ncbjty9",
        "provider": "instagram",
        "name": "Ocoya"
      }
    ]
  }
]

Changes

    • breaking

      removed the required property / from the response with the status

    • info

      added the required property / to the response with the status

    • breaking

      removed the enum value DRAFT from the query request parameter statuses

    • breaking

      removed the enum value ERROR from the query request parameter statuses

    • breaking

      removed the enum value GENERATING from the query request parameter statuses

    • breaking

      removed the enum value PENDING_CLIENT_APPROVAL from the query request parameter statuses

    • breaking

      removed the enum value PENDING_INTERNAL_APPROVAL from the query request parameter statuses

    • breaking

      removed the enum value POSTED from the query request parameter statuses

    • breaking

      removed the enum value SCHEDULED from the query request parameter statuses

    • warning

      for the query request parameter page, the min was set to 0.00

    • warning

      for the query request parameter perPage, the min was set to 1.00

    • info

      api operation id listPosts was added

    • info

      api tag Posts added

    • info

      added the new optional query request parameter query

    • 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