Posts

Returns one post with its variations, channels, schedule and status. Use it after GET /post or GET /campaigns/{campaignId} hands you a post id.

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

Response

Success

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