Skip to main content
POST
/
posts
/
validate
Validate post content
curl --request POST \
  --url https://api.social-api.ai/v1/posts/validate \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "account_ids": [
    "<string>"
  ],
  "media_ids": [
    "<string>"
  ],
  "platforms": [
    "<string>"
  ],
  "scheduled_at": "<string>",
  "targets": [
    {
      "account_id": "<string>",
      "first_comment": "<string>",
      "media_ids": [
        "<string>"
      ],
      "platform_data": {},
      "scheduled_at": "<string>",
      "text": "<string>",
      "title": "<string>",
      "visibility": "<string>"
    }
  ],
  "text": "<string>"
}
'
{
  "errors": [
    {
      "field": "text",
      "message": "exceeds 2200 character limit (2350/2200)",
      "platform": "instagram",
      "target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
    }
  ],
  "valid": true,
  "warnings": [
    {
      "field": "text",
      "message": "exceeds 2200 character limit (2350/2200)",
      "platform": "instagram",
      "target": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J"
    }
  ]
}

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Body

application/json

Content to validate

account_ids
string[]
media_ids
string[]
platforms
string[]
scheduled_at
string
targets
object[]
text
string

Response

OK

errors
object[]
valid
boolean
warnings
object[]