Skip to main content
POST
/
v1
/
events
curl -X POST https://api.flux.dev/v1/events \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "order.completed",
    "data": {
      "orderId": "ord_8x7kj2",
      "amount": 9900,
      "currency": "usd"
    }
  }'
{
  "id": "evt_1a2b3c4d",
  "type": "order.completed",
  "created": "2024-01-15T10:30:00Z",
  "data": {
    "orderId": "ord_8x7kj2",
    "amount": 9900,
    "currency": "usd"
  }
}
Creates a new event and delivers it to all subscribed webhooks.
type
string
required
The event type. We recommend using dot notation (e.g., user.signup).
data
object
required
The event payload. Can contain any JSON-serializable data.
idempotencyKey
string
A unique key to prevent duplicate events. If you send the same key twice within 24 hours, the second request returns the original event.
curl -X POST https://api.flux.dev/v1/events \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "type": "order.completed",
    "data": {
      "orderId": "ord_8x7kj2",
      "amount": 9900,
      "currency": "usd"
    }
  }'
{
  "id": "evt_1a2b3c4d",
  "type": "order.completed",
  "created": "2024-01-15T10:30:00Z",
  "data": {
    "orderId": "ord_8x7kj2",
    "amount": 9900,
    "currency": "usd"
  }
}