Webhooks API
Auto-generated from
openapi-snapshot.json. Do not edit by hand — changes are overwritten byscripts/docs/generate_api_reference.py.
2 endpoints in this group.
POST /api/webhooks/sendgrid/events
Sendgrid Events
Receive a SendGrid Event Webhook batch.
Verifies the ECDSA signature when SENDGRID_WEBHOOK_PUBLIC_KEY is configured, then inserts each event into email_events (idempotent on sg_event_id).
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-twilio-email-event-webhook-signature | header | string | optional | |
x-twilio-email-event-webhook-timestamp | header | string | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
POST /api/webhooks/snaptrade
Snaptrade Webhook
Receive a SnapTrade webhook event.
Returns shape:
- 200
{"received": true, "duplicate": <bool>, "dispatched": <status|None>} - 401 invalid signature
- 400 invalid JSON / missing required field
- 503 receiver misconfigured (secret unset)
The 200 envelope intentionally surfaces duplicate so operators
debugging mis-deliveries can see at a glance whether SnapTrade is
retrying.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
x-snaptrade-signature | header | string | optional |
Responses
| Code | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |