/organization/users/invite v1.0.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Users
postOrganizationUserInvite
Code samples
const inputBody = '{
"type": "object",
"properties": {
"emailAddresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address of the user to invite"
},
"password": {
"type": "string",
"description": "The password for the new user, must contain at least one uppercase letter, one lowercase letter, one number, one special character, and be at least 8 characters long"
}
}
}
}
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://goldleaf.app/api/v1/organization/users/invite',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /organization/users/invite
Sends invitations to new users via email
This endpoint sends invitations to new users via email. Requires admin role.
Body parameter
{
"type": "object",
"properties": {
"emailAddresses": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "The email address of the user to invite"
},
"password": {
"type": "string",
"description": "The password for the new user, must contain at least one uppercase letter, one lowercase letter, one number, one special character, and be at least 8 characters long"
}
}
}
}
}
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| » emailAddresses | body | [object] | false | none |
| body | string | false | The email address of the user to invite | |
| »» password | body | string | false | The password for the new user, must contain at least one uppercase letter, one lowercase letter, one number, one special character, and be at least 8 characters long |
Example responses
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Invitations sent successfully | None |
| 400 | Bad Request | Bad request, invalid input data | None |
| 401 | Unauthorized | Unauthorized, user is not authenticated | None |
| 403 | Forbidden | Forbidden, user does not have the necessary permissions | None |
