Zernio
APIFor you
Zernio
APIFor you
Platforms

Threads

Overview

Publish

Posts & ThreadsMedia Requirements

Engage

AnalyticsInbox

Reference

Limits & Errors
Dashboard
OverviewPlatformsAPI ReferenceResources
Threads

Posts & Threads

Text, image, video and carousel posts, thread sequences, topic tags and every platformSpecificData field.


A plain post becomes a text post. Add mediaItems for an image, a video or a carousel.

Add threadItems in platformSpecificData for a chain of connected posts.

Text post

Threads accepts text-only posts of up to 500 characters, with no media required.

import Zernio from '@zernio/node';

const zernio = new Zernio();

const { data: published } = await zernio.posts.createPost({
  body: {
    content: 'Hot take: the best API is the one with the best docs.',
    platforms: [
      { platform: 'threads', accountId: '66b2e19d8c3f5a7e9d0b1c2d' }
    ],
    publishNow: true
  }
});

console.log(published.post.platforms[0].platformPostUrl);

Response (201):

{
  "post": {
    "_id": "65f1c0a9e2b5af0012ab34cd",
    "status": "published",
    "platforms": [
      {
        "platform": "threads",
        "status": "published",
        "platformPostUrl": "https://www.threads.net/@yourhandle/post/..."
      }
    ]
  }
}

Every sample below changes only the mediaItems or the platforms entry of this request.

Image post

A single image with an optional caption:

"mediaItems": [
  { "type": "image", "url": "https://cdn.example.com/office.jpg" }
]

Video post

A single video with an optional caption, at most 1 GB and 5 minutes:

"mediaItems": [
  { "type": "video", "url": "https://cdn.example.com/launch.mp4" }
]

Carousel

Up to 10 images in one swipeable post:

"mediaItems": [
  { "type": "image", "url": "https://cdn.example.com/feature1.jpg" },
  { "type": "image", "url": "https://cdn.example.com/feature2.jpg" },
  { "type": "image", "url": "https://cdn.example.com/feature3.jpg" }
]

Thread sequence

threadItems publishes a chain of connected posts. The first item is the root post, and each later item is a reply to the one before it, in order.

Every item carries its own text and optional media.

With threadItems set, the top-level content is stored for display and search only and is not published. The first post must be threadItems[0].

{
  "platform": "threads",
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "platformSpecificData": {
    "threadItems": [
      {
        "content": "Here is a thread about API design",
        "mediaItems": [{ "type": "image", "url": "https://cdn.example.com/cover.jpg" }]
      },
      { "content": "1/ First, REST principles." },
      {
        "content": "2/ Authentication. Here is what we recommend.",
        "mediaItems": [{ "type": "image", "url": "https://cdn.example.com/auth-diagram.jpg" }]
      },
      { "content": "3/ Finally, always version your API. /end" }
    ]
  }
}

Topic tags

topic_tag sets the post's topic tag for discoverability. It is 1 to 50 characters and cannot contain periods (.) or ampersands (&).

It overrides the tag Threads would extract from hashtags in the content.

{
  "platform": "threads",
  "accountId": "66b2e19d8c3f5a7e9d0b1c2d",
  "platformSpecificData": { "topic_tag": "APIDesign" }
}

Platform fields

All fields go in platformSpecificData on the Threads entry.

FieldTypeDefaultDescription
topic_tagstring(from hashtags)Topic tag for categorisation and discoverability. 1 to 50 characters, no periods (.) or ampersands (&). Overrides auto-extraction from content hashtags.
firstCommentstringPosted right after publishing as a reply to the published post (with threadItems, a reply to the root post). Up to 500 characters. It is itself a Threads post, so it counts toward the 250 posts per 24 hours.
threadItemsArray<{content, mediaItems?}>The complete sequence of posts in a thread. The first item becomes the root post and must be threadItems[0]. When set, the top-level content is for display and search only and is not published.
Was this page helpful?

Threads

Publish text, image, video and carousel posts and thread sequences to Threads with the Zernio API, with topic tags, first comments and reply management.

Media Requirements

Image and video requirements for Threads posts, and the rules for media URLs.

On this page

Text postImage postVideo postCarouselThread sequenceTopic tagsPlatform fields