---
title: "Add Users"
method: POST
path: "/users/add"
tags: ["Users"]
---

# Add Users

`POST /users/add`

## Request

- Base URL: `https://api.velt.dev/v2`
- URL: `https://api.velt.dev/v2/users/add`
- Auth: API key in header `x-velt-api-key` and API key in header `x-velt-auth-token`

Use this API to add Users to organizations, folders, or documents.

- **Organization:** Provides access to all documents unless they have restricted access
- **Folder:** Provides access to all documents in the folder (pass folderId)
- **Document:** Provides access to the specific document (pass documentId)

**Access Control:**
Set `accessRole` to `viewer` (read-only) or `editor` (read/write) for each resource.

## Request body

- object
  - `data` object, required
    - `organizationId` string, required: Organization ID
    - `createOrganization` boolean: If true, creates organization if it doesn't exist
    - `documentId` string: Document ID (optional, for document-level access)
    - `createDocument` boolean: If true, creates document if it doesn't exist
    - `folderId` string: Folder ID (optional, for folder-level access)
    - `createFolder` boolean: If true, creates folder if it doesn't exist
    - `users` User[], required
      - `userId` string, required: Unique identifier for the user
      - `name` string, required: Display name of the user
      - `email` string, email, required: Email address of the user
      - `accessRole` 'viewer' | 'editor': Access role for the resource (viewer for read-only, editor for read/write)
      - `initial` string: User initials (auto-generated from name if not provided)

## Response `200`

Users processed successfully

- object
  - `result` object
    - `status` string
    - `message` string
    - `data` object

## Other responses

- `400`: Invalid request

---

[API](https://skmtc.dev/velt-js/apis/velt-rest-api.md) - [All operations](https://skmtc.dev/velt-js/apis/velt-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/velt-js/apis/velt-rest-api/revisions/0f5af15fa267?raw)
