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
}
}
}
]
}
Key | Format | Required | Description |
---|---|---|---|
date | Y-m-d | ||
time | H:i | ||
timezone | Europe/Chisinau | Specify your preferred time zone when necessary. In its absence, Mixpost will default to the timezone set for your account. | |
schedule | boolean | Set to true to schedule the post. Set to false to create the post without scheduling. | |
schedule_now | boolean | ||
queue | boolean | Set to true to add the post to the queue. | |
accounts | array | Array of account IDs | |
accounts.* | integer | required | Account ID |
tags | array | Array of tag IDs | |
tags.* | integer | required | Tag ID |
versions | array | required | Array of version objects |
versions.*.account_id | integer | required | Specify the account for which the version is available. For the original version, use the value 0 . |
versions.*.is_original | boolean | required | The first version is always set to true . |
versions.*.content | array | required | Array of content objects |
versions.*.content.*.body | null | string | |
versions.*.content.*.url | null | string | |
versions.*.content.*.media | array | Array of media IDs | |
versions.*.content.*.media.* | integer | required | Media ID |
versions.*.options | object | Options available for each social service provider:
|
Response:
- 200
- 401
- 403
- 404
- 422
{
"id": 3,
"uuid": "6059e1b3-e102-4be5-951b-82698abd9ee3",
"name": "Motivation",
"hex_color": "#000000"
}
{
"message": "Unauthenticated."
}
{
"message": "Access forbidden."
}
{
"message": "Workspace not found."
}
{
"message": "Validation errors",
"errors": {}
}