PUT /2/tweets/:id/hidden

Hides or unhides a reply to a Tweet.

Endpoint URL

https://api.twitter.com/2/tweets/:id/hidden

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 Authorization Code with PKCE

Rate limit

User rate limit (OAuth 2.0 user Access Token): 50 requests per 15-minute window per each authenticated user

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

tweet.moderate.write

Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required 
stringUnique identifier of the Tweet to hide or unhide. The Tweet must belong to a conversation initiated by the authenticating user.


JSON body parameters

NameTypeDescription
hidden
 Required 
booleanIndicates the action to perform. Specify true to hide the Tweet, false to unhide. Trying to hide a Tweet that's already hidden (or unhide a Tweet that is not hidden) will result in a successful call.


Example requests

      curl -XPUT 'https://api.twitter.com/2/tweets/:id/hidden' 
-H "Authorization: Bearer $ACCESS_TOKEN" 
-H "Content-type: application/json" 
-d '{"hidden": true}'

    
      twurl -XPUT '/2/tweets/:id/hidden' 
-A "Content-Type: application/json" 
-d '{"hidden": true}'

    
      curl -XPUT 'https://api.twitter.com/2/tweets/:id/hidden' 
-H "Authorization: Bearer $ACCESS_TOKEN" 
-H "Content-type: application/json" 
-d '{"hidden": false}'

    
      twurl -XPUT '/2/tweets/:id/hidden' 
-A "Content-Type: application/json" 
-d '{"hidden": false}'

    

Example responses

      {
  "data": {
    "hidden": true
  }
}
    
      {
  "data": {
    "hidden": false
  }
}
    

Response fields

NameTypeDescription
hiddenbooleanIndicates if the Tweet was successfully hidden or unhidden.