# User Management

### Account Provisioning (Onboarding employees)

To onboard a new employee into Firstbase, start by retrieving available package options using a GET request to `/api/packages`. Then, create a new user account with a `POST` request to the `/scim/v2/users endpoint`.

**Some considerations to keep in mind:**

* **Mapping Packages**. Assign a Firstbase Package ID to the user, which determines the package they can order. Many customers map these packages to HRIS metadata, such as department or country, to streamline the process.
* **Primary Email Assignment.** Ensure the user’s primary email is set for logging in. If the user doesn’t have a work email yet, you can use their personal email for onboarding.
* **Automatic Orders.** If a package is configured with an “Automatic Order” status, a mailing address is required. An order will be shipped immediately once the account is created.
* **Start Dates.** Include the employee’s start date to help Firstbase optimize the delivery timing of their equipment.
* **Employee’s Country.** The employee’s country of residence is required for billing, even if a full address isn’t yet available.

### Updating Employee Records

To keep employee information, such as names, emails, contact details, or package assignments, up to date, use a `PUT` request to the `/scim/v2/users` endpoint. This allows seamless updates to maintain accurate records within the Firstbase platform.

### Account De-Provisioning (Off-boarding employees)

To off-board an employee, send a `DELETE` request to the `/scim/v2/users` endpoint. If the Firstbase user ID isn’t saved, you can retrieve it using the `/scim/v2/users` endpoint, filtering by email, given name, or family name.

**Some considerations to keep in mind:**

* **Offboarding Process.** A `DELETE` request will initiate the offboarding mode, but won’t immediately delete the account. The user will receive an email requesting them to begin the return process for any assigned equipment. While they cannot place new orders, they can still log into Firstbase to complete the off-boarding steps.
* **Immediate Action.** There’s no scheduling option for off-boarding via the API. The `DELETE` request immediately triggers the off-boarding process, similar to scheduling it through the Firstbase UI. The user will receive the same email notification and access to manage return kit shipping details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.firstbase.com/introduction/use-cases/user-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
