curl --request POST \
--url https://api.social-api.ai/v1/posts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"first_comment": "Follow us for more updates!",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"platform_data": {},
"publish_now": false,
"scheduled_at": "2026-04-01T10:00:00Z",
"segments": [
{
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"text": "And here's the second post in the thread."
}
],
"skip_duplicate_check": false,
"skip_validation": false,
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"page_id": "sapi_page_01JRQX...",
"platform_data": {},
"scheduled_at": "2026-04-01T10:00:00Z",
"text": "Platform-specific version of the post",
"title": "Custom title for LinkedIn",
"visibility": "public"
}
],
"text": "Check out our new product launch! #newproduct",
"title": "Exciting News from Acme Corp",
"visibility": "public"
}
EOFimport requests
url = "https://api.social-api.ai/v1/posts"
payload = {
"first_comment": "Follow us for more updates!",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"platform_data": {},
"publish_now": False,
"scheduled_at": "2026-04-01T10:00:00Z",
"segments": [
{
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"text": "And here's the second post in the thread."
}
],
"skip_duplicate_check": False,
"skip_validation": False,
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"page_id": "sapi_page_01JRQX...",
"platform_data": {},
"scheduled_at": "2026-04-01T10:00:00Z",
"text": "Platform-specific version of the post",
"title": "Custom title for LinkedIn",
"visibility": "public"
}
],
"text": "Check out our new product launch! #newproduct",
"title": "Exciting News from Acme Corp",
"visibility": "public"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_comment: 'Follow us for more updates!',
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
platform_data: {},
publish_now: false,
scheduled_at: '2026-04-01T10:00:00Z',
segments: [
{
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
text: 'And here\'s the second post in the thread.'
}
],
skip_duplicate_check: false,
skip_validation: false,
targets: [
{
account_id: 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J',
board_id: '8828',
first_comment: '<string>',
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
page_id: 'sapi_page_01JRQX...',
platform_data: {},
scheduled_at: '2026-04-01T10:00:00Z',
text: 'Platform-specific version of the post',
title: 'Custom title for LinkedIn',
visibility: 'public'
}
],
text: 'Check out our new product launch! #newproduct',
title: 'Exciting News from Acme Corp',
visibility: 'public'
})
};
fetch('https://api.social-api.ai/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.social-api.ai/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_comment' => 'Follow us for more updates!',
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'platform_data' => [
],
'publish_now' => false,
'scheduled_at' => '2026-04-01T10:00:00Z',
'segments' => [
[
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'text' => 'And here\'s the second post in the thread.'
]
],
'skip_duplicate_check' => false,
'skip_validation' => false,
'targets' => [
[
'account_id' => 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J',
'board_id' => '8828',
'first_comment' => '<string>',
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'page_id' => 'sapi_page_01JRQX...',
'platform_data' => [
],
'scheduled_at' => '2026-04-01T10:00:00Z',
'text' => 'Platform-specific version of the post',
'title' => 'Custom title for LinkedIn',
'visibility' => 'public'
]
],
'text' => 'Check out our new product launch! #newproduct',
'title' => 'Exciting News from Acme Corp',
'visibility' => 'public'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.social-api.ai/v1/posts"
payload := strings.NewReader("{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.social-api.ai/v1/posts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Create or schedule a post
Creates a post for one or more connected accounts. Set publish_now: true to publish
immediately: the post is accepted with status publishing and delivery runs in the
background (so slow reel/video uploads do not block the request). The terminal status
(published, partial, or failed) arrives via the post.published/post.partial/
post.failed webhooks and by polling GET /posts/. Set scheduled_at to queue the
post for future publication. With neither flag the post is saved as a draft (this is the
default, even when targets are provided); publish it later with POST /posts//publish.
Consumes 1 post credit when the post is published or scheduled; saving a draft is free.
curl --request POST \
--url https://api.social-api.ai/v1/posts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"first_comment": "Follow us for more updates!",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"platform_data": {},
"publish_now": false,
"scheduled_at": "2026-04-01T10:00:00Z",
"segments": [
{
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"text": "And here's the second post in the thread."
}
],
"skip_duplicate_check": false,
"skip_validation": false,
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"page_id": "sapi_page_01JRQX...",
"platform_data": {},
"scheduled_at": "2026-04-01T10:00:00Z",
"text": "Platform-specific version of the post",
"title": "Custom title for LinkedIn",
"visibility": "public"
}
],
"text": "Check out our new product launch! #newproduct",
"title": "Exciting News from Acme Corp",
"visibility": "public"
}
EOFimport requests
url = "https://api.social-api.ai/v1/posts"
payload = {
"first_comment": "Follow us for more updates!",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"platform_data": {},
"publish_now": False,
"scheduled_at": "2026-04-01T10:00:00Z",
"segments": [
{
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"text": "And here's the second post in the thread."
}
],
"skip_duplicate_check": False,
"skip_validation": False,
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"page_id": "sapi_page_01JRQX...",
"platform_data": {},
"scheduled_at": "2026-04-01T10:00:00Z",
"text": "Platform-specific version of the post",
"title": "Custom title for LinkedIn",
"visibility": "public"
}
],
"text": "Check out our new product launch! #newproduct",
"title": "Exciting News from Acme Corp",
"visibility": "public"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_comment: 'Follow us for more updates!',
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
platform_data: {},
publish_now: false,
scheduled_at: '2026-04-01T10:00:00Z',
segments: [
{
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
text: 'And here\'s the second post in the thread.'
}
],
skip_duplicate_check: false,
skip_validation: false,
targets: [
{
account_id: 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J',
board_id: '8828',
first_comment: '<string>',
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
page_id: 'sapi_page_01JRQX...',
platform_data: {},
scheduled_at: '2026-04-01T10:00:00Z',
text: 'Platform-specific version of the post',
title: 'Custom title for LinkedIn',
visibility: 'public'
}
],
text: 'Check out our new product launch! #newproduct',
title: 'Exciting News from Acme Corp',
visibility: 'public'
})
};
fetch('https://api.social-api.ai/v1/posts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.social-api.ai/v1/posts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'first_comment' => 'Follow us for more updates!',
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'platform_data' => [
],
'publish_now' => false,
'scheduled_at' => '2026-04-01T10:00:00Z',
'segments' => [
[
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'text' => 'And here\'s the second post in the thread.'
]
],
'skip_duplicate_check' => false,
'skip_validation' => false,
'targets' => [
[
'account_id' => 'acc_01HZ9X3Q4R5M6N7P8V2K0W1J',
'board_id' => '8828',
'first_comment' => '<string>',
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'page_id' => 'sapi_page_01JRQX...',
'platform_data' => [
],
'scheduled_at' => '2026-04-01T10:00:00Z',
'text' => 'Platform-specific version of the post',
'title' => 'Custom title for LinkedIn',
'visibility' => 'public'
]
],
'text' => 'Check out our new product launch! #newproduct',
'title' => 'Exciting News from Acme Corp',
'visibility' => 'public'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.social-api.ai/v1/posts"
payload := strings.NewReader("{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.social-api.ai/v1/posts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/posts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_comment\": \"Follow us for more updates!\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"platform_data\": {},\n \"publish_now\": false,\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"segments\": [\n {\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"text\": \"And here's the second post in the thread.\"\n }\n ],\n \"skip_duplicate_check\": false,\n \"skip_validation\": false,\n \"targets\": [\n {\n \"account_id\": \"acc_01HZ9X3Q4R5M6N7P8V2K0W1J\",\n \"board_id\": \"8828\",\n \"first_comment\": \"<string>\",\n \"media\": [\n {\n \"source\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"source_type\": \"media_id\",\n \"type\": \"image\"\n }\n ],\n \"media_ids\": [\n \"<string>\"\n ],\n \"page_id\": \"sapi_page_01JRQX...\",\n \"platform_data\": {},\n \"scheduled_at\": \"2026-04-01T10:00:00Z\",\n \"text\": \"Platform-specific version of the post\",\n \"title\": \"Custom title for LinkedIn\",\n \"visibility\": \"public\"\n }\n ],\n \"text\": \"Check out our new product launch! #newproduct\",\n \"title\": \"Exciting News from Acme Corp\",\n \"visibility\": \"public\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"created_at": "2026-03-14T09:00:00Z",
"hidden": false,
"id": "p_01HZ9X3Q4R5M6N7P8V2K0W1J",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"published_at": "2026-04-01T10:00:05Z",
"retry_count": 0,
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"targets": [
{
"account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J",
"board_id": "8828",
"error": {
"category": "validation",
"caused_by": "user",
"code": "platform.tiktok.media_required",
"message": "Video posts require at least one media URL"
},
"first_comment": "<string>",
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"media_type": "reel",
"metadata": {},
"metrics": {
"comments": 23,
"extra": {},
"likes": 142,
"saves": 31,
"shares": 8
},
"metrics_synced_at": "2026-04-01T12:00:00Z",
"page_id": "sapi_page_01HZ9X3Q4R5M6N7P8V2K0W1J",
"permalink": "https://www.instagram.com/p/ABC123/",
"platform": "instagram",
"platform_post_id": "17895695668004550",
"published_at": "2026-04-01T10:00:05Z",
"scheduled_at": "2026-04-01T10:00:00Z",
"status": "published",
"text": "<string>",
"title": "<string>",
"visibility": "public"
}
],
"text": "Check out our new product launch!",
"title": "Exciting News",
"updated_at": "2026-03-14T09:00:00Z",
"visibility": "public"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Post content and target accounts
FirstComment is auto-posted as the first comment after publishing (Instagram, Facebook, YouTube). Ignored by every other platform, and by Facebook Page Stories.
"Follow us for more updates!"
Media is the ordered, agnostic media list. Each item is a url, a media_id, or a platform_attachment_id; order and mixing are preserved. Supersedes media_ids.
Show child attributes
Show child attributes
MediaIDs are previously uploaded media file IDs to attach.
Deprecated: use Media with source_type "media_id". Ignored when media is set.
PlatformData passes platform-specific fields keyed by platform name (e.g. {"instagram": {"content_type": "feed"}}). Folded into each matching target; a target's own platform_data wins on conflicts.
Show child attributes
Show child attributes
PublishNow publishes immediately when targets are provided (ignores scheduled_at). Without this flag (and without scheduled_at) the post is saved as a draft; publish it later with POST /posts/{pid}/publish.
false
ScheduledAt queues the post for future publication (RFC3339). When set, the post is scheduled rather than drafted.
"2026-04-01T10:00:00Z"
Segments are continuation posts that publish as a native thread on X. Threads chaining is temporarily unavailable.
Show child attributes
Show child attributes
SkipDuplicateCheck bypasses the duplicate content detection.
false
SkipValidation bypasses pre-publish validation. The post is scheduled/published as-is and may fail at the platform.
false
Targets specifies which connected accounts to publish to, with optional per-target overrides.
Show child attributes
Show child attributes
Text is the post body content. Required.
"Check out our new product launch! #newproduct"
Title is an optional post title (used by LinkedIn, Google).
"Exciting News from Acme Corp"
Visibility controls who can see the post. Platform-dependent values: public, private, connections_only, logged_in.
public, private, connections_only, logged_in "public"
Response
Post accepted (publishing in background), scheduled, or drafted
"2026-03-14T09:00:00Z"
false
"p_01HZ9X3Q4R5M6N7P8V2K0W1J"
Show child attributes
Show child attributes
Deprecated: use media.
"2026-04-01T10:00:05Z"
0
"2026-04-01T10:00:00Z"
draft, scheduled, publishing, published, partial, failed, cancelled "published"
Show child attributes
Show child attributes
"Check out our new product launch!"
"Exciting News"
"2026-03-14T09:00:00Z"
public, private, connections_only, logged_in "public"