Adds or deletes rules from the active rule set for the filtered stream.
curl --request POST \
--url https://api.x.com/2/tweets/search/stream/rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"value": "coffee -is:retweet",
"tag": "Non-retweeted coffee Posts"
}
]
}
'{
"meta": {
"sent": "<string>",
"next_token": "<string>",
"result_count": 123,
"summary": {
"created": 1,
"invalid": 1,
"not_created": 1,
"valid": 1
}
},
"data": [
{
"value": "coffee -is:retweet",
"id": "120897978112909812",
"tag": "Non-retweeted coffee Posts"
}
],
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.x.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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.
Delete All can be used to delete all of the rules associated this client app, it should be specified with no other parameters. Once deleted, rules cannot be recovered.
A request to add a user-specified stream filtering rule.
Show child attributes
The request has succeeded.
A response from modifying user-specified stream filtering rules.
Show child attributes
All user-specified stream filtering rules that were created.
Show child attributes
1An HTTP Problem Details object, as defined in IETF RFC 7807 (https://tools.ietf.org/html/rfc7807).
Show child attributes
curl --request POST \
--url https://api.x.com/2/tweets/search/stream/rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"add": [
{
"value": "coffee -is:retweet",
"tag": "Non-retweeted coffee Posts"
}
]
}
'{
"meta": {
"sent": "<string>",
"next_token": "<string>",
"result_count": 123,
"summary": {
"created": 1,
"invalid": 1,
"not_created": 1,
"valid": 1
}
},
"data": [
{
"value": "coffee -is:retweet",
"id": "120897978112909812",
"tag": "Non-retweeted coffee Posts"
}
],
"errors": [
{
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"status": 123
}
]
}