Skip to content

Latest commit

 

History

History
116 lines (89 loc) · 3.28 KB

File metadata and controls

116 lines (89 loc) · 3.28 KB
title Batch Compliance
sidebarTitle Introduction
description The Batch Compliance endpoints let you upload datasets of Post IDs or user IDs and receive their current compliance status. Use. Enterprise X API v2 tier.
keywords
batch compliance
compliance API
GDPR
data compliance
bulk compliance

import { Button } from '/snippets/button.mdx';

The Batch Compliance endpoints let you upload datasets of Post IDs or user IDs and receive their current compliance status. Use this to identify deleted Posts, suspended accounts, and other compliance events.

Overview

Check status of Posts in bulk Check status of users in bulk Submit jobs and retrieve results later Process millions of IDs

How it works

  1. Create a job — Specify the type (Posts or users) and upload URL
  2. Upload IDs — Upload your dataset to the provided URL
  3. Wait for processing — Job processes asynchronously
  4. Download results — Get compliance status for each ID

Endpoints

Method Endpoint Description
POST /2/compliance/jobs Create a new compliance job
GET /2/compliance/jobs/:id Get job status
GET /2/compliance/jobs List all jobs

Job types

Type Description
tweets Check Post compliance status
users Check user compliance status

Compliance events

Post events

Event Description
deleted Post was deleted by user
bounced Post failed compliance check
protected Account became protected
suspended Account was suspended
scrub_geo Geo data was removed

User events

Event Description
deleted Account was deleted
suspended Account was suspended
protected Account became protected
deactivated Account was deactivated

Example: Create a job

curl -X POST "https://api.x.com/2/compliance/jobs" \
  -H "Authorization: Bearer $BEARER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "tweets",
    "name": "my-compliance-job"
  }'

Getting started

**Prerequisites** Create your first compliance job Key concepts and best practices Full endpoint documentation