Changing users within an organisation
Note
The body must contain the id and modified attributes in order to identify the corresponding entry.
Note
The ID of the entry in the request path must match the value of the id attribute in the body.
Sends a PATCH request to the endpoint /organisations/{organisation}/users/{user}.
Description
The Update-Organisation-User request changes the name and role of a user within a specific organisation.
Requirements
Values of the request: Organisation ID {organisation}; User ID {user}
Objects: none
Request
To change a user within an organisation, add the Organisation ID {organisation} and the User ID {user} to the path of the request.
For a detailed specification of which information is required to change a user, the following attributes must be defined in the body:
| Attributes | Description | Values |
|---|---|---|
id |
The ID of the user. | string |
modified |
The last modification date in ISO 8601 format. | string($date-time) |
The following attributes are optional:
| Attributes | Description | Values |
|---|---|---|
name |
The new name of the user. | string |
role |
The new role of the user. |
|
As a result, the user gets an object with the requested information.
The object provides the following information:
| Attributes | Description | Values |
|---|---|---|
id |
The ID of the user. | string |
name |
The name of the user. | string |
email |
The email address of the user. | string |
status |
The current status of the user. | string |
invitedSince |
The date on which the user was invited, or empty if the invitation has already been accepted. | string |
role |
The role of the user within the organisation. |
|
Example
Example request body:
Responses
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 200 | The request has succeeded. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |
| 422 | The request was unsuccessful because the submitted data could not be processed. |