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"
}
EOFconst 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));import 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){
"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"
}
EOFconst 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));import 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){
"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"