user.invite
The user.invite command is used to send an invitation to a new user.
-
An email is sent to the user.
-
When the user clicks the link in the email, the user account is created and the user is redirected to the specified invitation.redirect URL.
TR50 Request
{
"cmd": {
"command":"user.invite",
"params":{
"emailAddress":"jon.doe@example.com",
"roles":["<roleId>","<roleId>"],
"orgAdmin": false,
"password": "abc123ABC!@#",
"invitation":{
"replyTo":"noreply@example.com",
"subject":"Welcome to the custom monitoring portal",
"body":"Please click the following link to confirm your account: $(link)\n\nThank you".
"redirect":"https://example.telit.com"
}
}
}
Request Parameters
Name |
Type |
Required |
Description |
---|---|---|---|
emailAddress |
String |
Yes |
The email address of the user. |
password |
String |
Yes |
The password of the user. |
invitation.replyTo |
String |
Yes |
The email address that is shown in the reply to field. |
invitation.subject |
String |
Yes |
The subject that is shown in the reply to field. |
invitation.body |
String |
Yes |
The body of the email. The body must contain "$(link)" as seen in the above example. The account activation link the user must click on to create their account will be substituted for "$(link)" in the email. |
invitation.redirect |
String |
Yes |
The user will redirected to the specified URL. |
role |
Array |
|
Object IDs of roles the user should have. |
OrgAdmin |
Boolean |
|
If the user is an Org-Admin. |
TR50 Response
When the user clicks on the activation link in the email, the account will be created. The user must click on mustResetPassword.
If the command is sent successfully a success message is returned. Otherwise, an error and error message will be returned.
{
"cmd": {
"success": true
}
}