Create Account User
Beta/v1/identity/account-usersIdempotent with Idempotency-Key header. Learn more
Adds a user to the account you are acting in.
If no user with the given email or username exists, a new user is created; a user created with an email address is sent a welcome email containing a generated password, unless they are being added to a supplier account, since suppliers have no portal to sign in to. If a matching user already exists, that user is added to the account instead, and a user you previously removed is restored rather than duplicated. Adding a user to your own account consumes a seat and is rejected once your plan's seat limit is reached.
When you add a user to a customer or supplier account that has its own OpenMRP subscription, the membership is created disabled and has to be activated before that user can sign in.
include[]optional arrayenumValues:userroledepartmentSub-objects to expand in the response. When omitted, sub-objects are returned as null.
nameoptional stringUser display name.
emailoptional stringUser email address.
Either email or username must be provided. If a user with this email already exists, that user is added to the account instead of a new user being created, and the request fails with a conflict if they are already an active member of it.
usernameoptional stringUnique username.
3–255 characters; letters, numbers, underscores, and hyphens. Either email or username must be provided. Providing a username without an email creates a scanning station user.
passwordoptional stringPassword for scanning station users.
Required when creating a scanning station user (username without email) and rejected for all other users, who instead receive a generated password in their welcome email. Must be 8–72 characters and include an uppercase letter, a lowercase letter, a number, and a special character.
role_idoptional stringID of the role to assign to the user.
The role you supply can be overridden: users added to a customer account always receive the shared customer role so their portal capabilities stay permission-driven, and scanning station users in any other account receive the scanner role. Supplying a role whose type is sales_rep normalizes to the account's canonical sales-rep role.
department_idoptional stringID of the department to assign to the user.
The department must already exist in the account you are acting in.
is_commission_eligibleoptional booleanWhether the user can be assigned as a sales representative on orders, territories, and targets.
Defaults to false. Forced true for the sales_rep role type and rejected for scanner and agent roles.
preferencesoptional array of objectNotification preference toggles for the new user.
Only applies when creating a user in another account you manage (cross-account); ignored when creating a user in your own account.
notification_typestringenumValues:invoiceorder_acknowledgementpurchase_order_submissionNotification type.
enabledbooleanWhether this notification type is enabled for the account user.
idstringAccount user ID.
objectstringenumValues:account_userResource type identifier.
statusstringenumValues:activedisabledremovedThe current state of this user's membership in the account.
active: the user can sign in to the account and occupies one of the plan's seats.disabled: the user is locked out of the account and their sessions have been revoked, but the membership is retained.removed: the membership has been soft-deleted; it is hidden from listings by default and can be restored with the activate action.
The role that determines what this user is permitted to do in the account.
idstringRole ID.
objectstringenumValues:roleResource type identifier.
namestringDisplay name of the role.
Unique within the account.
typestringenumValues:adminuserscannerThe kind of role.
The type gates behavior that individual permissions do not cover, and some actions are reserved for a single role type.
admin: full administrative access. Sensitive areas such as API keys, billing, and third-party integrations are restricted to admins no matter what permissions another role holds.user: a custom role tailored to a specific need, with its permissions defined explicitly. Roles created through the API always have this type.scanner: the role used by shop-floor scanning stations, assigned automatically when a scanning-station user is created.sales_rep: a role for sales representatives. Order analytics are scoped to the rep's own orders.agent: a role assigned to an automated agent rather than a person.
ownerownernullableProvenance of this role.
System-owned roles are platform-provided defaults shared across all accounts and cannot be updated or deleted; account-owned roles are custom to your account.
null in this endpoint.permissionsarray of stringnullablePermissions granted by this role, in {permission}:{action} format, such as customers:read.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
The department this user belongs to within the account.
idstringDepartment ID.
objectstringenumValues:departmentResource type identifier.
namestringDisplay name of the department.
Unique within the account.
notesstringnullableFree-form notes about the department.
locationlocationnullableThe storage location where this department operates.
null in this endpoint.Scanning stations in this department.
null in this endpoint.Machines in this department.
null in this endpoint.labor_rateratenullableHourly labor rate for work done in this department, such as a changeover technician.
Production scheduling costs changeovers with the constraint department's rate when one is set, falling back to the account-wide changeover labor rate setting.
null in this endpoint.created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last update timestamp.
useruserExpandablenullableThe underlying user profile, shared across every account this person belongs to.
idstringUser ID.
objectstringenumValues:userResource type identifier.
emailstringnullableEmail address the user signs in with and receives platform email at.
namestringnullableUser's full display name.
usernamestringnullableUsername the user can sign in with instead of their email address.
Usernames are unique across the whole platform, not just within your account.
email_verified_atstring (date-time)nullableWhen the user verified their email address.
image_urlstringnullableLocation of the user's profile image.
For photos uploaded through the API this holds an internal path rather than a fetchable image URL; call Get User Photo URL to obtain a temporary link to the image itself.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
is_commission_eligiblebooleanWhether this user can be assigned as a sales representative on orders, territories, and targets.
Independent of the sales_rep role type, which still scopes analytics and hides cost. Users with the sales_rep role are always eligible.
last_used_atstring (date-time)nullableWhen the user last accessed this account.
created_atstring (date-time)When the account user was created.
updated_atstring (date-time)When the account user was last updated.
Responses
Successful response for Create Account User