Endpoint

Publish now

Publish a post immediately by setting publish_at to the literal string "now". The publish job is enqueued and picked up by the worker on the next poll cycle, typically within seconds.

Publish a new post immediately

POST /api/v1/posts with "publish_at": "now" creates the post and enqueues an immediate publish job for each target.

curl -X POST "$SOCIALSPOOL_BASE_URL/api/v1/posts" \
  -H "Authorization: Bearer $SOCIALSPOOL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: post-now-001" \
  -d '{
    "content": "Publishing now from the SocialSpool API",
    "social_account_ids": ["SOCIAL_ACCOUNT_ID"],
    "publish_at": "now"
  }'

Successful response shape:

{
  "post": {
    "id": "post_01HZ...",
    "content": "Publishing now from the SocialSpool API",
    "status": "publishing",
    "publish_at": "now",
    "targets": [
      {
        "id": "pt_01HZ...",
        "social_account_id": "SOCIAL_ACCOUNT_ID",
        "status": "publishing"
      }
    ],
    "created_at": "2026-06-01T12:00:00Z",
    "updated_at": "2026-06-01T12:00:00Z"
  }
}
Publish an existing draft now

To publish a draft that was created earlier, use the dedicated publish-now endpoint on the post.

curl -X POST "$SOCIALSPOOL_BASE_URL/api/v1/posts/post_01HZ.../publish-now" \
  -H "Authorization: Bearer $SOCIALSPOOL_API_KEY" \
  -H "Idempotency-Key: publish-now-post_01HZ..."
Worker behaviour

The pg-boss worker polls the queue every few seconds. A "now" job is scheduled with a start date of the current time, so it becomes available on the next worker poll. Publishing is asynchronous: the endpoint returns as soon as the job is enqueued, not when the platform responds.