Skip to main content
POST
/
user
Create user
curl --request POST \
  --url https://api.partoo.co/v2/user \
  --header 'Content-Type: application/json' \
  --header 'x-APIKey: <api-key>' \
  --data '{
  "email": "jsmith@example.com",
  "first_name": "Perceval",
  "last_name": "de Galles",
  "org_id": 123,
  "accesses": [
    [
      1,
      2
    ],
    [
      1,
      3
    ]
  ],
  "business_ids": [
    "<string>"
  ],
  "phone": "<string>",
  "role": "BUSINESS_MANAGER",
  "sidebar_pages": [
    "bulk_modification"
  ],
  "send_invitation": false,
  "status": "active",
  "password": "<string>",
  "lang": "fr",
  "sso_only": false
}'
{
  "id": "5309c3a237bbc544d8e26737",
  "status": "success"
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Body

application/json

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

Example:

"Perceval"

last_name
string
required

User last name

Example:

"de Galles"

org_id
integer

Id of the organization to which the user should belong. If no org_id given, the user will have the same organization as you.

accesses
integer[][]

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

Example:
[[1, 2], [1, 3]]
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.

phone
string

User phone number

role
enum<string>

User role in the application

Available options:
ORG_ADMIN,
GROUP_MANAGER,
BUSINESS_MANAGER,
PUBLISHER
Example:

"BUSINESS_MANAGER"

sidebar_pages
enum<string>[]

List of features the user can access from the sidebar. If not provided in the payload or set to null, then the user will be given all the available features of their organization.

send_invitation
boolean
default:false

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 to send the invitation email to the user.

status
enum<string>

User status in the application

Available options:
active,
invited
Example:

"active"

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
Minimum length: 8
lang
enum<string>

Available language in the application

Available options:
fr,
en,
es,
it,
pt-br,
de,
ar,
nl,
pl,
cs,
ca,
sk,
pt,
lv,
ro,
bg,
hu
Example:

"fr"

sso_only
boolean
default:false

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

OK

id
string

User id

Example:

"5309c3a237bbc544d8e26737"

status
enum<string>

Request status

Available options:
success