The Threads Reply Management API allows you to read and manage replies to users' own Threads.
This guide will discuss how to:
The Threads Reply Management API requires an appropriate access token and permissions based on the node you are targeting. While you are testing, you can easily generate tokens and grant your app permissions by using the Graph API Explorer.
threads_basic
— Required for making any calls to all Threads API endpoints.threads_manage_replies
— Required for making POST
calls to reply endpoints.threads_read_replies
— Required for making GET
calls to reply endpoints.Threads profiles are limited to 1,000 API-published replies within a 24-hour moving period. You can retrieve a profile's current Threads replies rate limit usage with the GET /{threads-user-id}/threads_publishing_limit
endpoint.
Note: This endpoint requires the threads_basic
, threads_content_publish
, and threads_manage_replies
permissions.
Name | Description |
---|---|
| Threads reply publishing count over the last 24 hours. |
| Threads reply publishing rate limit config object, which contains the |
curl -s -X GET \ "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publishing_limit?fields=reply_quota_usage,reply_config&access_token=<ACCESS_TOKEN>"
{ "data": [ { "reply_quota_usage": 1, "reply_config": { "quota_total": 1000, "quota_duration": 86400 } } ] }
There are two ways of retrieving a thread's replies: GET {media-id}/replies
and GET {media-id}/conversation
.
GET {media-id}/replies
only returns the top-level replies under the Threads ID provided in the request, while GET {media-id}/conversation
returns all replies, regardless of the depth, either in chronological or reverse chronological order.
These parameters are for both GET {media-id}/replies
and GET {media-id}/conversation
.
Name | Description |
---|---|
|
|
These fields are for both GET {media-id}/replies
and GET {media-id}/conversation
.
Name | Description |
---|---|
| The media's ID. |
| Represents text for a Threads reply. This is optional on image, video, and carousel replies. |
| Threads username who created the post. |
| Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a copyright violation. |
| The publish date and time of the post in ISO 8601 format. |
| Surface where the media is published. In the case of Threads, the value is |
| The media type for a Threads reply will be one of these values: |
| The post’s media URL. This only shows for image, video, and carousel replies. |
| Shortcode of the media. |
| URL of thumbnail. This only shows for Threads replies with video. |
| List of child posts. This only shows for carousel replies. |
| Indicates if the media is a quoted reply made by another user. |
|
|
| Media ID of the top-level post or original thread in the reply tree. |
| Media ID of the immediate parent of the reply. |
|
|
|
|
| Whether or not the reply is hidden. |
| Who can reply to your post. |
Use {media-id}/replies
to fetch a paginated list of all top-level replies.
This endpoint is applicable to the use cases that focus on the depth level of the replies. The endpoint returns the immediate replies of the requested Threads ID. has_replies
indicates whether a Thread has nested replies or not and the field can be used to decide to chain further subsequent GET calls to retrieve replies located in the deeper levels.
curl -s -X GET \ "https://graph.threads.net/v1.0/<MEDIA_ID>/replies?fields=id,text,timestamp,media_product_type,media_type,media_url,shortcode,thumbnail_url,children,has_replies,root_post,replied_to,is_reply,hide_status&reverse=false&access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "1234567890", "text": "First Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": true, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "NOT_HUSHED" }, { "id": "1234567890", "text": "Second Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "HIDDEN" }, { "id": "1234567890", "text": "Third Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "UNHUSHED" } ], "paging": { "cursors": { "before": "BEFORE_CURSOR", "after": "AFTER_CURSOR" } } }
Use {media-id}/conversation
to fetch a paginated and flattened list of all top-level and nested replies.
This endpoint is applicable to specific use cases that do not focus on the knowledge of the depthness of the replies. Note: This endpoint is only intended to be used on the root-level threads with replies.
curl -s -X GET \ "https://graph.threads.net/v1.0/<MEDIA_ID>/conversation?fields=id,text,timestamp,media_product_type,media_type,media_url,shortcode,thumbnail_url,children,has_replies,root_post,replied_to,is_reply,hide_status&reverse=false&access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "1234567890", "text": "First Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": true, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "NOT_HUSHED" }, { "id": "1234567890", "text": "Second Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "HIDDEN" }, { "id": "1234567890", "text": "Third Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "UNHUSHED" }, { "id": "1234567890", "text": "Nested Reply", "timestamp": "2024-01-01T18:20:00+0000", "media_product_type": "THREADS", "media_type": "TEXT_POST", "shortcode": "abcdefg", "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "hide_status": "NOT_HUSHED" } ], "paging": { "cursors": { "before": "BEFORE_CURSOR", "after": "AFTER_CURSOR" } } }
Use the GET /{threads-user-id}/replies
endpoint to return a paginated list of all replies created by a user.
Here's a list of fields that can be returned for each reply.
Name | Description |
---|---|
| The media's ID. |
| Represents text for a Threads reply. This is optional on image, video, and carousel replies. |
| Threads username who created the post. |
| Permanent link to the post. Will be omitted if the media contains copyrighted material or has been flagged for a copyright violation. |
| The publish date and time of the post in ISO 8601 format. |
| Surface where the media is published. In the case of Threads, the value is |
| The media type for a Threads reply will be one of these values: |
| The post’s media URL. This only shows for image, video, and carousel replies. |
| Shortcode of the media. |
| URL of thumbnail. This only shows for Threads replies with video. |
| List of child posts. This only shows for carousel replies. |
| Indicates if the media is a quoted reply made by another user. |
|
|
| Media ID of the top-level post or original thread in the reply tree. |
| Media ID of the immediate parent of the reply. |
|
|
|
|
| Who can reply to your post. |
curl -s -X GET \ "https://graph.threads.net/v1.0/me/replies?fields=id,media_product_type,media_type,media_url,permalink,username,text,timestamp,shortcode,thumbnail_url,children,is_quote_post,has_replies,root_post,replied_to,is_reply,is_reply_owned_by_me,reply_audience&since=2023-10-15&until=2023-11-18&limit=1&access_token=<ACCESS_TOKEN>"
{ "data": [ { "id": "1234567", "media_product_type": "THREADS", "media_type": "TEXT_POST", "permalink": "https://www.threads.net/@threadsapitestuser/post/abcdefg", "username": "threadsapitestuser", "text": "Reply Text", "timestamp": "2023-10-17T05:42:03+0000", "shortcode": "abcdefg", "is_quote_post": false, "has_replies": false, "root_post": { "id": "1234567890" }, "replied_to": { "id": "1234567890" }, "is_reply": true, "is_reply_owned_by_me": true, "reply_audience": "EVERYONE" }, ], "paging": { "cursors": { "before": "BEFORE_CURSOR", "after": "AFTER_CURSOR" } } }
Use the /manage_reply
endpoint to hide/unhide any top-level replies. This will automatically hide/unhide all the nested replies. Note: Replies nested deeper than the top-level reply cannot be targeted in isolation to be hidden/unhidden.
curl -X POST \ -F "hide={true | false}" \ -F "access_token=<ACCESS_TOKEN>" \ "https://graph.threads.net/v1.0/<THREADS_REPLY_ID>/manage_reply"
{ "success": true }
Use the reply_to_id
parameter to reply to a specific reply under the root post. The caller should be the owner of the root post.
curl -X POST \ -F "media_type=<MEDIA_TYPE>" \ -F "text=<TEXT>" \ -F "reply_to_id=<THREADS_ID>" \ -F "access_token=<ACCESS_TOKEN>" \ "https://graph.threads.net/v1.0/me/threads"
{ "id": "1234567890" }
Use the POST /{threads-user-id}/threads_publish
endpoint to publish the reply container ID returned in the previous step. It is recommended to wait on average 30 seconds before publishing a Threads media container to give our server enough time to fully process the upload. See the media container status endpoint for more details.
creation_id
— Identifier of the Threads media container created from the /threads
endpoint.curl -i -X POST \ "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publish?creation_id=<MEDIA_CONTAINER_ID>&access_token=<ACCESS_TOKEN>"
{ "id": "1234567" // Threads Reply Media ID }
Use the reply_control
parameter to specify who can reply to a post being created for publishing. This parameter accepts one of the 3 options: everyone
, accounts_you_follow
, and mentioned_only
.
curl -X POST \ -F "media_type=<MEDIA_TYPE>" \ -F "text=<TEXT>" \ -F "reply_control=accounts_you_follow" \ -F "access_token=<ACCESS_TOKEN>" \ "https://graph.threads.net/v1.0/me/threads"
{ "id": "1234567890" }
Use the POST /{threads-user-id}/threads_publish
endpoint to publish the media container ID returned in the previous step. It is recommended to wait on average 30 seconds before publishing a Threads media container to give our server enough time to fully process the upload. See the media container status endpoint for more details.
creation_id
— Identifier of the Threads media container created from the /threads
endpoint.curl -i -X POST \ "https://graph.threads.net/v1.0/<THREADS_USER_ID>/threads_publish?creation_id=<MEDIA_CONTAINER_ID>&access_token=<ACCESS_TOKEN>"
{ "id": "1234567" // Threads Media ID }