OnlySocial
  1. Posts
OnlySocial
  • 🐶 OnlySocial API Walk through
  • Only Social
    • Accounts
      • List Accounts
      • Get an account
    • Media
      • List media files
      • Get a media file
      • Upload a media file
      • Delete a media file
    • Tags
      • List Tags
      • Get a tag
      • Create a tag
      • Delete a tag
      • Update a tag
    • Posts
      • List posts
        GET
      • Get a post
        GET
      • Create a post
        POST
      • Delete a post
        DELETE
      • Delete multiple post
        DELETE
      • Schedule a post
        POST
      • Add a post to Queue
        POST
      • Update a post
        PUT
  1. Posts

Create a post

POST
https://app.onlysocial.io/os/api/{workspaceUuid}/posts

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
workspaceUuid
string 
required
Example:
<workspaceUuid>
Body Params application/json
date
string 
optional
time
string 
optional
timezone
string 
optional
Specify your preferred time zone when necessary. In its absence, Mixpost will default to the timezone set for your account.
schedule
boolean 
optional
Set to true to schedule the post. Set to false to create the post without scheduling.
schedule_now
boolean 
optional
queue
boolean 
optional
Set to true to add the post to the queue.
accounts
array[integer]
required
Array of account IDs
tags
array[integer]
required
Array of tag IDs
versions
array [object {4}] 
required
Array of version objects
account_id
integer 
required
Specify the account for which the version is available. For the original version, use the value 0.
is_original
boolean 
required
The first version is always set to true.
content
array [object {3}] 
required
Array of content objects
options
object 
optional
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 }, } }
Example
{
  "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
        }
      }
    }
  ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.onlysocial.io/os/api/<workspaceUuid>/posts' \
--header 'Content-Type: application/json' \
--data-raw '{
  "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
        }
      }
    }
  ]
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{
    "id": 3,
    "uuid": "6059e1b3-e102-4be5-951b-82698abd9ee3",
    "name": "Motivation",
    "hex_color": "#000000"
}
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🟠422Parameter Error
Modified at 2024-06-28 15:04:23
Previous
Get a post
Next
Delete a post
Built with