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

# Quickstart

> Run your first workflow in a few minutes.

**1. Create your account**

[Sign up](https://nelkap.com/auth) and start your free trial. Your workspace comes with its first project.

**2. Set your endpoint**

Go to your project and set its endpoint: the URL where your app will receive calls from Nelkap, like `https://your-app.com/api/nelkap`.

**3. Add your keys**

Create an API key. Then add it to your environment, with your project's secret.

```bash .env theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
NELKAP_API_KEY=your-api-key
NELKAP_SECRET=your-project-secret
```

**4. Install the SDK**

```bash npm theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
npm install @nelkap/sdk
```

```bash pnpm theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
pnpm add @nelkap/sdk
```

```bash yarn theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
yarn add @nelkap/sdk
```

**5. Write a workflow**

```ts nelkap.ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
import { Nelkap } from '@nelkap/sdk';

import { createProfile, sendWelcomeEmail } from './activities';

export const nelkap = new Nelkap();

export async function onboardUser(userId: string) {
  await nelkap.step.run('profile', () => createProfile(userId));

  await nelkap.step.sleep('1 day');

  await nelkap.step.run('welcome', () => sendWelcomeEmail(userId));
}

nelkap.registerWorkflows([{ name: 'onboardUser', handler: onboardUser }]);
```

* `step.run` saves what each step returns. A resumed run gets it back without running the step again.
* `registerWorkflows` sends your workflows to Nelkap when your app starts.

**6. Serve it**

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
import { nelkap } from './nelkap';

export const handleNelkap = async (request: Request): Promise<Response> => {
  return nelkap.handle(request);
};
```

Serve this function as a POST route at your endpoint.

**7. Start a run**

```ts theme={"theme":{"light":"light-plus","dark":"dark-plus"}}
import { nelkap, onboardUser } from './nelkap';

await nelkap.run(onboardUser, 'user_42');
```

Your run shows up in Runs. Open it to follow each step.

## Next steps

> **[How it works](https://docs.nelkap.com/concepts/how-it-works.md)**
>
> See what happens between two calls, and how a run picks up where it stopped.

> **[Start runs](https://docs.nelkap.com/guides/start-runs.md)**
>
> Start runs from events, on a schedule, or from a webhook.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.