- /2/users/:id/dm/block: Allows you to block an account
- /2/users/:id/dm/unblock: Allows you to unblock an account
Manage Direct Message blocks on the Enterprise API
Use the Enterprise Manage DM blocks endpoints to block or unblock accounts on behalf of an authenticated user and control who can send Direct Messages on X.
The manage DM blocks endpoints enable you to block or unblock a specified account on behalf of an authenticated user. For these endpoints, there are two POST methods available:
If the request is successful, you should see the JSON response as shown below:
Unblock
Once a user has authenticated with your app, you can call the Unblock endpoint on behalf of user as shown below:
If the request is successful, you should see the JSON response as shown below: