Posting to Threads
JSON for a basic post with a link and image using the Threads API:Threads Post
- Threads will automatically preview the link in the post unless there is an image or video included. In the above example the image will show. Removing the image will cause the link preview to show.
- Threads profiles are limited to 250 API-published posts within a 24-hour moving period.
- Threads only allows 1 hashtag per post.
- @mention Threads users will receive a notification.
- Maximum 500 post characters.
- Multi-image/videos posts are supported and sent as a carousel. You may send up to 20 videos and images.
- Threads does not support deletes via an API. Deletes must occur manually using the Threads app.
- If your video doesn’t end in a known video extension such as mp4, please use the
isVideo
parameter. See the /post endpoint for details. - Threads also supports sending media without post text. If you do not want post text included
send an empty String
post: ""
. - See Threads Media Guidelines and Threads Authorization for more information.
Threads Options
You can set additional options for a post by using thethreadsOptions
parameter.
Threads Options
Restrict posts to specific countries using country codes. Use country codes.Only available if Meta has enabled geo restrictions for your account.See Threads Geo Restrictions for more information.
Break long posts into a connected thread series with optional numbering and media.See Thread for more information.
Automatically add numbers at the end of each thread in the format of 1/n.Requires
thread: true
.Add media objects to a thread of threads. One media object will be added to each thread in order.Use
null
to skip media for a specific thread. Use objects with multiple URLs for multiple media per thread.See Thread Media for more information.Adding line breaks or rich text to an Threads post
Threads line breaks can be added to a post with a special new line character. Rich text, such as bold or italic lettering, can be added to a Threads post with a few html elements.Carousel of Images and Videos
You can post multiple images or videos to Threads as a carousel; up to a combined total of 20 images or videos may be use in a carousel. Just add your additional images or videos to themediaUrls
array and the carousel will automatically be created.
Character Limits
Please see Threads Character Limits for more information.Geo Restrictions
You can restrict a post to a specific country or countries by using theallowCountries
array.
allowCountries
: An array of country codes to allow. See country codes.
Geo restrictions (geo-gating) on Threads are only available if Meta has enabled this feature for your account.Meta decides which Threads accounts are eligible for geo restrictions based on factors such as account verification, follower count, or content creator status.
If your account is eligible, you will see the geographic settings (globe icon) in the post composer when creating a new Threads post.You can check if a user profile is eligible for Threads geo restrictions by checking the
isEligibleForGeoRestrictions
property in the /user endpoint.Threads Mentions
Mention another Threads handle by adding @handle in the post text. For example:The @mentioned user will be notified of the mention. Please review the important
rules on mentions.
Thread
A Threads thread, also known as a threadstorm, is a connected series of posts on Threads that allows you to share longer ideas beyond a single post’s character limit, appearing as one continuous narrative when viewed together.Posting a Thread
A Threads thread can be posted via the API. A thread is a post broken up into a set of reply posts associated together in Threads. You can either automatically break up the post or specify the thread breaks in the post text.Threads Thread
thread: true
to automatically break apart the post text into threads based on line breaks.threadNumber: true
to automatically add numbers at the end of threads in the format of 1/n. For example, the 2nd of 5 threads will have appended: 2/5mediaUrls: [array of urls]
to add each media object, an image or video, to a thread in order. Only one media object will be added to a thread in order.
Thread Media
Skip Media
Skip media for a thread by usingnull
in the array. For example:
["https://site.com/image1.png", null, "https://site.com/image2.png"]
This will place image1 on the first post, no image on the second post, and image2 on the third post.
Multiple Media
Multiple media objects can be added to a single post within a thread by adding an object{}
with the media URLs in the mediaUrls
array. Any unique object keys can be used. For example:
Threads Thread with Multiple Media URLs
Thread Breaks
Ayrshare automatically breaks up the post text into appropriate length posts (> 500 characters) for Threads. When creating threads, we prioritize keeping complete sentences in one post when possible. If a sentence won’t fit, we split between sentences. For very long sentences, we split between words. In rare cases where a word is too long, we split the word itself. You may also manually add paragraphs with\n\n
to the post text to indicate a unique thread should be created. If you have \n\n
in the post text, we will not automatically break the post into threads.
For example:
Example Threads Thread
\u2063\n\u2063\n
.
Threads Thread with Paragraphs