> ## Documentation Index
> Fetch the complete documentation index at: https://docsrewrite.vercel.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first event with Flux in under 5 minutes

## Prerequisites

Before you begin, you'll need:

* A [Flux account](https://app.flux.dev/signup)
* Your API key from the [dashboard](https://app.flux.dev/settings/api-keys)
* Node.js 18+ (or Python 3.8+, Go 1.19+)

## 1. Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install @flux/node
  ```

  ```bash yarn theme={null}
  yarn add @flux/node
  ```

  ```bash pnpm theme={null}
  pnpm add @flux/node
  ```

  ```bash pip theme={null}
  pip install flux-python
  ```

  ```bash go theme={null}
  go get github.com/flux-events/flux-go
  ```
</CodeGroup>

## 2. Initialize the Client

Create a new Flux client with your API key:

```typescript theme={null}
import Flux from '@flux/node';

const flux = new Flux(process.env.FLUX_API_KEY);
```

<Warning>
  Never hardcode your API key. Use environment variables to keep it secure.
</Warning>

## 3. Send an Event

Events in Flux have a `type` and a `data` payload. The type is a string that identifies the kind of event (we recommend using dot notation like `user.signup`).

```typescript theme={null}
const event = await flux.events.send({
  type: 'order.completed',
  data: {
    orderId: 'ord_8x7kj2',
    amount: 9900,
    currency: 'usd',
    customerId: 'cus_abc123'
  }
});

console.log('Event sent:', event.id);
```

## 4. Verify It Worked

Head to the [Events tab](https://app.flux.dev/events) in your dashboard. You should see your event logged with its full payload and metadata.

<Frame>
  <img src="https://mintcdn.com/vercel-fcadfe60/l4p3nEAN2O6Qo2St/images/hero-dark.png?fit=max&auto=format&n=l4p3nEAN2O6Qo2St&q=85&s=1bda3198370f361ce1551bedcab156dd" alt="Flux dashboard showing event log" style={{ borderRadius: '0.5rem' }} width="2064" height="1104" data-path="images/hero-dark.png" />
</Frame>

## Next Steps

Now that you've sent your first event, explore these guides:

<CardGroup cols={2}>
  <Card title="Set Up Webhooks" icon="webhook" href="/docs/guides/webhooks">
    Receive events in real-time via HTTP
  </Card>

  <Card title="Event Filtering" icon="filter" href="/docs/guides/events">
    Subscribe to specific event types
  </Card>

  <Card title="Authentication" icon="key" href="/docs/guides/authentication">
    Secure your integration
  </Card>

  <Card title="API Reference" icon="book" href="/docs/api-reference/introduction">
    Full API documentation
  </Card>
</CardGroup>
