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

# SmartHR

> List, create, update, delete, and invite employees (crews) in SmartHR

## Overview

SmartHR tools let you manage employees (crews) in SmartHR: list with pagination, get details, create, update, delete, invite, and remove department assignments.

## Key Features

* `SMARTHR_LIST_CREWS`
  * Retrieve a list of employees (crews) with optional pagination and employment status filter.
* `SMARTHR_GET_CREW`
  * Get detailed information for a specific employee by ID.
* `SMARTHR_CREATE_CREW`
  * Create a new employee with name, email, gender, and employment details.
* `SMARTHR_UPDATE_CREW`
  * Update an existing employee; only specified fields are updated.
* `SMARTHR_DELETE_CREW`
  * Delete an employee by ID (some employees may not be deletable depending on status).
* `SMARTHR_INVITE_CREW`
  * Send an invitation to an employee; requires the inviter's user ID.
* `SMARTHR_DELETE_CREW_DEPARTMENTS`
  * Remove all department assignments from an employee.

## Authentication

For setup details, see [SmartHR Credentials](/en/pages/credentials/smarthr).

Each tool requires a **subdomain** (your SmartHR instance URL) and an **access token**. Store the access token as a SmartHR credential in workspace secrets and reference it in the tool config together with the subdomain.

**Note**: Keep API credentials secure and do not commit them to public repositories.

### Example: List Crews and Get One Employee

```yaml theme={null}
- id: list_crews
  tool: SMARTHR_LIST_CREWS
  config:
    - name: subdomain
      value: "https://example.daruma.space"
    - name: access_token
      value: "{{secrets.SMARTHR_ACCESS_TOKEN.access_token}}"
  input:
    - name: page
      value: 1
    - name: per_page
      value: 10

- id: get_crew
  tool: SMARTHR_GET_CREW
  needs: ["list_crews"]
  config:
    - name: subdomain
      value: "https://example.daruma.space"
    - name: access_token
      value: "{{secrets.SMARTHR_ACCESS_TOKEN.access_token}}"
  input:
    - name: id
      value: "{{steps.list_crews.result.result[0].id}}"
```
