POST /2/tweets/compliance/jobs

Creates a new compliance job for Tweets.
A compliance job will contain an ID and a destination URL. The destination URL represents the location that contains the list of Tweet IDs consumed by your app.

Endpoint URL

https://api.twitter.com/2/tweets/compliance/jobs

Authentication and rate limits

Authentication methods
supported by this endpoint

OAuth 2.0 Bearer token

Rate limit

15 requests per 15-minute window (app auth)

Learn more about rate limits.



Query parameters

NameTypeDescription
job_name
 Optional 
stringA name for this job, useful to identify multiple jobs using a label you define.
resumable
 Optional 
booleanSpecifies whether to enable the upload URL with support for resumable uploads.


Example requests

  • cURL
  • twurl
  • cURL (resumable uploads)
  • twurl (resumable uploads)
curl -X POST https://api.twitter.com/2/tweets/compliance/jobs -H "Authorization: Bearer $BEARER_TOKEN"
twurl -X POST --bearer /2/tweets/compliance/jobs
curl -X POST "https://api.twitter.com/2/tweets/compliance/jobs?resumable=true" -H "Authorization: Bearer $BEARER_TOKEN"
twurl -X POST --bearer "/2/tweets/compliance/jobs?resumable=true"

Example responses

  • Successful response
{
  "upload_url" : "https://storage.googleapis.com/twitter-compliance/customer_test_object_123456_d8ske9.json?X-Goog-Algorithm=\nGOOG4-RSA-SHA256&X-Goog-Credential=example%40example-project.iam.gserviceaccount\n.com%2F20181026%2Fus-central-1%2Fstorage%2Fgoog4_request&X-Goog-Date=20181026T18\n1309Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&X-Goog-Signature=247a2aa45f16\n9edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa849\n6def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dc\nc1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c2058\n0e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a\n66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823\na29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b13344703\n2ea7abedc098d2eb14a7",
  "upload_expires_at" : "2020-06-16T21:17:43.818+00:00",
  "download_url" : "https://storage.googleapis.com/twitter-compliance/test_tweet_ids?X-Goog-Algorithm=\nGOOG4-RSA-SHA256&X-Goog-Credential=example%40example-project.iam.gserviceaccount\n.com%2F20181026%2Fus-central-1%2Fstorage%2Fgoog4_request&X-Goog-Date=20181026T18\n1309Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&X-Goog-Signature=247a2aa45f16\n9edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa849\n6def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dc\nc1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c2058\n0e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a\n66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823\na29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b13344703\n2ea7abedc098d2eb14a7",
  "download_expires_at" : "2020-06-16T21:17:43.819+00:00",
  "job_id" : "YIAh2p"
}

Response fields

NameTypeDescription
upload_urlstringAn URL representing the location where to upload Tweet IDs consumed by your app. This URL is already signed with an authentication key, so you will not need to pass any additional credentials or headers to authenticate the request.
upload_expires_atdate (ISO 8601)The date and time until which the upload URL will be available (usually 15 minutes from the request time).
download_urlstringThe predefined location where to download the results from the compliance job. This URL is already signed with an authentication key, so you will not need to pass any additional credentials or headers to authenticate the request.
download_expires_atdate (ISO 8601)The date and time until which the download URL will be available (usually seven days from the request time).
job_idstringThe unique identifier for this job.

Was this document helpful?

Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.