Users
A Teamwire user account represents an individual user. Users can be members of groups and just like admins both always belong to a specific organisation.
Bulk user operations
Perform a bulk user operation
POST /v<api_version>/admin/users/bulk/
This endpoint is used to let the backend perform a bulk operation on multiple users at the same time.
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can operate on users in their own organisation only.
- Superadmins can operate on users in any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
POST data
Parameters are supplied as a JSON object with the following elements:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
operation |
String | No | All admins | The operation to perform. Valid values are described below. |
users |
Array | No | All admins | An array of user IDs on which to perform the operation. |
Valid values for operation are:
| Name | Description |
|---|---|
RESEND_INVITATION_EMAIL |
Resend the invitation Email(s) to the user(s). |
DISABLE_USERS |
Disable the user(s). |
ENABLE_USERS |
Enable the user(s). |
DELETE_USERS |
Delete the user(s). |
ENABLE_TOKEN |
Generate and set login token(s) for the user(s) to allow automatic registration of Desktop clients. |
SET_PASSWORD |
Generate and enable new login password(s) for the user(s). |
SET_OTP_CSV |
Generate and enable one time login password(s) for the user(s). |
SET_OTP_EMAIL |
Generate and enable one time login password(s) for the user(s) and send as email. |
FORCE_RESET_PASSWORD |
Force password change for selected user(s). |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, results will be streamed as described below. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because the calling admin’s organisation has been disabled. |
The operations performed by this endpoint could take a considerable amount of time, up to the scale of minutes. Therefore, instead of waiting for the entire operation to complete and then return a HTTP status code and a single JSON object, the endpoint will keep the socket open to stream multiple JSON objects. By parsing these one-by-one API consumers can provide real-time monitoring of the operation’s progress.
Note: While these individual JSON objects themselves will be valid JSON, the total data stream returned will be a concatenation of multiple JSON objects without surrounding braces, thus it would not pass as valid JSON. This is by design.
The first JSON object returned will contain the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
total_no_of_users |
Number | All admins | The total of number of users that was supplied to the endpoint. Note that this does not equal the number of successfully processed users. |
As soon as one user has been processed successfully, a JSON object with the following elements will be returned:
| Name | Type | Visible to | Description |
|---|---|---|---|
user |
Object | All admins | The user that has just been processed. See below for details. |
Each user object has the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
id |
String | All admins | The user’s ID. |
deleted |
Boolean | All admins | This element will only be present and have the value True if the requested user has been deleted. In this case the following fields must be ignored because they will not contain valid data. |
| ‘first_name` | String | All admins | The user’s first name. |
last_name |
String | All admins | The user’s last name. |
email |
String | All admins | The user’s email address. |
organisation |
Number | All admins | The ID of the organisation the user belongs to. |
origin |
String | All admins | The user’s origin, currently either Native (the user has been created through the Enterprise API or through registration with a Teamwire client) or LDAP (the user has been created by the LDAP synchronisation process). |
origin_id |
String | All admins | For an origin other than Native this is a reference to the associated user object within that origin, e.g. for an origin of LDAP this will be the DN of the LDAP user object the Teamwire user was created for. With native users this will be an empty string. |
comment |
String | All admins | A comment on the user account, if set by an admin. |
confirmed |
Boolean | All admins | Whether the user has confirmed his email address and phone number (does not apply when registering with the desktop client). |
login_password_set |
Boolean | All admins | Whether a login password has been set for this user. |
user_state |
String | All admins | The user account’s state: one of Enabled, Disabled or Deleted. |
registration_token |
String | All admins | The registration token for automated desktop registration, if defined, otherwise null. |
token_validity |
Number | All admins | The date/time until the registration_token will be valid. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned, if set, otherwise null. |
joined |
Number | All admins | When the user object has been created. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
last_usage |
Number | All admins | The last time the user has used a Teamwire client. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
If instead there was an error during the processing of this user, a JSON object with the following elements will be returned:
| Name | Type | Visible to | Description |
|---|---|---|---|
error |
String | All admins | An error message that includes the first name, last name and email address of the user. |
Possible errors messages and meanings:
| Message | Description |
|---|---|
Admin need to choose at least on operation |
No operation params sent or no valid va;ues of operation. |
Reset Password does not work on version |
Force Reset password is available since v15. |
User not found |
One of sent user ID not exist on system. |
Admin not authorised to edit this user |
Current Admin have no permission to modify on this user. |
User's organisation disabled |
Selected user Organisation is currently disable. |
Cannot resend invitation email to this user |
Cannot resend invitation email to this user connector is on state PENDING. |
| ‘User already disabled’ | Selected user is already disabled hence we can’t change user state. |
User already enabled |
Selected user is already enabled hence we can’t change user state. |
User not disabled |
Only disabled user can be deleted. |
Cannot enable token for a disabled user |
User must be on state enable to create new token. |
Cannot set login password for a disabled user |
User must be on state enable to create new password. |
Cannot force change of password on deleted user |
User can not be deleted to force new password change. |
When all users have been processed the following JSON object will be returned to indicate to the API consumer that parsing the response may now end:
| Name | Type | Visible to | Description |
|---|---|---|---|
finished |
Boolean | All admins | This will always have the value True. |
User import from CSV files
Import users from a CSV file
POST /v<api_version>/admin/users/csv/
This endpoint creates Teamwire users from data within a UTF8-encoded CSV file and optionally puts them into groups as well. The CSV file itself gets passed in Base64-encoded as part of the JSON object described below.
The first line of the CSV file is expected to be a header line that describes the columns of the following rows. This line will be used to detect the file format. Two formats are currently supported, “default” and “outlook”.
In the “default” format, the header line must read
email,first_name,last_name,group
and the columns will be interpreted accordingly. The last column can be empty in which case the user does not become member of any group.
In the “outlook” format, the header line must read either
Title,First Name,Middle Name,Last Name,Department,E-mail Address
or
Title,First Name,Middle Name,Last Name,E-mail Address,Department
and the columns will be interpreted accordingly. Department will be interpreted as the name of the group to
put the user in.
When the user organisations allows Onboarding Bot, new Welcome Chat will be crated.
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can import users into their own organisation only.
- Superadmins can import users into any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterpise API version targeted. |
POST data
Parameters are supplied as a JSON object with the following elements:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
file |
String | No | All admins | The Base64-encoded CSV file in the format as described above. |
send_mail |
Boolean | No | All admins | Whether invitation emails should be sent to created users. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, results will be streamed as described below. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because the calling admin’s organisation has been disabled. |
The user import performed by this endpoint could take a considerable amount of time, up to the scale of minutes. Therefore, instead of waiting for the entire operation to complete and then return a HTTP status code, it will immediately return with HTTP status code 200 (OK) and keep the socket open to stream a JSON array of objects. By parsing these one-by-one API consumers can provide real-time monitoring of the operation’s progress.
The first JSON object returned depends on the validity of the request.
If there was an error with the submitted JSON data, the following object will be returned:
| Name | Type | Visible to | Description |
|---|---|---|---|
missing_parameters |
Boolean | All admins | This will always have the value True. |
If the request was valid but the format of the enclosed CSV file could not be recognized as one of the two supported formats, this is indicated by returning the following JSON object:
| Name | Type | Visible to | Description |
|---|---|---|---|
invalid_csv |
Boolean | All admins | This will always have the value True. |
If the request was valid and the CSV file format could be recognized as a supported format, the following JSON object will be returned:
| Name | Type | Visible to | Description |
|---|---|---|---|
total_no_of_users |
Number | All admins | The total of number of users that were found in the CSV file. Note that this does not equal the number of successfully created users. |
If there were errors with one or more lines in the CSV file, e.g. because an invalid email address was specified, one or more JSON objects will follow, each having the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
error |
String | All admins | An error message that includes the first name, last name and email address of the user. |
Next there will be exactly one JSON object for each user, each having the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
user |
Object | All admins | The user that has just been processed. See below for details. Only present if there was no error importing this user. |
msg |
String | All admins | An error message that includes the first name, last name and email address of the user. Only present for some errors with this user. |
error |
String | All admins | An error message that includes the first name, last name and email address of the user. Only present for other errors with this user. |
This series is followed by a JSON object with the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
total_no_of_groups |
Number | All admins | The total number of groups that have been created as a result of the CSV import. |
Manage users
Invite a user
POST /v<api_version>/admin/users/
Calling this endpoint will cause the backend to send an email to the specified user inviting her to start using Teamwire.
The organisation she would belong to depends on her email address and the existance of an organisation with a matching domain.
If no such organisation exists, her registration would cause a new organisation to be created in which there would be no admin initially and whoever registers first would automatically become admin. It is thus advisable to
- either let a Superadmin create the new organisation through the Enterpise API beforehand and have the supposed admin register right away before inviting the user
- or disable this behavior by setting the backend container’s
configuration setting
ORG_DEFAULT_ALLOW_USER_REGaccordingly.
User organisation might allow to create Welcome Chat (check Onboarding settings on the Organisation settings) and this action willtake place after a user is created.
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can invite users into their own organisation only.
- Superadmins can invite users into any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
POST data
Parameters are supplied as a JSON object with the following elements:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
first_name |
String | No | All admins | The user’s first name. |
last_name |
String | No | All admins | The user’s last name. |
email |
String | No | All admins | The user’s email address. |
comment |
String | Yes | All admins | The user’s custom comment. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, user(s) information will be returned as a JSON object as described below. |
| 402 (Payment required) | The request failed because the number of purchased licenses for the organisation the user would belong to does not cover this additional user. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin calling the endpoint is not a Superadmin and the user to invite has an email address that does not belong to her organisation. |
| 409 (Conflict) | The request failed because either a.) the user is already registered and confirmed or b.) the organisation the user would belong to has been disabled. |
Return a list of users or details about a particular user
GET /v<api_version>/admin/users/
GET /v<api_version>/admin/users/<user_id>/
Access restrictions
- Admins and Superadmins must have the allow_view_users permission.
- Admins can request details of users in their own organisation only.
- Superadmins can request details of users in any organisation.
- If no user_id is specified:
- admins will receive a list of users in their own organisation only.
- Superadmins will receive a list of users in all organisations.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
| user_id | String | Yes | All admins | The ID of a particular user for which details should be returned. |
HTTP header parameters
The following parameters are specified as part of the HTTP request header:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
if_modified_since |
Timestamp | Yes | All admins | If specified, only users modified since the given timestamp will be returned. The timestamp must adhere to the standard HTTP format of “day name, day month year hour:minute:second GMT”. Unlike with HTTP, however, if no users were modified the response code will stay 200 but the returned JSON list will be empty. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, user(s) information will be returned as a JSON object as described below. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin is not a Superadmin and a user was specified that does not belong to the admin’s organisation. |
| 404 (Not found) | The request failed because there was no user with this ID. |
| 409 (Conflict) | The request failed because the organisation the user(s) belong(s) to has been disabled. |
If a user ID was specified and the request was successful, a JSON object is returned with the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
id |
String | All admins | The user’s ID. |
deleted |
Boolean | All admins | This element will only be present and have the value True if the requested user has been deleted. In this case the following fields must be ignored because they will not contain valid data. |
first_name |
String | All admins | The user’s first name. |
last_name |
String | All admins | The user’s last name. |
email |
String | All admins | The user’s email address. |
organisation_id |
Number | All admins | The ID of the organisation the user belongs to. |
origin |
String | All admins | The user’s origin, currently either Native (the user has been created through the Enterprise API or through registration with a Teamwire client) or LDAP (the user has been created by the LDAP synchronisation process). |
origin_id |
String | All admins | For an origin other than Native this is a reference to the associated user object within that origin, e.g. for an origin of LDAP this will be the DN of the LDAP user object the Teamwire user was created for. With native users this will be an empty string. |
comment |
String | All admins | A comment on the user account, if set by an admin. |
confirmed |
Boolean | All admins | Whether the user has confirmed his email address and phone number (does not apply when registering with the desktop client). |
login_password_set |
Boolean | All admins | Whether a login password has been set for this user. |
password_policy |
Array | All admins | An array of JSON objects as described below describing the applicable password policy (i.e. restrictions the password must fulfill). |
block_login |
Boolean | All admins | Whether a login by password is currently blocked due to too many failed login attempts. Only admins can unlock users. |
archivable |
Boolean | All admins | Whether conversations in the user’s organisation can be archived, i.e. at least one admin has been configured to be allowed to access the archiving feature. |
user_state |
String | All admins | The user account’s state: one of Enabled, Disabled or Deleted. |
connectors |
Array | All admins | An array of JSON objects as described below representing the user’s connectors. |
groups |
Array | All admins | An array of JSON objects as described below representing the groups the user is a member of. |
registration_token |
String | All admins | The registration token for automated desktop registration, if defined, otherwise null. |
token_validity |
Number | All admins | The date/time until the registration_token will be valid. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned, if set, otherwise null. |
joined |
Number | All admins | When the user object has been created. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
last_usage |
Number | All admins | The last time the user has used a Teamwire client. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
updated_at |
Number | All admins | When the user object was last modified. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
The password policy is returned as an array of JSON objects with the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
min_length |
Number | All admins | The minimum length in characters a password must have. |
symbol_required |
Boolean | All admins | Whether the password must contain at least one symbol (i.e. non-alphanumerical character). |
digit_required |
Boolean | All admins | Whether the password must contain at least one digit (0-9). |
upper_case_letter_required |
Boolean | All admins | Whether the password must contain at least one upper case letter. |
lower_case_letter_required |
Boolean | All admins | Whether the password must contain at least one lower case letter. |
expiration |
Number | All admins | The number of days after which a password must be changed. A value of “0” means never. |
max_failed_attempts |
Number | All admins | The maximum number of failed login attempts until the login by password is blocked and must be unlocked by an Admin. |
The user’s connectors are returned as an array of JSON objects with the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
udid_hash |
String | All admins | A hash value of the device’s unique ID. Used to identify and distinguish connectors. |
connector_state |
String | All admins | The connector’s state: currently one of Pending (a client has registered but not confirmed his email address yet), Enabled (the connector can be used to communicate with the client API), Disabled (applications will be unable to access the client API unless the connector gets reenabled), Wipe (applications are blocked and supposed to wipe all locally present data) or Wiped (locally present data has been wiped, connector can be deleted). |
origin |
String | All admins | The connector’s origin, currently either Reg. with Mobile no. (connector was created through a registration with a mobile phone number), Reg. with Org/User token (connector was created through a registration with an organisation or a user token) or Password login (connector was created through a password login). |
pns_type |
String | All admins | The push notification type as supplied when the connector was created, currently either apns (Apple Push Notification Service, used by the Teamwire iOS client), gcm (Google Cloud Messaging, used by the Teamwire Android client) or ws (Websockets, used by the Teamwire Desktop and Web clients and customer apps using the SDK). |
pns_appid |
String | All admins | The App ID for the push notification service as supplied when the connector was created. |
client_v |
String | All admins | The client’s version number as supplied when the connector was created. |
user_agent |
String | All admins | The client’s user agent as supplied when the connector was created. |
created_at |
Number | All admins | When the connector was created. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
updated_at |
Number | All admins | When the connector was last modified. A timestamp in seconds since 1970-01-01 00:00:00 UTC will be returned. |
The user’s groups are returned as an array of JSON objects with the following elements:
| Name | Type | Visible to | Description |
|---|---|---|---|
id |
String | All admins | The group’s ID. |
title |
String | All admins | The group’s title. |
admin_editable |
Boolean | All admins | Whether the calling admin has access to edit this group or not. True if the group belongs to her organisation or she is a Superadmin. |
If no user ID was specified and the request was successful, the JSON structure returned will be an array of objects each of which having elements as described above minus the following:
archivableconnectorsgroupsupdated_at
Update a user
PUT /v<api_version>/admin/users/<user_id>/
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can update users in their own organisation only.
- Superadmins can update users in any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
| user_id | String | No | All admins | The ID of the user to modify. |
PUT data
Parameters are supplied as a JSON object with the following elements:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
first_name |
String | Yes | All admins | The user’s new first name. This modification is only allowed with users of native origin. |
last_name |
String | Yes | All admins | The user’s new last name. This modification is only allowed with users of native origin. |
login_password |
String | Yes | All admins | The user’s new login password. Must be at least 8 characters long. Specify an empty string to disable password login for this user. |
set_one_time_password |
Bool | Yes | All admins | Generate new One Time Password for this user. |
comment |
String | Yes | All admins | A comment for this user account. Not used within Teamwire clients and visible within the Enterprise API only. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, user(s) information will be returned as a JSON object as described for getting user details. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin is not a Superadmin and a user was specified that does not belong to the admin’s organisation. |
| 404 (Not found) | The request failed because there was no user with this ID. |
| 406 (Not acceptable) | The request failed because either a.) it was attempted to set a new first_name or last_name for a user with an origin other than native or b.) a login password was specified that does not meet the requirements, i.e. is shorter than 8 characters or c.) OTP was set next to normal password. |
| 409 (Conflict) | The request failed because the organisation the user(s) belong(s) to has been disabled. |
Delete a user
DELETE /v<api_version>/admin/users/<user_id>/
Calling this endpoint will delete not only the user account but also
- remove him from any groups
- remove him from any threads
- remove all of his messages
- delete all of his connectors.
Caution: calling this endpoint can not be undone!
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can delete users in their own organisation only.
- Superadmins can delete users in any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
| user_id | String | No | All admins | The ID of the user to delete. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, the user and related elements have been deleted successfully. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin is not a Superadmin and a user was specified that does not belong to the admin’s organisation. |
| 404 (Not found) | The request failed because there was no user with this ID. |
| 409 (Conflict) | The request failed because either a.) the user is still enabled (users must be disabled before they can be deleted) or b.) the organisation the user(s) belong(s) to has been disabled or c.) user is from federated organisation from different backend. |
Enable or disable users
Disable a user
PUT /v<api_version>/admin/users/<user_id>/disable/
Disabling a user will block her from being able to send and receive messages. Disabled users do not count towards the organisation’s number of licenses.
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can disable users in their own organisation only.
- Superadmins can disable users in any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
| user_id | String | No | All admins | The ID of the user to disable. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, the user has been disabled. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin is not a Superadmin and a user was specified that does not belong to the admin’s organisation. |
| 404 (Not found) | The request failed because there was no user with this ID or user is from different backend Federation or user is from federated organisation from different backend. |
| 409 (Conflict) | The request failed because either a.) the user is already disabled or b.) the organisation the user(s) belong(s) to has been disabled. |
Enable a user
DELETE /v<api_version>/admin/users/<user_id>/disable/
Access restrictions
- Admins and Superadmins must have the allow_modify_users permission.
- Admins can enable users in their own organisation only.
- Superadmins can enable users in any organisation.
URL parameters
The following parameters are specified as part of the URL, i.e. /<parameter>/:
| Name | Type | Optional | For use by | Description |
|---|---|---|---|---|
| api_version | String | No | All admins | The Enterprise API version targeted. |
| user_id | String | No | All admins | The ID of the user to enable. |
Result
The following return values indicate the outcome of the API call:
| HTTP status code | Description |
|---|---|
| 200 (OK) | The request was successful, the user has been enabled. |
| 401 (Unauthorized) | The request failed because the caller failed to first login to the Enterprise API or her session expired. Login to obtain a new session and repeat the request. |
| 402 (Payment required) | The request failed because the number of purchased licenses for the organisation the user belongs to does not cover enabling this user. |
| 403 (Forbidden) | The request failed because either a.) the calling admin’s organisation has been disabled or b.) the admin is not a Superadmin and a user was specified that does not belong to the admin’s organisation. |
| 404 (Not found) | The request failed because there was no user with this ID or user is from different backend Federation or user is from federated organisation from different backend. |
| 409 (Conflict) | The request failed because either a.) the user is already enabled |