---
title: "Create user"
method: POST
path: "/user"
tags: ["Users"]
---

# Create user

`POST /user`

This endpoint lets you create a user. If no password given, a password will automatically be generated.

The password will be ignored if `send_invitation` is set to `True`.

You need to have `WRITE` access on the organization of the user you want to create.

If you want to have an `invited` user but send the invitation email later, you have to send the `send_invitation` parameter as `False` and a `status` parameter to `invited`.       
You will then have to call the [invitation endpoint](/api-reference/users/invite-user) to send the invitation email to the user.

## Request body

- object — Request body to create a user
  - `email` string, email, required — User email (must be unique will return otherwise)
  - `first_name` string, required — User first name
  - `last_name` string, required — User last name
  - `org_id` integer — Unique identifier of the organization to which the user should belong. Only `PROVIDER` users can set this field. If no `org_id` is given, or if you are not a `PROVIDER`, the user will have the same organization as you.
  - `accesses` array[] — List of (list of Group ID). Accesses of the users for the new groups system, only for `GROUP_MANAGER` users. See [the Groups and Sections description](/guides/api/resources/organizations/groups)
    - integer[]
  - `business_ids` string[] — The list of business to which the user has access to. Will be taken into account only if user has `BUSINESS_MANAGER` role.
  - `role` 'ORG_ADMIN' | 'ORG_MANAGER' | 'GROUP_MANAGER' | 'BUSINESS_MANAGER' | 'PUBLISHER' — User role in the application
  - `custom_role` string — Optional API identifier of a custom role to assign to the user. The value must match the `api_id` of one of the custom roles available to your organization. If no custom role is given, users with the role `GROUP_MANAGER` or `BUSINESS_MANAGER` will automatically be assigned to the default built-in custom role associated with their role. For more information about custom roles, see [Managing User Permissions with Custom Roles](/guides/api/guides/custom-roles-and-permissions)
  - `sidebar_pages` SidebarPagesFeatureEnum[] — List of features the user can access from the sidebar.
  - `send_invitation` boolean — Send an invitation email to the User. If you want to have an `invited` user but send the invitation email later, you have to send the `send_invitation` parameter as `False` and a `status` parameter to `invited`. You will then have to call the [invitation endpoint](/api-reference/users/invite-user) to send the invitation email to the user.
  - `status` 'active' | 'invited' — User status in the application
  - `password` string, password — The User password. It should comply with the following rules: - should be at least 8 characters long - should have one upper case letter and one lower case letter - should have one special character
  - `lang` 'fr' | 'en' | 'es' | 'it' | 'pt-br' | 'de' | 'ar' | 'nl' | 'pl' | 'cs' | 'ca' | 'sk' | 'pt' | 'lv' | 'ro' | 'bg' | 'hu' — Available language in the application
  - `sso_only` boolean — Prevent the user from connecting directly from the Partoo connection page. This field is available for users whose organization has defined an SSO configuration. This field can be edited by a user with the role `ORG_ADMIN` or `PROVIDER`.

## Response `200`

OK

- object
  - `id` string — User id
  - `status` 'success' — Request status

## Other responses

- `400` — Your request is incorrect
- `401` — You are not authenticated
- `403` — You are not allowed to perform this action

---

[API](https://skmtc.net/partoo/apis/partoo-rest-api.md) · [All operations](https://skmtc.net/partoo/apis/partoo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/partoo/partoo-rest-api/revisions/3652d8b1a8b3/schema)
