PUT
/
api
/
v1
/
organizations
/
{organizationid}
/
users
/
{userid}
curl --request PUT \
  --url https://app.aegister.com/api/v1/organizations/{organizationid}/users/{userid} \
  --header 'Content-Type: application/json' \
  --header 'X-Aegister-Token: <api-key>' \
  --data '{
  "role": "viewer",
  "email": "jsmith@example.com"
}'
{
  "error": 0,
  "messages": [],
  "data": {
    "organization": 123,
    "user": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

X-Aegister-Token
string
header
required

Path Parameters

organizationid
integer
required
userid
string
required

If the user is not already registered, this parameter can be 0.
In case is 0, the email field is required in the request body.

Body

role
enum<string>

Define user role inside the organization.
Assignable roles are:

  • owner: can manage all aspect of the organization
  • security_officer: can edit basic informations of the organization
  • viewer: can only view informations of the organization
Available options:
viewer,
security_officer,
owner
email
string

This is required if userid path parameter is 0.

Response

200
application/json
error
integer

Any value different from 0 indicates an error.
More details can be found in messages.

Required range: 0 <= x <= 0
Example:

0

messages
any[]

If error is 1, contains zero or more details on the error.

Example:
[]
data
object