---
title: "Create a community"
method: POST
path: "/client/communities/create"
tags: ["Account actions"]
---

# Create a community

`POST /client/communities/create`

## Request

- Base URL: `https://api.twittrapi.com`
- URL: `https://api.twittrapi.com/client/communities/create`
- Auth: API key in header `X-API-KEY`

Create an X Community owned by your account.

Reference: https://www.twittrapi.com/docs/account-actions/client-communities-create

## Query parameters

- `format` 'raw' | 'simple'

## Request body

- object
  - `cookie` string, required: Cookie header of your own logged-in X session: auth_token=...; ct0=... (guest_id is used when present). How to copy it: /docs/x-session.
  - `proxy` string, required: Your proxy, format http://user:pass@host:port. The requests to X go out through it. Used only for this request.
  - `name` string, required: Community name.
  - `description` string: Community description.
  - `joinPolicy` string: Passed to X as is.
  - `invitesPolicy` string: Passed to X as is.
  - `question` string: Question for people who ask to join.

## Response `200`

Wrapper built by the API: {"status_code": <X status>, "response": "<X response body as a string>"}. The HTTP status is X's status when X answered 4xx or 5xx, otherwise 200. Parse response a second time to get X's JSON.

With format=simple: {data: Community}: the community you created. When X reports an error inside the wrapper (for example a tweet that is already liked), the usual wrapper is returned unchanged.

- RawPassthrough: X's own JSON (raw format, the default), passed through unchanged. The shape is X's and can change; see https://www.twittrapi.com/docs/response-format.

## Other responses

- `400`: The body is not valid JSON.
- `401`: Missing or unknown API key. Not charged.
- `402`: No balance left, or the trial expired. Not charged. Top up in the dashboard.
- `403`: Key deactivated, or the endpoint is not in your plan (trial keys and account actions). Not charged.
- `422`: cookie, proxy or name is missing.
- `429`: Rate limit for your key exceeded. Not charged. No Retry-After header: back off exponentially.
- `500`: The session could not be prepared (for example the cookie has no ct0, or the proxy is unreachable). Refunded.
- `default`: Any status X answers with: passed through with X's body.

---

[API](https://skmtc.dev/twittrapi/apis/twittrapi-api.md) · [All operations](https://skmtc.dev/twittrapi/apis/twittrapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twittrapi/apis/twittrapi-api/revisions/0618e38b54c2?raw)
