Skip to main content
PATCH
/
v1
/
twitter
/
stream
/
monitors
/
{monitor_id}
Update stream monitor
curl --request PATCH \
  --url https://scrapebadger.com/v1/twitter/stream/monitors/{monitor_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "usernames": [
    "<string>"
  ],
  "status": "active",
  "webhook_url": "<string>",
  "webhook_secret": "<string>",
  "filter_types": [
    "original"
  ]
}
'
{
  "id": "<string>",
  "name": "Tech Leaders Monitor",
  "usernames": [
    "elonmusk",
    "sama"
  ],
  "status": "active",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status_reason": "<string>",
  "webhook_url": "<string>",
  "webhook_secret_set": true,
  "filter_types": [
    "original"
  ],
  "credits_per_account_per_day": 123,
  "estimated_credits_per_day": 123,
  "pricing_tier": "Standard"
}

Authorizations

x-api-key
string
header
required

Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys.

Path Parameters

monitor_id
string
required

The unique ID of the stream monitor.

Body

application/json

Fields to update on the stream monitor.

name
string

Updated name for the stream monitor.

Required string length: 1 - 100
usernames
string[]

Updated list of Twitter usernames to monitor.

Required array length: 1 - 100 elements
status
enum<string>

Set monitor status. Use "paused" to stop monitoring and "active" to resume.

Available options:
active,
paused
webhook_url
string | null

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

webhook_secret
string | null

Updated webhook secret. Set to null to remove.

filter_types
enum<string>[] | null

Updated tweet type filter. Set to null to deliver all types.

Available options:
original,
reply,
retweet,
quote

Response

Stream monitor updated successfully.

Stream monitor configuration and status.

id
string
required

Unique stream monitor identifier.

name
string
required

Human-readable name of the monitor.

Example:

"Tech Leaders Monitor"

usernames
string[]
required

List of monitored Twitter usernames.

Example:
["elonmusk", "sama"]
status
enum<string>
required

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

Available options:
active,
paused,
suspended
created_at
string<date-time>
required

Timestamp when the monitor was created.

updated_at
string<date-time>
required

Timestamp when the monitor was last updated.

status_reason
string | null

Reason for the current status, if applicable (e.g., "insufficient_credits").

webhook_url
string | null

HTTPS URL receiving webhook deliveries.

webhook_secret_set
boolean

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

filter_types
enum<string>[] | null

Tweet types being delivered. Null means all types.

Available options:
original,
reply,
retweet,
quote
credits_per_account_per_day
number

Credit cost per monitored account per day.

estimated_credits_per_day
number

Estimated total credit cost per day based on current account count.

pricing_tier
string

Current pricing tier label.

Example:

"Standard"