X / Twitter Settings

API metadata for publishing text, media, threads, and collections to X (twitter_x).

Overview

Platform enum: twitter_x

Supported post types:

TypeMediaNotes
TextSingle tweet
Image1+ imagesOptional caption in content
Video1 videoOptional caption
ThreadPer-part text/mediaVia metadata.twitterThread.parts or legacy --- split
CollectionMultiple images/videosCarousel-style post

Connect X from the dashboard before publishing. See X / Twitter (product).


Settings / metadata schema

Most X posts need only content and platforms. Optional metadata:

FieldLocationRequiredTypeDescription
contentbodyYes*stringTweet text (~280 chars; higher if account has X Premium)
mediabodyNoUUID[]Media IDs from upload flow
metadata.x.madeWithAimetadataNobooleanLabel post as AI-generated
metadata.x.paidPartnershipmetadataNobooleanPaid partnership disclosure
metadata.twitterThread.partsmetadataNoarrayMulti-part thread (see below)
platform_options.twitter_x.madeWithAiplatform_optionsNobooleanCompiled into metadata.x
platform_options.twitter_x.paidPartnershipplatform_optionsNobooleanCompiled into metadata.x

* Or media-only posts with empty/minimal caption.

Thread part shape:

FieldRequiredTypeDescription
textYesstringText for this tweet/part
mediaIdsNoUUID[]Media attached to this part only

Complete example

Single tweet with AI disclosure:

curl -X POST https://api.social0.app/v1/posts/publish \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "content": "Shipping a new API docs section today.",
    "platforms": ["550e8400-e29b-41d4-a716-446655440000"],
    "media": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"],
    "metadata": {
      "x": {
        "madeWithAi": false,
        "paidPartnership": false
      }
    }
  }'

Thread with structured parts:

{
  "content": "Thread intro (fallback if parts omitted)",
  "platforms": ["550e8400-e29b-41d4-a716-446655440000"],
  "metadata": {
    "twitterThread": {
      "parts": [
        { "text": "1/3 — We rebuilt our publish pipeline.", "mediaIds": [] },
        { "text": "2/3 — Same queue as the dashboard.", "mediaIds": ["MEDIA_UUID"] },
        { "text": "3/3 — Docs: https://social0.app/docs/api", "mediaIds": [] }
      ]
    }
  }
}

Response 202:

{
  "post_id": "uuid",
  "tracking_id": "uuid",
  "status": "queued",
  "stream_url": "/v1/jobs/{tracking_id}/stream"
}

Quirks

  • Character limit: ~280 for standard accounts; Social0 detects X Premium on the connected account and allows longer posts when applicable.
  • Threads: Prefer metadata.twitterThread.parts — each part is posted as a reply in order. Also used by Threads and Bluesky publishers.
  • Legacy thread split: For X only, you can split content on a line containing only --- to create a reply chain. Structured parts is recommended for media per tweet.
  • Collections: Attach multiple media IDs; X treats them as a multi-asset tweet when supported.
  • Processing: Poll GET /v1/jobs/:tracking_id after publish — video uploads may take longer than text.