Twitter is committed to our community of developers who build with the Twitter API. As part of this commitment, we aim to make our API open and fair to developers, safe for people on Twitter, and beneficial for the Twitter platform as a whole. It is crucial that any developer who stores Twitter content offline, ensures the data reflects user intent and the current state of content on Twitter. For example, when someone on Twitter deletes a Tweet or their account, protects their Tweets, edits a Tweet, or scrubs the geo information from their Tweets, it is critical for both Twitter and our developers to honor that person’s expectations and intent.

Real-time streams of compliance events provide developers the tools to maintain Twitter data in compliance with the Twitter Developer Agreement and Policy

There are two compliance event streams, one for Tweet compliance events, and one for User compliance events. These streams are available with Enterprise access and are designed to help partners that ingest high volumes of data 'listen' for compliance events such as Tweet edit events.

These streams provide the following events: 

Tweet compliance stream: 

  • delete - indicates that the Tweet was deleted.

  • tweet_edit - indicates a Tweet has been edited and provides the ID of the updated Tweet. 

  • withheld - indicates that the Tweet has been withheld from one or more countries. 

  • drop - indicates that the Tweet should be removed from public view.

  • undrop - indicates that the Tweet may be displayed again and treated as public.


User compliance stream: 

  • user_delete - indicates that the User account was deleted

  • user_undelete - indicates that the User account was undeleted

  • user_protect - indicates that the User account became private

  • user_unprotect - indicates that the User account became public

  • user_withheld - indicates that the User account has been withheld from one or more countries. 

  • user_suspend - indicates that the User account was suspended
  • user_unsuspend - indicates that the User account was unsuspended
  • user_profile_modification - indicates that the User profile has been updated. This includes an updated description, name, location, and URL. 
  • scrub_geo - indicates that the location information associated with the User was removed

Account setup

To access these endpoints, you will need:

Learn more about getting access to the Twitter API v2 endpoints in our getting started guide.