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

# Quick Start

> Get up and running with Sequenzy in 5 minutes

# Quick Start Guide

This guide walks you through the essential steps to start sending emails with Sequenzy.

## Prerequisites

* A Sequenzy account ([sign up here](https://www.sequenzy.com))
* A verified sending domain (configured in Settings → Domains)
* An API key (generated in Settings → API Keys)

## Step 1: Get Your API Key

1. Log in to your [Sequenzy dashboard](https://www.sequenzy.com/dashboard)
2. Navigate to **Workspace Settings → API Keys**
3. Click **Create API Key**
4. Copy and securely store your key—it won't be shown again

<Warning>
  Keep your API key secret. Never expose it in client-side code or public
  repositories.
</Warning>

<Tip>
  Managing multiple workspaces? Create an account key in **Account Settings →
  API Keys** and pass `x-company-id: company_abc123` on each request. One
  `seq_user_` key can target every workspace your account can access, including
  workspaces you create later.
</Tip>

## Step 2: Install the SDK

Install the official Sequenzy SDK for Node.js/TypeScript:

<CodeGroup>
  ```bash npm theme={null}
  npm install sequenzy
  ```

  ```bash pnpm theme={null}
  pnpm add sequenzy
  ```

  ```bash bun theme={null}
  bun add sequenzy
  ```
</CodeGroup>

Then initialize the client:

```typescript theme={null}
import Sequenzy from "sequenzy";

const client = new Sequenzy({
  apiKey: process.env.SEQUENZY_API_KEY,
});
```

## Step 3: Add Your First Subscriber

<CodeGroup>
  ```typescript Node SDK theme={null}
  await client.subscribers.create({
    email: "john@example.com",
    firstName: "John",
    lastName: "Doe",
    tags: ["new-signup"],
    customAttributes: {
      plan: "free",
      source: "website",
    },
    enrollInSequences: true,
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.sequenzy.com/api/v1/subscribers" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "john@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "tags": ["new-signup"],
      "customAttributes": {
        "plan": "free",
        "source": "website"
      },
      "enrollInSequences": true
    }'
  ```
</CodeGroup>

## Step 4: Tag Subscribers Based on Actions

When users take actions in your app, tag them to trigger automations:

<CodeGroup>
  ```typescript Node SDK theme={null}
  await client.subscribers.tags.add({
    email: "john@example.com",
    tag: "customer",
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.sequenzy.com/api/v1/subscribers/tags" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "john@example.com",
      "tag": "customer"
    }'
  ```
</CodeGroup>

## Step 5: Track Events

Send events when important things happen:

<CodeGroup>
  ```typescript Node SDK theme={null}
  await client.subscribers.events.trigger({
    email: "john@example.com",
    event: "purchase_completed",
    properties: {
      orderId: "order_12345",
      amount: 99.99,
      product: "Pro Plan",
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.sequenzy.com/api/v1/subscribers/events" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "john@example.com",
      "event": "purchase_completed",
      "properties": {
        "orderId": "order_12345",
        "amount": 99.99,
        "product": "Pro Plan"
      }
    }'
  ```
</CodeGroup>

## Step 6: Send a Transactional Email

Send an immediate email using a template or direct content:

### Using a Template

<CodeGroup>
  ```typescript Node SDK theme={null}
  await client.transactional.send({
    to: "john@example.com",
    slug: "welcome-email",
    variables: {
      firstName: "John",
      dashboardUrl: "https://app.example.com/dashboard",
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.sequenzy.com/api/v1/transactional/send" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "john@example.com",
      "slug": "welcome-email",
      "variables": {
        "firstName": "John",
        "dashboardUrl": "https://app.example.com/dashboard"
      }
    }'
  ```
</CodeGroup>

### Direct Content

<CodeGroup>
  ```typescript Node SDK theme={null}
  await client.transactional.send({
    to: "john@example.com",
    subject: "Welcome to Our Platform!",
    body: "<h1>Welcome, {{firstName}}!</h1><p>Thanks for signing up.</p>",
    variables: {
      firstName: "John",
    },
  });
  ```

  ```bash cURL theme={null}
  curl -X POST "https://api.sequenzy.com/api/v1/transactional/send" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "to": "john@example.com",
      "subject": "Welcome to Our Platform!",
      "body": "<h1>Welcome, {{FIRST_NAME}}!</h1><p>Thanks for signing up.</p>",
      "variables": {
        "firstName": "John"
      }
    }'
  ```
</CodeGroup>

## What's Next?

<CardGroup cols={2}>
  <Card title="Create a Sequence" icon="diagram-project" href="/concepts/sequences">
    Build automated email workflows
  </Card>

  <Card title="Send a Campaign" icon="paper-plane" href="/concepts/campaigns">
    Broadcast to your subscribers
  </Card>

  <Card title="Set Up Sync Rules" icon="rotate" href="/concepts/sync-rules">
    Automate tagging based on events
  </Card>

  <Card title="Explore the API" icon="code" href="/api-reference/introduction">
    Full API documentation
  </Card>
</CardGroup>

## Common Integration Patterns

### User Registration

```typescript theme={null}
import Sequenzy from "sequenzy";

const client = new Sequenzy({ apiKey: process.env.SEQUENZY_API_KEY });

// When a user signs up
await client.subscribers.create({
  email: user.email,
  firstName: user.firstName,
  lastName: user.lastName,
  tags: ["new-signup"],
  customAttributes: {
    userId: user.id,
    plan: "free",
    signupDate: new Date().toISOString(),
  },
  enrollInSequences: true,
});
```

### Subscription Upgrade

```typescript theme={null}
// When a user upgrades
await client.subscribers.events.trigger({
  email: user.email,
  event: "saas.purchase",
  properties: {
    plan: "pro",
    amount: 29.99,
    currency: "USD",
  },
});
```

### Order Confirmation

```typescript theme={null}
// Send order confirmation email
await client.transactional.send({
  to: customer.email,
  slug: "order-confirmation",
  variables: {
    orderNumber: order.id,
    total: order.total,
    items: order.items.map((i) => i.name).join(", "),
  },
});
```
