cURL
curl --request POST \ --url https://api.x.com/2/compliance/jobs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "type": "tweets", "name": "my-job", "resumable": true } '
{ "data": { "created_at": "2021-01-06T18:40:40.000Z", "download_expires_at": "2021-01-06T18:40:40.000Z", "download_url": "<string>", "id": "1372966999991541762", "status": "created", "type": "tweets", "upload_expires_at": "2021-01-06T18:40:40.000Z", "upload_url": "<string>", "name": "my-job" }, "errors": [ { "title": "<string>", "type": "<string>", "detail": "<string>", "status": 123 } ] }
Creates a new Compliance Job for the specified job type.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
A request to create a new batch compliance job.
Type of compliance job to list.
tweets
users
User-provided name for a compliance job.
64
"my-job"
If true, this endpoint will return a pre-signed URL with resumable uploads enabled.
The request has succeeded.
Show child attributes
Creation time of the compliance job.
"2021-01-06T18:40:40.000Z"
Expiration time of the download URL.
URL from which the user will retrieve their compliance results.
Compliance Job ID.
"1372966999991541762"
Status of a compliance job.
created
in_progress
failed
complete
expired
Expiration time of the upload URL.
URL to which the user will upload their Tweet or user IDs.
1