Invite a user by email
{info} This will trigger an invitation email notification. If the email does not belong to an existing user, a registration link will be send to the emailadres.
| Method | Uri | Auth | Role |
|---|---|---|---|
| POST | /v1/invite |
Bearer JWT-Token |
admin |
The API requires a header Accept and Authorization to be submitted with the request:
{
"Accept": "application/json",
"Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..."
}
{
"email": "required",
"role": "in:researcher,approver"
}
Condition : All required data provided is valid and added to the request body.
Code : 201 Created
Condition : If the request body is incorrect or not complete
Code : 422 Unprocessable Entity
Content example :
{
"message": "De opgegeven informatie bevat fouten.",
"errors": {
"email": [
"The email field is required."
]
}
}
Condition : If the user is not logged in or header data is imcomplete.
Code : 401 Unauthorized
Content example :
{
"message": "Je moet zijn ingelogd om dit te kunnen doen.",
"errors": [
"Unauthenticated."
]
}