Threads

Threads API: Post to a Profile

How to publish a post to Threads via API, using the same connection model as Instagram and Facebook.

Quick answer

To post to Threads via API, connect the profile once through Meta's OAuth flow (Threads has no separate login), then send POST /api/posts with the post body and the pro_threads_ profile ID — add one image or video URL in media if needed. A stable Idempotency-Key makes retries safe for 72 hours; confirm delivery from the target's status.

Threads doesn't have its own login system — it connects through the same Meta OAuth flow as Instagram and Facebook. Once a Threads profile is connected to PostGate, publishing to it is one HTTP request: the same POST /api/posts endpoint you'd use for any other platform, with a Threads profile ID in the profiles array.

This page covers that single request. For the full connect-to-confirm flow, see how to post to Threads via API.

01

How do you connect the Threads profile?

A Threads profile is connected the same way as Instagram or Facebook: through Meta's OAuth consent screen. PostGate stores the resulting profile as pro_threads_... and reuses it for every future post — there's no per-request authentication step. If the connection ever needs re-consent, the profile's health endpoint reports reconnect_required before a publish attempt fails.
02

How do you publish with one request?

Send the post body and the Threads profile ID to POST /api/posts. A stable Idempotency-Key lets you retry the exact same logical request for 72 hours without risking a duplicate Thread.
Publish a text post to ThreadsPostGate API
curl -X POST "https://postgate.studio/api/posts" \
  -H "Authorization: Bearer $POSTGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: threads-launch-001" \
  -d '{
    "post": { "body": "Shipping something new today." },
    "profiles": ["pro_threads_8f21"]
  }'
03

How do you attach a photo or video?

Pass a public media URL (or a pre-uploaded media_... ID) in the media array. Threads accepts one image or video per post this way — for more than one item, use the Threads carousel endpoint instead. Images are converted to JPEG before delivery; PNG is documented by Meta as accepted but rejected by the live API, so PostGate re-encodes automatically.
Publish an image postPostGate API
curl -X POST "https://postgate.studio/api/posts" \
  -H "Authorization: Bearer $POSTGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "post": { "body": "Behind the scenes." },
    "profiles": ["pro_threads_8f21"],
    "media": ["https://cdn.example.com/behind-the-scenes.jpg"]
  }'
04

How do you confirm it actually published?

The create response is acceptance, not proof of delivery. Read the post back and check the Threads target's status and permalink, or subscribe to the terminal webhook instead of polling.
Check deliveryPostGate API
curl "https://postgate.studio/api/posts/post_01JXYZ" \
  -H "Authorization: Bearer $POSTGATE_API_KEY"

Frequently asked questions

How does a Threads profile authenticate for API posting?

Threads has no login system of its own — a profile is connected through Meta's OAuth consent screen, the same way as Instagram or Facebook. PostGate stores the result as a pro_threads_ profile ID and reuses it for every future post, with no per-request authentication step. If re-consent is ever needed, the profile's health endpoint reports reconnect_required before a publish attempt fails.

Can I attach more than one image to a Threads post?

A standard Threads post takes one image or video via the media array. For more than one item, use the Threads carousel flow instead — a carousel accepts 2 to 20 items in a single post.

Why do PNG images fail on the Threads API?

PNG is documented by Meta as an accepted image format but is rejected by the live API. PostGate re-encodes images to JPEG automatically before delivery, so PNG sources still publish without you handling the conversion.

How do I know a Thread actually published?

The create response is acceptance, not proof of delivery. Read the post back with GET /api/posts/{id} and check the Threads target's status and permalink, or subscribe to the terminal webhook instead of polling.

Build it with PostGate

One API for every social platform your customers care about — sandboxed, documented, and ready today.

Start building Read the docs