POST /api/v1/users
Send an invitation to a given user (who will receive an automatic invitation email), or directly create an account.
An invitation is sent when no password
is defined, and the sendCredentials
parameter is true
. Else, the account is created.
Possible outcomes for values of password
and sendCredentials
password is defined? | sendCredentials | Outcome |
---|---|---|
Yes | true | The account is created, and this notification is sent (sharing the password defined). |
Yes | false | The account is created, and no notification is sent (except session invitations, if applicable). |
No | true | The account is created + this notification is sent (sharing a generated password). |
No | false | The account is not created, and this notification is sent (with no password shared). |
Returns
Possible messages:
user_created
: code 200. The user was successfully createduser_already_exists
: code 400. The user already exists. No operation was performed.invitation_created
: code 200. The user was successfully invitedinvitation_already_exists
: code 400. The invitation was already pending. No operation was performed.unavailableEmails
: code 400. The user already exists in another company. No operation was performed.invalidEmails
: code 400. The email provided is not a valid email. No operation was performed.invalid argument: email
: code 400. The value provided is not an email. No operation was performed.faultyInvitations
: code 400. The user was already invited in another company. No operation was performed.user_not_member_of_primaryGroup
: code 400. User must be a member of the primary group. Make sure you add the primary group in thegroups
request parameter.
If you create or invite a user with the email address of a deleted user, some fields will be kept. See our article Restore a deleted account for the complete list.
Changelog
- Milestone L (June 19): An optional
cancelTheInvitationAfterDays
parameter is now available. - Milestone H (Nov 18): The parameter
keywords
is not accepted anymore instead oflabels
. - Milestone H (Nov 18): The old parameter
notify
is accepted instead ofsendCredentials
. This parameter is deprecated, it will be removed in the next version of the API.
Servers
- https://app.360learning.com
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Query parameters
Name | Type | Required | Description |
---|---|---|---|
company |
String | No |
(Optional) Include the company ID to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods. |
apiKey |
String | No |
(Optional) Include the API key to authenticate calls via the API key as query parameter. For more information on the authentication methods supported by our API, see Authentication Methods. |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
groups[0] |
String | No | |
groups[1] |
String | No | |
primaryGroupId |
String | No | |
cancelTheInvitationAfterDays |
String | No | |
roles[0] |
String | No | |
organization |
String | No | |
sendCredentials |
String | No | |
custom |
String | No | |
lang |
String | No | |
job |
String | No | |
lastName |
String | No | |
phone |
String | No | |
password |
String | No | |
firstName |
String | No | |
mail |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.