Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Create a scheduled or a draft post
Returns an id of the post
curl --request POST \
--url https://www.app.ocoya.com/api/_public/v1/post \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"caption": "Happy new year everyone!",
"mediaUrls": [
"https://yourmediaurl.com"
],
"videoThumbnailUrl": "https://yourmediaurl.com/cover.jpg",
"channelIds": [
"clh49poxf008x8kov4ncbjty9"
],
"scheduledAt": "2024-01-01T00:00:00Z",
"options": {
"facebook": {
"type": "reel"
},
"instagram": {
"type": "reel"
},
"tiktok": {
"privacyLevel": "PUBLIC_TO_EVERYONE",
"allowComment": true
}
},
"approvers": [
"jane@example.com"
]
}
'{
"postGroupId": "cmajvvb9q0003ja5vh0538j6r",
"approval": {}
}Authorizations
Body
Text caption for the post. To tag a LinkedIn company Page, write @[Exact Page Name](urn:li:organization:<id>): GET /linkedin/organizations answers it as mention. Or write @https://www.linkedin.com/company/<vanity>, which is looked up when the post is published. LinkedIn shows a tag; every other network shows "@Name". Limited availability: internal beta for now.
A public image URL to use as the cover of the video in mediaUrls (for example a Video Studio video's thumbnailUrl). Instagram shows it as the Reel's cover.
Settings for individual networks, keyed by network. Each one only applies when the post has a channel on that network. On update, only the fields you send change.
The values are returned by GET /post in each post's options (type, tiktok.profiles keyed by social profile ID, or title and pinterest.link; a YouTube title is the YouTube post's title).
Email addresses of brand members who must approve the post before it goes out, as POST /post/{postId}/approval does in the same call: the post is saved as PENDING_INTERNAL_APPROVAL and goes out at scheduledAt only once approved. Everyone named must be a member of the brand, or no post is created. The answer then has approval.
Was this page helpful?