Leave Community

POST/tw-v2/interaction/leave-community

Description

Leave a Twitter/X community. Returns community details including name, description, and member count after leaving.

Request Body

ParameterTypeRequiredDescription
authTokenstringrequiredTwitter authentication token (auth_token cookie value)
communityIdstringrequiredThe numeric ID of the community to leave
proxystringoptionalOptional proxy in format 'host:port@user:pass'

Code Examples

const body = {
  authToken: 'YOUR_AUTH_TOKEN',
  communityId: '1234567890123456789'
};

const response = await fetch('https://api.tweetapi.com/tw-v2/interaction/leave-community', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(body)
});

const data = await response.json();
console.log(data);

Response

Success Response (200 OK)

200
{
  "data": {
    "id": "9876543210987654321",
    "action": "leave_community",
    "timestamp": "2025-01-15T14:45:00.000Z",
    "success": true,
    "metadata": {
      "community_id": "9876543210987654321",
      "community_name": "Sample Community",
      "community_description": "A community for general discussions and networking",
      "member_count": 5432,
      "role": "NonMember"
    }
  }
}

API Playground

POST/tw-v2/interaction/leave-community

Sensitive Credentials Required

Requires your Twitter authToken. Use a test account.

Press ⌘ + Enter to execute

curl -X POST "https://api.tweetapi.com/tw-v2/interaction/leave-community" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response

Click "Try It!" to see the response