Skip to main content
POST
/
v1
/
webhooks
curl -X POST https://api.raily.ai/v1/webhooks \
  -H "Authorization: Bearer raily_sk_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/webhooks/raily",
    "events": ["access.granted", "access.denied"],
    "secret": "whsec_your_secret"
  }'
{
  "id": "wh_abc123",
  "object": "webhook",
  "url": "https://api.example.com/webhooks/raily",
  "events": ["access.granted", "access.denied"],
  "secret": "whsec_your_secret",
  "status": "active",
  "created": "2024-01-15T10:30:00Z"
}

Request Body

url
string
required
The HTTPS URL to receive webhook events
events
array
required
Events to subscribe to
secret
string
Secret for signature verification (auto-generated if not provided)
metadata
object
Custom metadata

Available Events

EventDescription
access.grantedContent access approved
access.deniedContent access blocked
access.rate_limitedRate limit exceeded
content.createdNew content registered
content.updatedContent updated
content.deletedContent deleted
policy.createdPolicy created
policy.updatedPolicy updated
analytics.thresholdAnalytics threshold exceeded
curl -X POST https://api.raily.ai/v1/webhooks \
  -H "Authorization: Bearer raily_sk_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.example.com/webhooks/raily",
    "events": ["access.granted", "access.denied"],
    "secret": "whsec_your_secret"
  }'
{
  "id": "wh_abc123",
  "object": "webhook",
  "url": "https://api.example.com/webhooks/raily",
  "events": ["access.granted", "access.denied"],
  "secret": "whsec_your_secret",
  "status": "active",
  "created": "2024-01-15T10:30:00Z"
}