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

# HR quickstart

> Verify access and create your first employee record through the HR API.

# HR quickstart

Use this guide to confirm your integration can reach **Fluide HR** and create an employee. You need API credentials from the Connect dashboard — see [Authorization](/getting-started/authorization).

## Prerequisites

| Variable              | Example                         |
| --------------------- | ------------------------------- |
| `FLUIDE_BASE_URL`     | `https://test.api.fluidehr.com` |
| `FLUIDE_API_KEY`      | `fl_dev_...`                    |
| `FLUIDE_ACCESS_TOKEN` | JWT from token exchange         |

## 1. Verify connectivity

<CodeGroup>
  ```bash curl theme={null}
  curl -X GET "$FLUIDE_BASE_URL/api/v1/hr/health" \
    -H "Authorization: Bearer $FLUIDE_ACCESS_TOKEN" \
    -H "X-Fluide-Api-Key: $FLUIDE_API_KEY" \
    -H "X-Fluide-Client-Id: fluide-developer"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(`${baseUrl}/api/v1/hr/health`, {
    headers: {
      Authorization: `Bearer ${accessToken}`,
      'X-Fluide-Api-Key': process.env.FLUIDE_API_KEY!,
      'X-Fluide-Client-Id': 'fluide-developer',
    },
  });

  if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
  ```
</CodeGroup>

A `200` response means your credentials and base URL are correct.

## 2. Create an employee

Employee records in HR are the source of truth for payroll and other suite products.

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "$FLUIDE_BASE_URL/api/v1/hr/employees" \
    -H "Authorization: Bearer $FLUIDE_ACCESS_TOKEN" \
    -H "X-Fluide-Api-Key: $FLUIDE_API_KEY" \
    -H "X-Fluide-Client-Id: fluide-developer" \
    -H "Content-Type: application/json" \
    -d '{
      "firstName": "Ada",
      "lastName": "Lovelace",
      "email": "ada@example.com",
      "employeeCode": "EMP-001"
    }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(`${baseUrl}/api/v1/hr/employees`, {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${accessToken}`,
      'X-Fluide-Api-Key': process.env.FLUIDE_API_KEY!,
      'X-Fluide-Client-Id': 'fluide-developer',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      firstName: 'Ada',
      lastName: 'Lovelace',
      email: 'ada@example.com',
      employeeCode: 'EMP-001',
    }),
  });

  if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
  const employee = await res.json();
  ```
</CodeGroup>

<Tip>
  Field requirements vary by endpoint. Open **Create HR employee record** in [HR API reference](/api-reference/hr) for the full schema and required properties.
</Tip>

## Next steps

<CardGroup cols={2}>
  <Card title="HR overview" icon="users" href="/hr/overview">
    Modules, leave, contracts, and how HR fits your integration.
  </Card>

  <Card title="HR API reference" icon="code" href="/api-reference/hr">
    Browse and try all HR endpoints.
  </Card>

  <Card title="Payroll quickstart" icon="wallet" href="/payroll/quickstart">
    Run payroll after employees exist in HR.
  </Card>

  <Card title="API playground" icon="play" href="/getting-started/authorization">
    Authorize requests directly in the docs.
  </Card>
</CardGroup>
