Skip to main content
This guide walks you through muting and unmuting users 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)

Mute a user

1

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).
2

Get the target user ID

Find the user ID of the account you want to mute using the user lookup endpoint.
3

Send the mute request

cURL
curl -X POST "https://api.x.com/2/users/123456789/muting" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target_user_id": "9876543210"}'
4

Review the response

{
  "data": {
    "muting": true
  }
}

Unmute a user

Remove a mute from a user:
cURL
curl -X DELETE "https://api.x.com/2/users/123456789/muting/9876543210" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
Response:
{
  "data": {
    "muting": false
  }
}

Mute vs Block

FeatureMuteBlock
See their PostsNoNo
They see your PostsYesNo
They can follow youYesNo
They can DM youYesNo
They knowNoYes

Next steps