# 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.

import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

Publish text, image, video and carousel posts and thread sequences to Threads with `POST /v1/posts` and `platform: "threads"`.

The same account serves analytics and reply management in the inbox.

## Quick reference

| Property | Value |
|----------|-------|
| Character limit | 500 |
| Images per post | 10 (carousel) |
| Videos per post | 1 |
| Image formats | JPEG, PNG |
| Image max size | 8 MB (auto-compressed) |
| Video format | MP4 (H.264/AAC) |
| Video max size | 1 GB |
| Video max duration | 5 minutes |
| Post types | Text, Image, Video, Carousel, Thread sequence |
| Scheduling | Yes |
| Inbox (comments) | Comment, reply, delete, hide and unhide |
| Comment automations | Public reply only, read by the comment poll ([comment automations](/comment-automations/create-comment-automation)) |
| Inbox (DMs) | No |
| Analytics | Yes (views, likes, comments, shares) |

## Before you start

Threads requires an Instagram Business or Creator account with Threads enabled.

The account connects through Instagram authentication (the same Facebook app). Losing Instagram access means losing Threads, and a restricted Instagram account cannot publish to Threads either.

An account can publish 250 API posts per 24 hours.

<Callout type="warn">
Threads posts are at most 500 characters. A caption cross-posted from LinkedIn (3,000), Facebook (63,206) or Instagram (2,200) fails with "Param text must be at most 500 characters long." Send a shorter Threads version in `customContent`.
</Callout>

## Connect

Call `GET /v1/connect/threads` with `profileId` on [Get OAuth connect URL](/connect/get-connect-url). The user authorizes with the Instagram account that owns the Threads profile.

The [connecting accounts guide](/guides/connecting-accounts) covers the OAuth flow and [scopes](/guides/connecting-accounts#scopes) in general.

[Account health](/accounts/get-all-accounts-health) reports what a connected account can do with the scopes the user granted.

## Publish a post

This request publishes a text post to Threads right away.

<Tabs items={['Node.js', 'Python', 'curl']}>
<Tab value="Node.js">
```typescript
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);
```
</Tab>
<Tab value="Python">
```python
from zernio import Zernio

client = Zernio()

published = client.posts.create_post(
    content="Hot take: the best API is the one with the best docs.",
    platforms=[
        {"platform": "threads", "accountId": "66b2e19d8c3f5a7e9d0b1c2d"}
    ],
    publish_now=True
)

print(published["post"]["platforms"][0]["platformPostUrl"])
```
</Tab>
<Tab value="curl">
```bash
curl -X POST https://zernio.com/api/v1/posts \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hot take: the best API is the one with the best docs.",
    "platforms": [
      {"platform": "threads", "accountId": "66b2e19d8c3f5a7e9d0b1c2d"}
    ],
    "publishNow": true
  }'
```
</Tab>
</Tabs>

Every option is on [Posts & Threads](/platforms/threads/posts).

## In this section

<PlatformPages platform="threads" />

## Related

- [Connecting accounts](/guides/connecting-accounts): the OAuth flow through Instagram.
- [Create post](/posts/create-post): every field of the request.
- [Media uploads](/guides/media-uploads): upload images and videos instead of hosting them.
- [Analytics](/analytics/get-analytics): post performance metrics.
- [Comments](/comments/list-inbox-comments): the inbox API for replies.
- [Pricing](/pricing): what analytics, the inbox and outbound messages cost, and which replies count.