v1

latestOpenAPI 3.0.0Twitter Developer Agreement and Policy2026-07-1480235216.3 KB
Tweets

Add/Delete rules

Add or delete rules from a User's active rule set. Users can provide unique, optionally tagged rules to add. Users can delete their entire rule set or a subset specified by rule ids or values.

post/2/tweets/search/stream/rules

Query parameters

dry_runboolean

Dry Run can be used with both the add and delete action, with the expected result given, but without actually taking any action in the system (meaning the end state will always be as it was when the request was submitted). This is particularly useful to validate rule changes.

Request body

OR

Example request

{
  "add": [
    {
      "tag": "Non-retweeted coffee Tweets",
      "value": "coffee -is:retweet"
    }
  ]
}

Response

The request has succeeded.

Example response

{
  "data": [
    {
      "id": "120897978112909812",
      "tag": "Non-retweeted coffee Tweets",
      "value": "coffee -is:retweet"
    }
  ],
  "meta": {
    "summary": {
      "created": 1,
      "invalid": 1,
      "not_created": 1,
      "valid": 1
    }
  }
}