# twitr.sh X Community Management API

> twitr.sh X Community Management API is a paid API for AI agents from twitr.sh, paid per call via x402, $0.012/call, status unknown (last checked 2026-10-11).

Create, join, leave, or delete X/Twitter Communities on behalf of a connected account, paid per-call in USDC via x402.

## Facts

- Endpoint: POST https://twitr.sh/api/tools/x_community?utm_source=zero.xyz
- Price: $0.012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/twitr-sh-x-community-management-api-914c19b9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xFnAex0eSIXf94xR2V4G0

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability twitr-sh-x-community-management-api-914c19b9 -d '<json body>'
```

Example prompt: Create a new X community called 'AI Builders Hub' with the description 'A space for builders working with AI agents' using my account techfounder22.

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically manage X/Twitter Community membership or creation on behalf of a wallet-authenticated user, with no API key setup required and per-call USDC billing. Prefer this over building a custom X API integration when you need lightweight, pay-as-you-go community lifecycle management (create, join, leave, delete) without maintaining OAuth credentials.

## Known failure modes

- Invalid or unrecognized community_id when joining, leaving, or deleting — returns error indicating community not found
- Account handle not connected to or authorized by this wallet — returns authorization error
- Missing required fields for the chosen action (e.g. no name on create, no community_id on join) — returns validation error
- Attempting to delete a community with mismatched community_name confirmation — returns confirmation mismatch error
- Payment failure if USDC balance is insufficient — returns 402 Payment Required
- Rate limiting by X's underlying API — returns upstream rate limit error

## How this service works

Pay-per-call X/Twitter API for AI agents. Read tweets, search, monitor accounts in real time, and post — paid in USDC via x402. No signup, no API keys.

## Output

Returns a JSON object with an items array containing the community ID and joined status, a runId for tracing, a payment object showing the USDC amount charged via x402, and the call duration in milliseconds.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "description": "create: the community name."
  },
  "action": {
   "enum": [
    "create",
    "join",
    "leave",
    "delete"
   ],
   "type": "string",
   "description": "Which community action."
  },
  "account": {
   "type": "string",
   "description": "A connected X handle owned by this wallet (no @)."
  },
  "description": {
   "type": "string",
   "description": "create: optional community description."
  },
  "community_id": {
   "type": "string",
   "description": "join|leave|delete: the community ID."
  },
  "community_name": {
   "type": "string",
   "description": "delete: the community name, as confirmation."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "id": "1493446837214187523",
    "joined": true
   }
  ],
  "runId": "tw_example",
  "payment": {
   "amount": "0.012000",
   "currency": "USD",
   "protocol": "x402"
  },
  "duration": 1
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/twitr-sh-x-community-management-api-914c19b9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from twitr.sh](https://www.zero.xyz/host/twitr.sh/llms.txt)
