SocialClaw
Publishing API

X publishing API with one SocialClaw workspace.

Start the hosted X OAuth flow from the dashboard or CLI, finish consent in the browser, then reuse the connected X account through the SocialClaw workspace API key. SocialClaw supports X text posts, media posts, and reply steps inside campaign flows.

Account type X user account X supports up to four images or one video per post.
Best fit AI agents X supports one video or up to four images per post, not both together.

What SocialClaw supports for this workflow

A quick overview of what this workflow supports.

Account target X user account SocialClaw supports X text posts, media posts, and reply steps inside campaign flows.
Auth model OAuth Start the hosted X OAuth flow from the dashboard or CLI, finish consent in the browser, then reuse the connected X account through the SocialClaw workspace API key.
Media envelope X supports up to four images or one video per post. SocialClaw uploads the media to X during publish.
Inspection Validate, apply, inspect Analytics snapshots are available, and provider-native analytics fetchers are still expanding. Reconciliation currently supports X post lookup.

What the payload needs

The main fields and constraints to account for.

  • X user account stored in the SocialClaw workspace
  • X supports up to four images or one video per post.
  • Provider-specific settings such as replyControl
  • Workspace API key auth and post or run inspection after apply

How the workflow runs

Connect the account, validate the post, then publish.

Step 1

Authenticate the workspace

Use the workspace API key with the CLI or hosted HTTP API so the publishing workflow stays attached to the same customer workspace.

Step 2

Connect X

Start the hosted X OAuth flow from the dashboard or CLI, finish consent in the browser, then reuse the connected X account through the SocialClaw workspace API key.

Step 3

Inspect account capabilities and settings

Read the current settings surface, including replyControl, before generating the final payload.

Step 4

Validate before apply

Validation should happen before create-run or apply. X supports up to four images or one video per post.

Step 5

Inspect the resulting run or post

Reconciliation currently supports X post lookup. Analytics snapshots are available, and provider-native analytics fetchers are still expanding.

CLI and HTTP examples

Example commands and requests for this route.

CLI flow X publishing API
socialclaw login --api-key <workspace-key> --base-url https://getsocialclaw.com
socialclaw accounts connect --provider x --open
socialclaw accounts capabilities --provider x --json
socialclaw validate -f schedule.json --json
socialclaw apply -f schedule.json --idempotency-key launch_1 --json
socialclaw runs inspect --run-id <run-id> --json
HTTP API flow Hosted SocialClaw endpoints
curl -sS \
  -H "Authorization: Bearer $SC_API_KEY" \
  "https://getsocialclaw.com/v1/keys/validate"

curl -sS \
  -X POST \
  -H "Authorization: Bearer $SC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"provider":"x"}' \
  "https://getsocialclaw.com/v1/connections/start"

curl -sS \
  -X POST \
  -H "Authorization: Bearer $SC_API_KEY" \
  -H "Content-Type: application/json" \
  -d @schedule.json \
  "https://getsocialclaw.com/v1/posts/validate"

curl -sS \
  -X POST \
  -H "Authorization: Bearer $SC_API_KEY" \
  -H "Content-Type: application/json" \
  -d @schedule.json \
  "https://getsocialclaw.com/v1/posts/apply"

Current limitations

A few practical limits to keep in mind.

  • X supports one video or up to four images per post, not both together.
  • Comment publishing is not supported.
  • Reply logic is implemented for X campaign reply steps rather than as a universal interaction model.

Related routes

Related integrations and use cases.

Frequently asked questions

What account type does the X publishing API route use?

X uses the X user account route in SocialClaw. Start the hosted X OAuth flow from the dashboard or CLI, finish consent in the browser, then reuse the connected X account through the SocialClaw workspace API key.

What media rules apply to the X publishing API route?

X supports up to four images or one video per post. SocialClaw uploads the media to X during publish.

What should the workflow inspect before applying X posts?

Inspect settings such as replyControl and capabilities. X supports one video or up to four images per post, not both together.

Run the X publishing API workflow in SocialClaw

Connect the account once, validate before publish, and keep everything in one workspace.