---
title: "Create webhook"
method: POST
path: "/v1/twitter/stream/webhooks"
tags: ["Stream Webhooks"]
---

# Create webhook

`POST /v1/twitter/stream/webhooks`

Create a new webhook endpoint for a stream monitor. Webhooks receive HMAC-SHA256 signed POST requests when new tweets are detected.

## Request body

- object
  - `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.
  - `secret` string, nullable — Secret used to sign webhook payloads with HMAC-SHA256.

## Response `201`

Webhook created successfully.

- WebhookResponse — 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.
  - `secret` string, nullable — Webhook secret for HMAC-SHA256 signing. Only returned once on creation.
  - `created_at` string, date-time, required — Timestamp when the webhook was created.

## Other responses

- `401` — Authentication failed. The API key is missing, invalid, or expired.
- `402` — Insufficient credits. Your account balance has been exhausted. Purchase more credits at https://scrapebadger.com/dashboard/billing.
- `429` — Rate limit exceeded. Too many requests in a given time period. Implement exponential backoff and retry.

---

[API](https://skmtc.net/scrapebadger/apis/scrapebadger-account-api.md) · [All operations](https://skmtc.net/scrapebadger/apis/scrapebadger-account-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/scrapebadger/scrapebadger-account-api/revisions/4a1ef8777baf/schema)
