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 retrieving your muted users list using the X API.
PrerequisitesBefore you begin, you’ll need:
- A developer account with an approved App
- User Access Token (OAuth 1.0a or OAuth 2.0 PKCE)
Get your muted users
Get your user ID
You need your authenticated user’s ID. You can find it using the user lookup endpoint or from your Access Token (the numeric part is your user ID). Request your muted users
curl "https://api.x.com/2/users/123456789/muting?\
user.fields=created_at,username,verified&\
max_results=100" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
Review the response
{
"data": [
{
"id": "2244994945",
"name": "X Developers",
"username": "XDevelopers",
"created_at": "2013-12-14T04:35:55.000Z",
"verified": true
}
],
"meta": {
"result_count": 1,
"next_token": "1710819323648428707"
}
}
Include additional data
Use expansions to get related data like pinned Posts:
curl "https://api.x.com/2/users/123456789/muting?\
user.fields=created_at&\
expansions=pinned_tweet_id&\
tweet.fields=created_at" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response with expansion
{
"data": [
{
"username": "XDevelopers",
"created_at": "2013-12-14T04:35:55.000Z",
"id": "2244994945",
"name": "X Developers",
"pinned_tweet_id": "1430984356139470849"
}
],
"includes": {
"tweets": [
{
"created_at": "2021-08-26T20:03:51.000Z",
"id": "1430984356139470849",
"text": "Help us build a better X Developer Platform!..."
}
]
},
"meta": {
"result_count": 1
}
}
Paginate through results
The SDKs handle pagination automatically. For cURL, use the next_token from the response:
curl "https://api.x.com/2/users/123456789/muting?\
max_results=100&\
pagination_token=1710819323648428707" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
Next steps
Manage mutes
Mute and unmute users
API Reference
Full endpoint documentation