HomeDocsQuickstart
Guide

Quickstart

Go from a SocialClaw API key to your first scheduled social post in six steps — validate the key, find account handles, upload media, then validate and apply a schedule over REST or the CLI.

API key to first scheduled post in six steps.

1. Validate your API key. Create a key in the dashboard, then confirm it works:

export SOCIALCLAW_API_KEY="sc_live_..."

curl -sS https://getsocialclaw.com/v1/keys/validate \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY"

2. Find your account handles. Posts target accounts by handle, e.g. linkedin:person:123:

curl -sS https://getsocialclaw.com/v1/accounts \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY"

3. Upload media (optional). The response includes a hosted delivery URL — use it as media_link. Skip for text-only posts, or reuse something already uploaded via GET /v1/assets:

curl -sS https://getsocialclaw.com/v1/assets/upload \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "filename": "launch.png",
    "mime": "image/png",
    "contentBase64": "iVBORw0KGgoAAAANSUhEUg..."
  }'

4. Validate the schedule. Checks provider rules, media limits, account state, and publish times without creating anything. Always validate before applying:

curl -sS https://getsocialclaw.com/v1/posts/validate \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "timezone": "UTC",
    "idempotencyKey": "launch-001",
    "posts": [{
      "account": "linkedin:person:123",
      "name": "Launch update",
      "description": "We just shipped the new SocialClaw workflow.",
      "publish_at": "2026-08-01T15:00:00Z",
      "media_link": "https://getsocialclaw.com/media/asset_123/dlv_123/launch.png"
    }]
  }'

5. Apply it. The same document against POST /v1/posts/apply creates a run of scheduled posts. The idempotencyKey makes retries safe — resending the same document will not create duplicates.

6. Watch it publish. The apply response includes a run id:

curl -sS https://getsocialclaw.com/v1/runs/run_123/status \
  -H "Authorization: Bearer $SOCIALCLAW_API_KEY"

The same six steps from the CLI:

npm install -g socialclaw
socialclaw login
socialclaw accounts list --json
socialclaw assets upload --file ./launch.png --json
socialclaw validate -f schedule.json --json
socialclaw apply -f schedule.json --json
socialclaw status --run-id run_123 --json