Skip to main content
Back to API docs

Threads text & thread sequence

Threads Text Post & Thread Sequence API

The Threads platform supports text-only posts and thread sequences where multiple posts are chained together. Wahdx Connection provides a dedicated endpoint for thread sequences and supports text-only posting through the standard content post endpoint. Facebook Pages also accept text-only posts, see the text-only posting guide. TikTok, Instagram, and Pinterest remain media-only platforms.

Text-only post: POST /api/content/post

Send a standard content post request with platform threads and no mediaItems. The content field is required for text-only posts. The example response below is the Threads text post with mediaType text.

const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;

const headers = {
  'X-API-Key': API_KEY,
  'Content-Type': 'application/json'
};

// Threads text-only post
await fetch(API_BASE_URL + '/api/content/post', {
  method: 'POST',
  headers,
  body: JSON.stringify(
    {
      "platform": "threads",
      "accountId": "THREADS_ACCOUNT_ID",
      "content": "Threads text-only post with no media attached",
      "threadsSettings": {
        "who_can_reply": "everyone"
      }
    }
  )
});
Example response · 200
{
  "success": true,
  "requestId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "requestStatus": "succeeded",
  "accountId": "THREADS_ACCOUNT_ID",
  "platform": "threads",
  "status": "PUBLISH_COMPLETE",
  "data": {
    "id": "17890000000000001",
    "success": true,
    "publish_id": "17890000000000001",
    "public_post_url": "https://www.threads.com/@wahdx_threads/post/CxText"
  },
  "mediaType": "text",
  "mediaUrls": [],
  "fileIds": [],
  "public_post_url": "https://www.threads.com/@wahdx_threads/post/CxText"
}

Thread sequence: POST /api/content/post/threads

Post multiple linked Threads items in a chain. Each item can contain text only or text with media (image/video). Items are posted sequentially and automatically linked via reply_to_id. Maximum 10 items per sequence. An Idempotency-Key header is required so a retry after a client timeout never duplicates the thread. The response returns one result per item, with public_post_url only on items that resolve to a permalink.

const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;

const headers = {
  'X-API-Key': API_KEY,
  'Content-Type': 'application/json',
  'Idempotency-Key': 'campaign-thread-2026-08-01'
};

// Threads thread sequence
await fetch(API_BASE_URL + '/api/content/post/threads', {
  method: 'POST',
  headers,
  body: JSON.stringify(
    {
      "accountId": "THREADS_ACCOUNT_ID",
      "threadItems": [
        {
          "content": "Thread pertama dengan gambar",
          "mediaItems": [
            {
              "url": "https://your-domain.com/threads-photo-1.jpg"
            }
          ]
        },
        {
          "content": "Thread kedua hanya teks"
        },
        {
          "content": "Thread ketiga dengan video",
          "mediaItems": [
            {
              "url": "https://your-domain.com/video-threads.mp4"
            }
          ]
        }
      ],
      "threadsSettings": {
        "who_can_reply": "everyone"
      }
    }
  )
});
Example response · 200
{
  "success": true,
  "requestId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "status": "succeeded",
  "accountId": "THREADS_ACCOUNT_ID",
  "platform": "threads",
  "itemCount": 3,
  "results": [
    {
      "index": 0,
      "publishId": "17890000000000001",
      "status": "PUBLISH_COMPLETE",
      "public_post_url": "https://www.threads.com/@wahdx_threads/post/CxItem1"
    },
    {
      "index": 1,
      "publishId": "17890000000000002",
      "status": "PUBLISH_COMPLETE"
    },
    {
      "index": 2,
      "publishId": "17890000000000003",
      "status": "PUBLISH_COMPLETE",
      "public_post_url": "https://www.threads.com/@wahdx_threads/post/CxItem3"
    }
  ],
  "fileIds": []
}

Async thread sequence: Prefer: respond-async

Sequences post items one by one and can take minutes, so a client timeout is easy to hit. Send Prefer: respond-async to enqueue the sequence and get a 202 immediately, then poll GET /api/content/requests/{requestId} until the status is succeeded, partially_succeeded, or failed. The 202 below includes a Location header pointing at the request status endpoint.

const API_BASE_URL = 'https://api.wahdx.com';
const API_KEY = process.env.WAHDX_API_KEY;

// Respond immediately with 202 + Location, then poll the request status.
const accepted = await fetch(API_BASE_URL + '/api/content/post/threads', {
  method: 'POST',
  headers: {
    'X-API-Key': API_KEY,
    'Content-Type': 'application/json',
    'Idempotency-Key': 'campaign-thread-2026-08-01',
    'Prefer': 'respond-async'
  },
  body: JSON.stringify(
    {
      "accountId": "THREADS_ACCOUNT_ID",
      "threadItems": [
        {
          "content": "Thread pertama dengan gambar",
          "mediaItems": [
            {
              "url": "https://your-domain.com/threads-photo-1.jpg"
            }
          ]
        },
        {
          "content": "Thread kedua hanya teks"
        },
        {
          "content": "Thread ketiga dengan video",
          "mediaItems": [
            {
              "url": "https://your-domain.com/video-threads.mp4"
            }
          ]
        }
      ],
      "threadsSettings": {
        "who_can_reply": "everyone"
      }
    }
  )
});

const { requestId } = await accepted.json();

let status;
do {
  await new Promise((resolve) => setTimeout(resolve, 5000));
  const response = await fetch(
    API_BASE_URL + '/api/content/requests/' + requestId,
    { headers: { 'X-API-Key': API_KEY } }
  );
  status = await response.json();
} while (status.status === 'pending' || status.status === 'processing');

console.log(status.results);
Example response · 202
{
  "success": true,
  "requestId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
  "status": "accepted",
  "accountId": "THREADS_ACCOUNT_ID",
  "platform": "threads",
  "itemCount": 3
}

Thread sequence response

The synchronous response is additive: it includes a requestId and a canonical status alongside the per-item results, shown in the response box above. Keep the requestId (or reuse the Idempotency-Key) to recover results with the request status endpoint if the client times out. While a request with the same Idempotency-Key is still in progress, the endpoint replies 202 with a Retry-After header instead of starting a second sequence.

Requirements and limits

Keep these constraints in mind when designing thread sequence workflows.

  • Scope threads_content_publish is required for all Threads publishing.
  • Idempotency-Key is required for thread sequences; retrying with the same key replays the existing result instead of posting again.
  • Maximum 10 items per thread sequence.
  • Each thread item counts toward the 250 post/user/24h Threads rate limit.
  • Content is required for text-only thread items (max 500 characters per item).
  • Media validation is applied per-item: single video or multiple images.
  • ThreadsSettings (who_can_reply) applies to the entire sequence.

FAQ

Common questions about this API topic.

Can I post text-only to TikTok, Instagram, or Pinterest?

No. TikTok, Instagram, and Pinterest require media. Text-only posting is supported on Threads and Facebook Pages, see the text-only posting guide at /docs/text-posts.

How are thread sequence items linked?

Each item is posted sequentially and linked to the previous via reply_to_id. The publish result of item N is used as reply_to_id for item N+1.

Can I mix text-only and media items in one thread sequence?

Yes. Each item in the threadItems array can be text-only or include mediaItems with images/video.

Does thread sequence work with scheduled posts?

Yes. Include threadItems in the POST /api/posts payload with platform: "threads" and mediaType: "text".

What happens if my client times out mid-sequence?

Do not retry blindly. Reuse the same Idempotency-Key, or poll GET /api/content/requests?idempotencyKey=... to recover the per-item publish IDs without posting duplicates. If the request is still running, the publish endpoint replies 202 with a Retry-After header.