> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Batch Compliance

> The Batch Compliance endpoints let you upload datasets of Post IDs or user IDs and. Reference for the X API v2 standard tier covering batch compliance.

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

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

<CardGroup cols={2}>
  <Card title="Post compliance" icon="message">
    Check status of Posts in bulk
  </Card>

  <Card title="User compliance" icon="user">
    Check status of users in bulk
  </Card>

  <Card title="Asynchronous" icon="clock">
    Submit jobs and retrieve results later
  </Card>

  <Card title="Large datasets" icon="database">
    Process millions of IDs
  </Card>
</CardGroup>

***

## 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`](/x-api/compliance/create-compliance-job)        | Create a new compliance job |
| GET    | [`/2/compliance/jobs/:id`](/x-api/compliance/get-compliance-job-by-id) | Get job status              |
| GET    | [`/2/compliance/jobs`](/x-api/compliance/get-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

```bash theme={null}
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

<Note>
  **Prerequisites**

  * An approved [developer account](https://developer.x.com/en/portal/petition/essential/basic-info)
  * A [Project and App](/resources/fundamentals/developer-apps) in the Developer Console
  * Your App's [Bearer Token](/resources/fundamentals/authentication)
</Note>

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/x-api/compliance/batch-compliance/quickstart">
    Create your first compliance job
  </Card>

  <Card title="Integration guide" icon="book" href="/x-api/compliance/batch-compliance/integrate">
    Key concepts and best practices
  </Card>

  <Card title="API Reference" icon="code" href="/x-api/compliance/create-compliance-job">
    Full endpoint documentation
  </Card>
</CardGroup>
