Create a user

Create a business user, provision the user with the configured identity provider, and synchronize their roles and direct permissions.

Required permissions: user:create.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

X-Penny-As-Businessstring or nullOptional

Act on behalf of another business that has granted you access. Requires the business:act_as permission.

Request

This endpoint expects an object.
given_namestringRequired1-150 characters
The user's legal or preferred first name.
family_namestringRequired1-150 characters
The user's family or last name.
emailstringRequiredformat: "email"
The email address the user will use with the configured identity provider.
nicknamestring or nullOptional<=150 characters
An optional display name used when addressing the user.
phonestring or nullOptional
The user's optional phone number in E.164 format.
addressobject or nullOptional
The user's optional postal address.
role_idslist of stringsOptional
Custom or preset role IDs to assign to the user. A user can hold at most five roles.
permissionslist of objectsOptional

Permissions granted directly to the user in addition to permissions provided by assigned roles. Every permission is scoped to your business; scope, sub-type, and resource-ID restrictions are not client-configurable.

activebooleanOptionalDefaults to true
Whether the user can authenticate immediately after creation.

Response

The newly created business user.
BusinessUserobject

A business user, as shown to clients through the client-facing API.

OR
CardholderUserobject

A cardholder user, as shown to clients through the client-facing API.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error