Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Publishing
Get post approval
Where a post's approval stands: who it waits on, or who approved or rejected it and when, with the post's comments.
Get post approval
curl --request GET \
--url https://www.app.ocoya.com/api/_public/v1/post/{postId}/approval \
--header 'X-API-Key: <api-key>'{
"postGroupId": "cmajvvb9q0003ja5vh0538j6r",
"brandId": "cmayvq3hk00017apshay5qezu",
"status": "PENDING_INTERNAL_APPROVAL",
"scheduledAt": "2024-01-01T00:00:00Z",
"state": "pending",
"requestedBy": {
"id": "clh49n2u300008kovd2wq1p8z",
"name": "Ocoya"
},
"requestedAt": "2024-01-01T00:00:00Z",
"approvers": [
{
"id": "clh49n2u300008kovd2wq1p8z",
"email": "jane@example.com",
"name": "Jane",
"role": "ADMIN"
}
],
"answeredBy": null,
"answeredAt": null,
"comments": [
{
"id": "<string>",
"text": "Can we use the blue photo instead?",
"kind": "comment",
"parentId": "<string>",
"author": {
"id": "clh49n2u300008kovd2wq1p8z",
"name": "Aivaras",
"email": "jane@example.com"
},
"createdAt": "2024-01-01T00:00:00Z"
}
]
}Authorizations
Response
application/json
Success
When it goes out once approved, or null: approved without a time, it stays a draft.
pending - waiting on approvers. approved - approved: scheduled for scheduledAt if that is still to come, else a draft. rejected - rejected: back to draft. cancelled - the request was taken back. none - never sent for approval.
Who it waits on, while pending. Any one of them approving or rejecting answers for all.
Was this page helpful?