Skip to main content

Create a post

Method: POST

URL: https://example.com/<MIXPOST_CORE_PATH>/api/<workspaceUuid>/posts

Authorization: Bearer <token>

Body:

{
"date": "2024-05-23",
"time": "15:00",
"timezone": "Europe/Chisinau",
"schedule": true,
"schedule_now": true,
"queue": true,
"accounts": [1,2,3],
"tags": [1,2],
"versions": [
{
"account_id": 0,
"is_original": true,
"content": [
{
"body": "This is the content",
"media": [
1
]
}
],
"options": {
"mastodon": {
"sensitive": false
}
}
}
]
}
KeyFormatRequiredDescription
dateY-m-d
timeH:i
timezoneEurope/ChisinauSpecify your preferred time zone when necessary. In its absence, Mixpost will default to the timezone set for your account.
schedulebooleanSet to true to schedule the post. Set to false to create the post without scheduling.
schedule_nowboolean
queuebooleanSet to true to add the post to the queue.
accountsarrayArray of account IDs
accounts.*integerrequiredAccount ID
tagsarrayArray of tag IDs
tags.*integerrequiredTag ID
versionsarrayrequiredArray of version objects
versions.*.account_id integerrequiredSpecify the account for which the version is available. For the original version, use the value 0.
versions.*.is_original booleanrequiredThe first version is always set to true.
versions.*.content arrayrequiredArray of content objects
versions.*.content.*.body nullstring
versions.*.content.*.urlnullstring
versions.*.content.*.mediaarrayArray of media IDs
versions.*.content.*.media.*integerrequiredMedia ID
versions.*.content.*.video_thumbsarrayArray of media relationship objects for video ID and its thumbnail ID
versions.*.content.*.video_thumbs.*objectMedia relationship object for video ID and its thumbnail ID
versions.*.content.*.video_thumbs.*.media_idintegerExisting video media ID (only supported video mime types)
versions.*.content.*.video_thumbs.*.thumb_idintegerExisting image media ID (only supported image mime types)
versions.*.optionsobject

Options available for each social service provider:

{
"facebook_page": {
"type": "post" // post,reel,story
},
"instagram": {
"type": "post" // post,reel,story
},
"linkedin": {
"visibility": "PUBLIC" // PUBLIC,CONNECTIONS
},
"mastodon": {
"sensitive": false // boolean
},
"pinterest": {
"link": null, // null|string
"title": "", // string
"boards": {
"account-1": "971672010430333260" // string | The key `account-*` is the ID of your Pinterest account
}
},
"youtube": {
"title": null', // null|string
"status": "public" // public,private,unlisted
},
"tiktok": {
"privacy_level": {
"account-2": 'PUBLIC_TO_EVERYONE' // string | PUBLIC_TO_EVERYONE,MUTUAL_FOLLOW_FRIENDS,SELF_ONLY | The key `account-*` is the ID of your TikTok account.
},
"allow_comments": {
"account-2": true // boolean | The key `account-*` is the ID of your TikTok account
},
"allow_duet": {
"account-2": false // boolean | The key `account-*` is the ID of your TikTok account
},
"allow_stitch": {
"account-2": false // boolean | The key `account-*` is the ID of your TikTok account
},
"content_disclosure": {
"account-2": false // boolean | The key `account-*` is the ID of your TikTok account
},
"brand_organic_toggle": {
"account-2": false // boolean | The key `account-*` is the ID of your TikTok account
},
"brand_content_toggle": {
"account-2": false // boolean | The key `account-*` is the ID of your TikTok account
},
}
}

Response:

{
"id": 3,
"uuid": "6059e1b3-e102-4be5-951b-82698abd9ee3",
"name": "Motivation",
"hex_color": "#000000"
}