Tweets
Delete Tweet
Delete a tweet programmatically via API. $0.001 per call. GetXAPI delete tweet endpoint documentation with examples.
POST
/twitter/tweet/deleteThis endpoint costs $0.001 per API call.
Permanently deletes a tweet owned by the auth_token's account.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | User's auth token |
ct0 | string | No | Optional current CSRF token cookie. When provided with twid, skips server-side credential resolution. |
twid | string | No | Optional current user ID cookie, for example u=1234567890. Must be provided with ct0. |
tweet_id | string | Yes | Numeric id of the tweet to delete. Must be owned by the auth_token holder |
proxy | string | No | Proxy URL (http://, https://, socks5://, or socks4://) |
Notes
- If you already have current
ct0andtwid, send both to skip the extra server-side credential bootstrap fromauth_token. If either one is omitted, the server resolves them fromauth_tokenas before. Stale or invalid supplied values are not validated upfront and may fail on the actual Twitter action instead of returning an early401. - Permanent — a deleted tweet cannot be recovered.
- You can only delete your own tweets. Attempting to delete another account's tweet returns
403. - Idempotent — deleting an already-deleted tweet still returns
200(with"already": truewhen X reports it as already gone).
Response (200)
{
"status": "success",
"msg": "Tweet deleted successfully",
"data": {
"tweetId": "2019264360682778716",
"deleted": true
}
}Error Responses
400 - Missing or invalid tweet_id
{
"error": "Invalid tweet_id: \"abc\" — must be a numeric tweet ID"
}401 - Invalid auth_token
{
"error": "Invalid auth_token - could not extract userId"
}403 - Not your tweet
Returned when the tweet isn't owned by the auth_token's account.
Example
curl -X POST "https://api.getxapi.com/twitter/tweet/delete" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token",
"tweet_id": "2019264360682778716"
}'