curl --request POST \
--url https://api.social-api.ai/v1/posts/validate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"account_ids": [
"<string>"
],
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"platform_data": {},
"platforms": [
"<string>"
],
"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."
}
],
"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"
}
EOFimport requests
url = "https://api.social-api.ai/v1/posts/validate"
payload = {
"account_ids": ["<string>"],
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"platform_data": {},
"platforms": ["<string>"],
"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."
}
],
"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"
}
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({
account_ids: ['<string>'],
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
platform_data: {},
platforms: ['<string>'],
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.'
}
],
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'
})
};
fetch('https://api.social-api.ai/v1/posts/validate', 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/validate",
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([
'account_ids' => [
'<string>'
],
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'platform_data' => [
],
'platforms' => [
'<string>'
],
'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.'
]
],
'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'
]),
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/validate"
payload := strings.NewReader("{\n \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\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/validate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/posts/validate")
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 \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "text",
"message": "exceeds 2200 character limit (2350/2200)",
"platform": "instagram",
"segment_index": 0,
"target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
}
],
"valid": true,
"warnings": [
{
"field": "text",
"message": "exceeds 2200 character limit (2350/2200)",
"platform": "instagram",
"segment_index": 0,
"target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
}
]
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Validate post content
Dry-run validation. Returns errors for hard limit violations and warnings for best-practice issues.
curl --request POST \
--url https://api.social-api.ai/v1/posts/validate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"account_ids": [
"<string>"
],
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": [
"<string>"
],
"platform_data": {},
"platforms": [
"<string>"
],
"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."
}
],
"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"
}
EOFimport requests
url = "https://api.social-api.ai/v1/posts/validate"
payload = {
"account_ids": ["<string>"],
"media": [
{
"source": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "media_id",
"type": "image"
}
],
"media_ids": ["<string>"],
"platform_data": {},
"platforms": ["<string>"],
"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."
}
],
"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"
}
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({
account_ids: ['<string>'],
media: [
{
source: '550e8400-e29b-41d4-a716-446655440000',
source_type: 'media_id',
type: 'image'
}
],
media_ids: ['<string>'],
platform_data: {},
platforms: ['<string>'],
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.'
}
],
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'
})
};
fetch('https://api.social-api.ai/v1/posts/validate', 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/validate",
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([
'account_ids' => [
'<string>'
],
'media' => [
[
'source' => '550e8400-e29b-41d4-a716-446655440000',
'source_type' => 'media_id',
'type' => 'image'
]
],
'media_ids' => [
'<string>'
],
'platform_data' => [
],
'platforms' => [
'<string>'
],
'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.'
]
],
'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'
]),
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/validate"
payload := strings.NewReader("{\n \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\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/validate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/posts/validate")
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 \"account_ids\": [\n \"<string>\"\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 \"platform_data\": {},\n \"platforms\": [\n \"<string>\"\n ],\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 \"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\"\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "text",
"message": "exceeds 2200 character limit (2350/2200)",
"platform": "instagram",
"segment_index": 0,
"target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
}
],
"valid": true,
"warnings": [
{
"field": "text",
"message": "exceeds 2200 character limit (2350/2200)",
"platform": "instagram",
"segment_index": 0,
"target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
}
]
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Body
Content to validate
AccountIDs lists connected account IDs - their platforms are resolved automatically.
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 media file IDs to validate (checks count and type limits).
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
Platforms lists platform names to validate against (e.g. ["instagram", "linkedin"]).
ScheduledAt validates the schedule time (must be in the future, within platform limits).
"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
Targets validates per-target overrides if provided.
Show child attributes
Show child attributes
Text is the post content to validate against platform constraints.
"Check out our new product! #launch"