Skip to main content
POST
/
2
/
tweets
/
search
/
stream
/
rules
Update stream rules
curl --request POST \
  --url https://api.x.com/2/tweets/search/stream/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "add": [
    {
      "tag": "Non-retweeted coffee Posts",
      "value": "coffee -is:retweet"
    }
  ]
}'
{
  "data": [
    {
      "id": "120897978112909812",
      "tag": "Non-retweeted coffee Posts",
      "value": "coffee -is:retweet"
    }
  ],
  "errors": [
    {
      "detail": "<string>",
      "status": 123,
      "title": "<string>",
      "type": "<string>"
    }
  ],
  "meta": {
    "next_token": "<string>",
    "result_count": 123,
    "sent": "<string>",
    "summary": {
      "created": 1,
      "invalid": 1,
      "not_created": 1,
      "valid": 1
    }
  }
}

Authorizations

Authorization
string
header
required

Query Parameters

dry_run
boolean
delete_all
boolean

Body

application/json
  • Option 1
  • Option 2
add
object[]
required

Response

meta
object
required
data
object[]
errors
object[]
Minimum length: 1