In X's app, join the Community, then choose it as the audience before you post. Through the API, send the
Community's ID as community_id in POST /2/tweets, from an account that is allowed to post there. Before building
on either, know that X announced in April 2026 that it would retire Communities. They were still running on
October 25, 2026.
Checked on October 26, 2026. X's API reference, OpenAPI spec, pricing page and changelog were read directly. X Help returned a bot check, so its Communities page was read in the Internet Archive's copy from October 10, 2026. Error behavior comes from X staff answers on X's developer forum. Everything is linked under Sources. No live X API call was made and nothing was posted for this guide.
First: X has announced that Communities are ending
On April 22, 2026, Nikita Bier, X's head of product, announced that X would deprecate Communities and move groups to joinable XChat group chats. The date was May 6, 2026; X later moved it to May 30, 2026, as TechCrunch reported.
Communities were still running after that date:
- On October 25, 2026, x.com labeled a public post made that day "Community post · Build in Public".
- X's API reference (version 2.172, read October 26, 2026) still documents
community_idonPOST /2/tweetsand the Communities lookup and search endpoints. X's API changelog has no entry removing them.
We found no new date from X. So treat a Community as a destination that can stop working. Keep each Community post readable as an ordinary post, and decide ahead of time what happens if X refuses it. Don't let software quietly post it to your main timeline instead.
Who can post in a Community
Only members. X's help page says: "Once you join a Community, you can post into it."
- Your account must be public. X says protected accounts can't join yet.
- How you join depends on the Community. In an open Community, tap Join and agree to its rules. In a restricted one, tap Ask to join and wait for a moderator. People invited by moderators are approved automatically, and some restricted Communities let members invite others.
- Blocking ends membership. If you block a moderator, or a moderator blocks you, you can't join; a member in that situation is removed.
- Moderators can remove members and hide posts that break the Community's rules.
The API shows the same choices. A Community's access is Public or Closed. Its join_policy is Open,
RestrictedJoinRequestsDisabled, RestrictedJoinRequestsRequireAdminApproval,
RestrictedJoinRequestsRequireModeratorApproval or SuperFollowRequired.
X's help page doesn't explain how to create a Community. Plan around Communities that already exist.
How to post to a Community in X's app
- Open the Community and join it. Members find their Communities in the Communities tab of the iOS app or in the sidebar on x.com.
- Start a new post. Before you post, tap the audience control (it says Everyone, which means your followers) and choose the Community. If you belong to several, they're listed under My Communities.
- Post it.
X's July 2025 API changelog mentions an Also share with followers checkbox on x.com. X's help page doesn't, so check that your composer shows it before you rely on it.
To find more Communities, use the search in the Communities tab. X says search works only on the web and in the iOS app, only once you belong to at least one Community, and not every Community appears in the results.
What members and everyone else see
| Who | What X's help page says |
|---|---|
| Members | The post appears in the Community and in members' Home timelines. Their Communities timeline shows only posts from Communities they belong to. |
| Your followers and everyone else | Community posts "are shared with Community members, your followers, and other X users", on the Community page, in search results, on your profile and in other timelines. |
| People who aren't members | They can reply, but moderators can limit what non-members do and hide their replies. |
Older lines on the same page and in X's API data dictionary still say only members can join in the discussion. The newer posting section says non-members can reply. Expect replies from outside the Community.
On x.com, a Community post shows the Community's name above the author's name, linked to the Community. A logged-out post page heads it "Community post · " and the Community's name.
What happens to the post later:
- You leave the Community: your posts and replies stay in it.
- The Community is deleted: your posts aren't deleted.
- X suspends the Community: your posts in it become visible only to you. You can delete them, or get them from your X archive.
- A moderator hides your post: it stops appearing to members in the Community.
Posting to a Community through the X API
1. Get the Community's ID
The ID is in the Community's link: https://x.com/i/communities/<ID>. It's 1 to 19 digits.
To check the ID belongs to the Community you mean, look it up:
curl "https://api.x.com/2/communities/1234567890123456789?community.fields=name,access,join_policy,member_count" \
-H "Authorization: Bearer $X_TOKEN"
This lookup accepts an app-only bearer token, or a user token with tweet.read, users.read and list.read. X
charges $0.005 per Community read. To find a Community by keyword, use GET /2/communities/search?query=… with a user
token (tweet.read, users.read); it returns 10 to 100 results per page.
Names aren't unique. One developer on X's forum kept getting errors because their ID belonged to a different Community with the same name, so match on the ID. A lookup also isn't a membership check: it tells you the Community exists, not that this account may post in it.
2. Create the post
curl -X POST https://api.x.com/2/tweets \
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text": "Shipped the onboarding fix today.", "community_id": "1234567890123456789"}'
- Use the posting account's user token. OAuth 2.0 with
tweet.read,tweet.writeandusers.read, or an OAuth 1.0a user token. An app-only bearer token can't post. X API OAuth 2.0 with PKCE shows how to get one. - Send the ID as a string. X's schema takes 1 to 19 digits in a string. Don't send the link, and don't send a JSON number: JavaScript and many JSON parsers round integers above 2^53, and 19-digit IDs are larger than that.
- It costs the same as any post. X's pricing page lists $0.015 per post and $0.200 for a post with a URL. It lists no separate price for posting to a Community. X API pricing has the rest.
- Media and polls use the usual fields. Threads, polls and media has the request shapes.
share_with_followers is an optional boolean on the same request. X's changelog for July 28, 2025 says that with a
community_id and share_with_followers: true, the post also goes to your followers' timelines, "matching the 'Also
share with followers' checkbox on x.com". X's API reference describes the same field as "Share an exclusive
(super-follower) tweet with all followers." Send it only if you mean it, as a JSON true or false, and look at the
result in X. Reading the post back doesn't return it.
Send every flag as a JSON boolean. X staff confirmed that for_super_followers_only must be a boolean: a client
library that sent the string "False" with a community_id got a 400.
3. Check where it landed
Read the post back with GET /2/tweets/:id?tweet.fields=community_id. X's data dictionary describes community_id as
the Community the post belongs to. Compare it with the ID you sent. An ordinary post has none.
Which Community posts the API refuses
| What you sent | What happens | What to do |
|---|---|---|
| A post from an account that can't post in that Community, for example one that isn't a member, was removed or is protected | 403, "Your account is not permitted to access this feature." X staff called this intended when "the authenticated user is unable to create a post for the provided Community". | Join (or ask to join) in X's app, then try again. Repeating the same request won't change the answer. |
| A wrong Community ID, or one the account can't use | Developers reported 503 Service Unavailable for these in 2025 and early 2026. X staff said to check the Community is valid and the account may post there, and in March 2026 said the reported 503s were fixed. | Before treating a 503 on a Community post as an outage, check the ID and the membership. Confirm nothing was posted before you retry. |
A community_id that isn't 1 to 19 digits in a string |
It doesn't match X's schema. | Take the ID out of the link and send it as a string. |
A quote post (quote_tweet_id) |
Since April 20, 2026 quoting needs an Enterprise plan; self-serve apps can't quote. | Quote it in X's app. |
| A reply to someone else's post | Since February 23, 2026 self-serve apps can reply only when that post's author summoned you: mentioned your account or quoted your post. | Reply in X's app. |
| A thread | X's docs don't describe posting a thread into a Community. | Post a single post. |
Status codes, error text and rules change. Read the error's detail and the current
X API posting errors guide before you retry.
Posting to a Community with Flaghand
Flaghand is one way to post to a Community when an AI agent writes the posts and a person approves them.
- An agent drafts a single X post with
communityset to the Community's ID or itsx.com/i/communities/…link. The draft check looks up the Community's name through X's API, once per workspace (X's $0.005 Community read), or the agent can look it up first with thelookUpXCommunityoperation. - The preview draws the Community line as x.com shows it. The owner approves that exact text and destination with a passkey; changing the Community afterwards voids the approval.
- At the approved time, Flaghand sends the ID as
community_id, andshare_with_followersonly if the draft sets it. Flaghand sets no default for it. It then reads the post back and checks itscommunity_id. It can't check follower sharing, because X doesn't return that flag. - If the lookup fails, approval is blocked. Flaghand never turns a Community post into an ordinary post on its own.
- A Community takes single posts only, not threads. The lookup isn't a membership check: X decides when the post is sent.
- New X connections ask for
list.read, which the lookup needs. An existing connection needs the owner to reconnect only before its first Community lookup that isn't already saved.
Agents draft, check and request approval. No agent token can approve, schedule or post. The details are in drafts and media and the approval boundary. Sign-up isn't open yet: get access to Flaghand.
Sources
All checked on October 26, 2026. No live X API call was made and nothing was posted.
- X Help: Join a Community on X: joining, who can post, choosing the audience, visibility, replies, leaving, suspension, search and moderators. X Help returned a bot check, so it was read in the Internet Archive's October 10, 2026 copy.
- X API: create a post (
community_id,share_with_followers, scopes, the Enterprise rule for quotes), get a Community by ID, search Communities, Communities lookup, data dictionary (the Community object and the post'scommunity_id), pricing and the OpenAPI spec, version 2.172. - X API changelog:
share_with_followers(July 28, 2025) and the self-serve reply rule (February 23, 2026). - X's developer forum, answers from X staff: 403 on Community posting (February–March 2026), 503 with a Community ID (July 2025) and boolean flags with a Community (September 2025).
- X: Nikita Bier's announcement (April 22, 2026), and TechCrunch's report of the shutdown and the May 30 extension.
- Observed on x.com: a public post made on October 25, 2026, labeled "Community post · Build in Public".
- Flaghand: drafts and media, agents.