Skip to main content
POST
/
v1
/
twitter
/
stream
/
webhooks
Create webhook
curl --request POST \
  --url https://scrapebadger.com/v1/twitter/stream/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "monitor_id": "<string>",
  "url": "https://example.com/webhooks/twitter",
  "secret": "<string>"
}
'
{
  "id": "<string>",
  "monitor_id": "<string>",
  "url": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "secret": "<string>"
}

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.

Body

application/json

Webhook configuration.

monitor_id
string
required

The ID of the stream monitor to attach this webhook to.

url
string
required

HTTPS URL to receive webhook deliveries. Must use HTTPS.

Example:

"https://example.com/webhooks/twitter"

secret
string | null

Secret used to sign webhook payloads with HMAC-SHA256.

Response

Webhook created successfully.

Webhook endpoint details. Only returned on creation; the secret is included in the response.

id
string
required

Unique webhook identifier.

monitor_id
string
required

ID of the associated stream monitor.

url
string
required

HTTPS URL of the webhook endpoint.

created_at
string<date-time>
required

Timestamp when the webhook was created.

secret
string | null

Webhook secret for HMAC-SHA256 signing. Only returned once on creation.