---
title: "Create user"
method: POST
path: "/2/drive/{drive_id}/users"
tags: ["Drive > Users"]
---

# Create user

`POST /2/drive/{drive_id}/users`

Create a new user resource

## Path parameters

- `drive_id` integer, required

## Query parameters

- `with` string

## Request body

- object
  - `emails` string[]
  - `file_id` integer, nullable — For adding a file shared along the invitation.
  - `lang` 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pt', nullable — Invitation language fallback if user's preference is not found
  - `message` string, nullable
  - `name` string, nullable — Name of the resource `{name}`
  - `right` 'manage' | 'none' | 'read' | 'write', nullable — Access level of {name}.<note><strong>manage</strong>: Can share, write and read the file.</note><note><strong>none</strong>: Can not act on the file.</note><note><strong>read</strong>: Can only read the file.</note><note><strong>write</strong>: Can write and read the file.</note>
  - `role` 'admin' | 'external' | 'user', required — Administration level of the user.<note><strong>admin</strong>: Administrator of the drive, can manage the drive (settings, invitations and users) and the files.</note><note><strong>external</strong>: External user can only access the files given by the others roles.</note><note><strong>user</strong>: Internal user can invite user and manage the files of his private directory and other directories with manage file access.</note>
  - `send_email` boolean
  - `team_ids` integer[]
  - `type` 'main' | 'shared' — Type of the access; this field is no longer used and has been replaced by an additional role property `external`.<note><strong>main</strong>: User has access to the drive.</note><note><strong>shared</strong>: User has access to a shared file / directory only.</note>
  - `user_ids` integer[]

## Response `201`

Created

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 91ac10ffCreateDriveUserResponse[] — unresolved $ref

## Other responses

- `400` — One email or user at least required
- `403` — Forbidden
- `503` — Service Unavailable

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
