Skip to main content
POST
/
v1
/
webhooks
curl -X POST https://api.flux.dev/v1/webhooks \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.yourapp.com/webhooks/flux",
    "events": ["order.completed", "user.signup"],
    "description": "Production webhook"
  }'
{
  "id": "wh_abc123",
  "url": "https://api.yourapp.com/webhooks/flux",
  "events": ["order.completed", "user.signup"],
  "description": "Production webhook",
  "status": "active",
  "secret": "whsec_a1b2c3d4e5f6...",
  "created": "2024-01-15T10:30:00Z"
}
Creates a new webhook endpoint. When events matching the specified types occur, Flux will send a POST request to this URL.
url
string
required
The URL to receive webhook events. Must be HTTPS.
events
string[]
required
Array of event types to subscribe to. Use ["*"] to receive all events.
description
string
A description for this webhook endpoint.
curl -X POST https://api.flux.dev/v1/webhooks \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.yourapp.com/webhooks/flux",
    "events": ["order.completed", "user.signup"],
    "description": "Production webhook"
  }'
{
  "id": "wh_abc123",
  "url": "https://api.yourapp.com/webhooks/flux",
  "events": ["order.completed", "user.signup"],
  "description": "Production webhook",
  "status": "active",
  "secret": "whsec_a1b2c3d4e5f6...",
  "created": "2024-01-15T10:30:00Z"
}
Save the secret from the response. You’ll need it to verify webhook signatures. This is the only time the secret is returned.