v1

latestOpenAPI 3.0.22026-08-062794201004.1 KB
Users

Update User

Updates organizationRole and resources of the user.

In order to access this endpoint, the provided API key must have at least one of the following roles:

  • Organization Owner
  • Project Owner

An Organization Owner API key can be utilized to update organizational-level roles and project-level roles for all projects within the organization.

The Project Owner API key allows for updating project-level roles, solely within the projects where the API key holds the Project Owner role.

The modification of any personal information related to a user, such as password updates, can only be performed by the respective user through the user interface (UI).

The results are always limited by the role and scope of the caller's privileges. To learn more about the roles, see Organization Roles and Project Roles.

patch/v4/organizations/{organizationId}/users/{userId}

Request body

op'add' | 'remove' required

Type of operation.

pathstring required

Path of resource that needs to be updated.

Organization Roles: /organizationRoles

Resources: /resources/{resourceId}

Resource Roles: /resources/{resourceId}/roles

Example request

[
  {
    "path": "/organizationRoles",
    "value": [
      "projectCreator"
    ]
  }
]

Response

Successfully updated the user metadata.

idstring required

The UUID of the user created.

namestring required

The name of the user.

emailstring required

Email of the user.

status'verified' | 'not-verified' | 'pending-primary' required

Depicts user status whether they are verified or not.

  • verified: It reflects a verified state for an email address where the user has proven that they have access to the email account.
  • not-verified: It reflects an unverified or pending verification state.
  • pending-primary: It reflects an unverified primary email address
inactiveboolean required

Depicts whether the user has accepted the invite for the organization.

organizationIdstring required

A GUID4 identifier of the tenant.

organizationRolesOrganizationRoles[] required
lastLoginstring date-time

Time(UTC) at which user last logged in.

regionstring

Region of the user.

timeZonestring

Time zone of the user.

enableNotificationsboolean

After enabling email notifications for your account, you will start receiving email notification alerts from all databases in projects you are a part of.

expiresAtstring date-time

Time at which user expires.

Example response

{
  "id": "ffffffff-aaaa-1414-eeee-000000000000",
  "name": "alex",
  "email": "john.doe@example.com",
  "status": "not-verified",
  "organizationId": "ffffffff-aaaa-1414-eeee-000000000000",
  "organizationRoles": [
    "projectCreator"
  ],
  "lastLogin": "2023-07-17T07:05:39.116124897Z",
  "region": "North America",
  "timeZone": "(UTC -9:00) Alaska Standard Time",
  "enableNotifications": true,
  "expiresAt": "2023-07-17T07:05:39.116124897Z",
  "resources": [
    {
      "type": "project",
      "id": "ffffffff-aaaa-1414-eeee-000000000000",
      "roles": [
        "projectManager"
      ]
    }
  ],
  "audit": {
    "createdBy": "ffffffff-aaaa-1414-eeee-000000000000",
    "createdAt": "2021-09-01T12:34:56Z",
    "modifiedBy": "ffffffff-aaaa-1414-eeee-000000000000",
    "modifiedAt": "2021-09-01T12:34:56Z",
    "version": 1
  }
}