POST blocks/create

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.

The URL pattern /version/block/create/:screen_name_or_user_id.format is still accepted but not recommended. As a sequence of numbers is a valid screen name we recommend using the screen_name or user_id parameter instead.

Resource URL

https://api.twitter.com/1.1/blocks/create.json

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes

Parameters

Name Required Description Default Value Example
screen_name optional The screen name of the potentially blocked user. Helpful for disambiguating when a valid screen name is also a user ID. twitterdev
user_id optional The ID of the potentially blocked user. Helpful for disambiguating when a valid user ID is also a valid screen name. 12345
include_entities optional The entities node will not be included when set to false . false
skip_status optional When set to either true , t or 1 statuses will not be included in the returned user objects. true

Example Request

POST https://api.twitter.com/1.1/blocks/create.json?screen_name=twitterdev&skip_status=true

Example Response

{
  "id": 2244994945,
  "id_str": "2244994945",
  "name": "Twitter Dev",
  "screen_name": "TwitterDev",
  "location": "Internet",
  "description": "Your official source for Twitter Platform news, updates & events. Need technical help? Visit https://t.co/mGHnxZU8c1 ⌨️ #TapIntoTwitter",
  "url": "https://t.co/FGl7VOULyL",
  "entities": {
    "url": {
      "urls": [
        {
          "url": "https://t.co/FGl7VOULyL",
          "expanded_url": "https://developer.twitter.com/",
          "display_url": "developer.twitter.com",
          "indices": [
            0,
            23
          ]
        }
      ]
    },
    "description": {
      "urls": [
        {
          "url": "https://t.co/mGHnxZU8c1",
          "expanded_url": "https://twittercommunity.com/",
          "display_url": "twittercommunity.com",
          "indices": [
            93,
            116
          ]
        }
      ]
    }
  },
  "protected": false,
  "followers_count": 502084,
  "friends_count": 1472,
  "listed_count": 1514,
  "created_at": "Sat Dec 14 04:35:55 +0000 2013",
  "favourites_count": 2203,
  "utc_offset": null,
  "time_zone": null,
  "geo_enabled": true,
  "verified": true,
  "statuses_count": 3393,
  "lang": "en",
  "contributors_enabled": false,
  "is_translator": false,
  "is_translation_enabled": null,
  "profile_background_color": "null",
  "profile_background_image_url": "null",
  "profile_background_image_url_https": "null",
  "profile_background_tile": null,
  "profile_image_url": "null",
  "profile_image_url_https": "https://pbs.twimg.com/profile_images/880136122604507136/xHrnqf1T_normal.jpg",
  "profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1498675817",
  "profile_link_color": "null",
  "profile_sidebar_border_color": "null",
  "profile_sidebar_fill_color": "null",
  "profile_text_color": "null",
  "profile_use_background_image": false,
  "has_extended_profile": null,
  "default_profile": false,
  "default_profile_image": false,
  "following": false,
  "follow_request_sent": false,
  "notifications": false,
  "muting": true,
  "translator_type": "null"
}