GET
https://www.app.ocoya.com/api/_public/v1/post/{postId}
Get post
curl --request GET \
  --url https://www.app.ocoya.com/api/_public/v1/post/{postId} \
  --header 'X-API-Key: <api-key>'
{
  "id": "cmajvvb9q0003ja5vh0538j6r",
  "status": "SCHEDULED",
  "createdAt": "2024-01-01T00:00:00Z",
  "scheduledAt": "2024-01-01T00:00:00Z",
  "campaignId": null,
  "campaign": null,
  "workflowId": null,
  "workflow": null,
  "posts": [
    {
      "id": "cmajvvbaa0004ja5v2c0c8k1x",
      "provider": "instagram",
      "caption": "Happy new year everyone!",
      "title": null,
      "options": {
        "type": "post"
      },
      "creatives": [
        {
          "id": "cm2d687bf000q5h5vct2hdmyg",
          "position": 0,
          "image": "https://cdn.ocoya.com/prod/creative/13a76677.jpeg",
          "video": null,
          "thumbnail": null
        }
      ],
      "boardIds": []
    }
  ],
  "channels": [
    {
      "id": "clh49poxf008x8kov4ncbjty9",
      "provider": "instagram",
      "name": "Ocoya",
      "image": null
    }
  ]
}

Authorizations

X-API-Keystringheaderrequired

Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.

Path Parameters

postIdstringrequired

Ocoya post ID.

Example:"cmajvvb9q0003ja5vh0538j6r"

Response

application/json

Success

idstring

Post ID.

Example:"cmajvvb9q0003ja5vh0538j6r"
statusenum<string>

Where the post is in its life.

Available options: GENERATING, DRAFT, PENDING_CLIENT_APPROVAL, PENDING_INTERNAL_APPROVAL, SCHEDULED, POSTED, NEEDS_ATTENTION, ERROR
Example:"SCHEDULED"
createdAtstring

When the post was created.

Example:"2024-01-01T00:00:00Z"
scheduledAtstring | null

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

Example:"2024-01-01T00:00:00Z"
campaignIdstring | null

AI campaign the post belongs to.

campaignobject | null

The campaign, when the post belongs to one.

Show child attributesHide child attributes
campaign.idstring
campaign.optionsobject | null
workflowIdstring | null

Workflow that created the post.

workflowobject | null

The workflow, when one created the post.

Show child attributesHide child attributes
workflow.idstring
workflow.namestring | null
postsobject[]

One variation per network the post goes to.

Show child attributesHide child attributes
posts.idstring
Example:"cmajvvbaa0004ja5v2c0c8k1x"
posts.providerstring

Network this variation publishes to.

Example:"instagram"
posts.captionstring | null

Caption for this network.

Example:"Happy new year everyone!"
posts.titlestring | null

Title, for networks that have one (YouTube, Pinterest, blogs).

posts.optionsobject | null

Network settings for this variation, as set by options on create or update.

Example:
{
  "type": "post"
}
posts.creativesobject[]

Attached media, in order.

Show child attributesHide child attributes
posts.creatives.idstring
Example:"cm2d687bf000q5h5vct2hdmyg"
posts.creatives.positioninteger

Order of the media in the post, from 0.

Example:0
posts.creatives.imagestring | null

Image URL, for an image.

Example:"https://cdn.ocoya.com/prod/creative/13a76677.jpeg"
posts.creatives.videostring | null

Video URL, for a video.

posts.creatives.thumbnailstring | null

Video thumbnail URL.

posts.boardIdsstring[]

Pinterest boards the post goes to.

Example:[]
channelsobject[]

Channels the post publishes to.

Show child attributesHide child attributes
channels.idstring
Example:"clh49poxf008x8kov4ncbjty9"
channels.providerstring
Example:"instagram"
channels.namestring | null
Example:"Ocoya"
channels.imagestring | null