v1

latestOpenAPI 3.1.02026-07-26180242448.0 KB
Filter Rules

Update filter rule

Update an existing filter rule. All fields are optional; only provided fields will be updated. Changing the interval may affect the pricing tier.

patch/v1/twitter/stream/filter-rules/{rule_id}

Path parameters

rule_idstring required

The unique ID of the filter rule.

Request body

tagstring

Updated label for the filter rule.

querystring

Updated Twitter Advanced Search query.

interval_secondsnumber

Updated polling interval in seconds.

max_results_per_pollinteger

Updated maximum results per poll cycle.

status'active' | 'paused'

Set rule status. Use "paused" to stop polling and "active" to resume.

webhook_urlstring nullable

Updated webhook URL. Set to null to remove webhook delivery.

webhook_secretstring nullable

Updated webhook secret. Set to null to remove.

Response

Filter rule updated successfully.

idstring required

Unique filter rule identifier.

tagstring required

Human-readable label for the rule.

querystring required

Twitter Advanced Search query.

interval_secondsnumber required

Polling interval in seconds.

max_results_per_pollinteger required

Maximum number of tweets returned per poll cycle.

status'active' | 'paused' | 'suspended' required

Current status of the rule. Suspended indicates the rule was auto-paused due to insufficient credits.

status_reasonstring nullable

Reason for the current status, if applicable.

webhook_urlstring nullable

HTTPS URL receiving webhook deliveries.

webhook_secret_setboolean

Whether a webhook secret is configured. The actual secret is never returned.

credits_per_rule_per_daynumber

Credit cost per day for this rule at the current interval.

pricing_tierstring

Current pricing tier label based on interval.

created_atstring date-time required

Timestamp when the rule was created.

updated_atstring date-time required

Timestamp when the rule was last updated.

Example response

{
  "tag": "AI news tracker",
  "query": "(\"artificial intelligence\" OR \"machine learning\") min_faves:100 lang:en",
  "interval_seconds": 60,
  "max_results_per_poll": 20,
  "pricing_tier": "1-minute"
}