CS2Cap webhooks are account-level delivery destinations, not per-alert routing rules. Use them when you want CS2Cap to watch the market, detect alert conditions, and hand the resulting event to your own service or a supported platform for downstream delivery.Documentation Index
Fetch the complete documentation index at: https://docs.cs2cap.com/llms.txt
Use this file to discover all available pages before exploring further.
The basic model
Recommended SaaS pattern
If you are building an alerting product for your own customers:- Let customers define alert rules in your app.
- Mirror those rules into CS2Cap alerts.
- Point one or more CS2Cap webhook destinations at your backend receiver.
- Verify each incoming webhook signature.
- Route the event to the correct customer internally.
- Send email, SMS, Slack, Discord, push, or any other channel from your app.
What CS2Cap owns
- Monitors market data for enabled alert conditions
- Supports
price_below,price_above, andspread_exceedsalert rules - Creates
alert.triggeredevents when conditions match - Sends delivery requests to every active webhook destination on your account
- Retries delivery when your endpoint fails with retryable errors
- Exposes alert event and webhook delivery history for debugging
- Disables the alert after a trigger so it does not fire repeatedly until re-enabled
What your app owns
- Stores your customers and their notification preferences
- Decides which customer owns each alert rule
- Creates and manages the matching CS2Cap alerts
- Receives and verifies webhook events
- Routes events to the correct customer or workspace
- Handles your own billing, quotas, escalation rules, and downstream notifications
What gets configured in CS2Cap
Create one or more alerts withPOST /account/alerts or POST /account/alerts/batch.
An alert defines the trigger:
item_idkind(price_below,price_above, orspread_exceeds)threshold_valuethreshold_currencyfor price alertsis_enabled
- a verified account email with alert emails enabled, or
- an active Quant-tier webhook destination
POST /account/webhooks. The destination defines the delivery target and platform:
labelurlplatformis_active
custom, discord, telegram, and google_sheets. Custom and Google Sheets destinations receive the signed CS2Cap event JSON. Discord and Telegram destinations receive native message payloads. Telegram URLs must include a chat_id query parameter for the Bot API sendMessage request.
The plaintext signing secret is returned only when the webhook is created or rotated. Store it securely if your destination receives signed CS2Cap JSON.
What happens when an alert fires
When one of your enabled alerts matches the current market state:- CS2Cap creates an
alert.triggeredevent. - CS2Cap records delivery work for the configured delivery channels.
- CS2Cap enqueues a webhook delivery job for every active webhook destination on your account.
- CS2Cap disables the alert until you re-enable it.
- Custom and Google Sheets receivers verify the signature using the webhook signing secret.
- Your app decides which of your own users should receive the notification.
- Your app delivers the message through whatever channels you support.
Signature and delivery debugging
Custom and Google Sheets webhook requests include signing and routing headers:| Header | Use |
|---|---|
X-CS2C-Event-Type | Event type. Currently alert.triggered. |
X-CS2C-Delivery-Id | Delivery job ID for debugging and idempotency. |
X-CS2C-Timestamp | Unix timestamp included in the signature payload. |
X-CS2C-Signature | HMAC-SHA256 signature for timestamp.body. |
POST /account/webhooks or POST /account/webhooks/{id}/rotate-secret to verify X-CS2C-Signature.
For delivery debugging:
- Use
GET /account/alerts/eventsto see alert trigger events and delivery summaries. - Use
GET /account/webhooks/deliveriesto inspect outbound webhook jobs. - Use
GET /account/webhooks/deliveries/{delivery_id}to inspect a specific payload snapshot and attempt history.
How the API supports this
| Need | Endpoint |
|---|---|
| Create one alert | POST /account/alerts |
| Create alerts in bulk | POST /account/alerts/batch |
| List or search alerts | GET /account/alerts |
| Re-enable or update an alert | PATCH /account/alerts/{id} |
| Delete an alert | DELETE /account/alerts/{id} |
| Review alert trigger events | GET /account/alerts/events |
| Create a webhook destination | POST /account/webhooks |
| Manage webhook destinations | GET /account/webhooks, PATCH /account/webhooks/{id}, DELETE /account/webhooks/{id} |
| Rotate a webhook secret | POST /account/webhooks/{id}/rotate-secret |
| Inspect webhook delivery history | GET /account/webhooks/deliveries, GET /account/webhooks/deliveries/{delivery_id} |
What this is not
- It is not one webhook URL per alert.
- It is not one webhook URL per end customer.
- It is not a direct customer-routing system inside CS2Cap.
- It is not a replacement for your own notification logic.
- It is not automatic recurring alert firing; triggered alerts must be re-enabled.
When this is a good fit
- You want CS2Cap to do market-side monitoring.
- You want your own product to own customer routing and notification delivery.
- You want to avoid polling.
- You want signed event delivery instead of scraping or periodic sync.
- You are building a Quant-tier integration that can receive and verify webhooks.
When this is not a good fit
- You need CS2Cap to deliver different alerts to different webhook URLs directly.
- You need per-alert webhook selection inside CS2Cap.
- You want CS2Cap to manage your end-customer notification preferences.
- You do not have a backend that can receive signed HTTP requests.