Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.x.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through adding and removing members from a List.
PrerequisitesBefore you begin, you’ll need:
  • A developer account with an approved App
  • User Access Token (OAuth 1.0a or OAuth 2.0 PKCE)
  • A List that you own

Add a member to a List

1

Get the List ID and user ID

You need the ID of your List and the user ID of the person you want to add. Find user IDs using the user lookup endpoint.
2

Add the member

cURL
curl -X POST "https://api.x.com/2/lists/1441162269824405510/members" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "2244994945"}'
3

Review the response

{
  "data": {
    "is_member": true
  }
}

Remove a member from a List

cURL
curl -X DELETE "https://api.x.com/2/lists/1441162269824405510/members/2244994945" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response:
{
  "data": {
    "is_member": false
  }
}

Important notes

  • You can only manage members of Lists you own
  • Adding a user to a List does not require their permission
  • Users can see which public Lists they’ve been added to

Next steps

List members lookup

Get List members

Manage Lists

Create and update Lists

API Reference

Full endpoint documentation