---
title: "Update the user settings for the active user"
method: PATCH
path: "/user/settings"
tags: ["User"]
---

# Update the user settings for the active user

`PATCH /user/settings`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/user/settings`
- Auth: none declared

Updates the user settings for the active user.

## Request body

- object
  - `updates` UserSettingsPatchRequestBodyContentApplicationJsonSchemaUpdates
    - `gitTokens` IapAccountsSchemaGitTokens: Tokens used when interacting with Git APIs and features
      - `GitHub` string: Personal access token for GitHub
      - `GitLab` string: Personal access token for GitLab
    - `email` string: Email for user

## Response `200`

Updated account document for current user

- UserSettingsUpdateUserSettingsResponse200
  - `status` 'OK' | 'Created': The status of the API request.
  - `message` string: Message containing either confirmation of the operation or the reason for the failure of the operation.
  - `data` IapAccountsSchema: This is the schema for an IAP account stored in Mongo
    - `provenance` string, required: AAA provider where account originated
    - `username` string, required: Username for account
    - `firstname` string, required: The user's first name
    - `memberOf` IapAccountsSchemaMemberOfItems[], required: Groups which this account is a part of
      - `aaaManaged` boolean: Whether group comes from an external AAA or not
      - `groupId` string: String representation of a MongoDB ObjectId
    - `assignedRoles` IapAccountsSchemaAssignedRolesItems[], required: Roles assigned to this account
      - `roleId` string: String representation of a MongoDB ObjectId
    - `inactive` boolean, required: Setting for whether account is active or not
    - `lastLogin` string: Date and time when the user last logged in
    - `sso` boolean: Whether this is an SSO user
    - `nameID` string: DEPRECATED: Identifier for SSO account.
    - `_meta` IapAccountsSchemaMeta
      - `created` string: When the account was created
      - `updated` string: When the account was last updated
    - `email` string: Email for user
    - `isServiceAccount` boolean: Value denoting if an account does not reflect a human user
    - `loggedIn` boolean: Property used in the getAccounts API to indicate a user is currently logged in
    - `gitTokens` IapAccountsSchemaGitTokens, required: Tokens used when interacting with Git APIs and features
      - `GitHub` string: Personal access token for GitHub
      - `GitLab` string: Personal access token for GitLab

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
