Introduction

Introduction

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

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

There are two compliance event streams, one for Post 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 Post edit events.

These streams provide the following events: 

Post compliance stream: 

  • delete - indicates that the Post was deleted.

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

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

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

  • undrop - indicates that the Post 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.

Account setup

To access these endpoints, you will need:

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