Users

Update user

Updates a user. Users can update their own profile, admins can update any user.

patch/users/{id}

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/users/{id}
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Api-Key

Path parameters

idstring required
Example:1357158568008091264

ID of the user to update

Request body

role'admin' | 'projectOwner' | 'boardUser'

User role defining access permissions

namestring

Full display name of the user

avatarobject nullable

Avatar of the user (only null value to remove avatar)

phonestring nullable

Contact phone number

organizationstring nullable

Organization or company name

language'ar-YE' | 'bg-BG' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'el-GR' | 'en-GB' | 'en-US' | 'es-ES' | 'et-EE' | 'fa-IR' | 'fi-FI' | 'fr-FR' | 'hu-HU' | 'id-ID' | 'it-IT' | 'ja-JP' | 'ko-KR' | 'nl-NL' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'ru-RU' | 'sk-SK' | 'sr-Cyrl-RS' | 'sr-Latn-RS' | 'sv-SE' | 'tr-TR' | 'uk-UA' | 'uz-UZ' | 'vi-VN' | 'zh-CN' | 'zh-TW'

Preferred language for user interface and notifications

apiKeyobject nullable

API key of the user (only null value to remove API key)

subscribeToOwnCardsboolean

Whether the user subscribes to their own cards

subscribeToCardWhenCommentingboolean

Whether the user subscribes to cards when commenting

turnOffRecentCardHighlightingboolean

Whether recent card highlighting is disabled

enableFavoritesByDefaultboolean

Whether favorites are enabled by default

defaultEditorMode'wysiwyg' | 'markup'

Default markdown editor mode

defaultHomeView'gridProjects' | 'groupedProjects'

Default view mode for the home page

defaultProjectsOrder'byDefault' | 'alphabetically' | 'byCreationTime'

Default sort order for projects display

isSsoUserboolean

Whether the user is SSO user (only false value to unlink SSO, for admins)

isDeactivatedboolean

Whether the user account is deactivated and cannot log in (for admins)

Example request

{
  "role": "admin",
  "name": "John Doe",
  "phone": "+1234567890",
  "organization": "Acme Corporation",
  "language": "en-US",
  "subscribeToCardWhenCommenting": true,
  "enableFavoritesByDefault": true,
  "defaultEditorMode": "wysiwyg",
  "defaultHomeView": "groupedProjects",
  "defaultProjectsOrder": "byDefault"
}

Response

User updated successfully

Example response

{
  "item": {
    "id": "1357158568008091264",
    "email": "john.doe@example.com",
    "role": "admin",
    "name": "John Doe",
    "username": "john_doe",
    "avatar": {
      "url": "https://storage.example.com/user-avatars/1357158568008091264/original.jpg",
      "thumbnailUrls": {
        "cover180": "https://storage.example.com/user-avatars/1357158568008091264/cover-180.jpg"
      }
    },
    "gravatarUrl": "https://www.gravatar.com/avatar/abc123",
    "phone": "+1234567890",
    "organization": "Acme Corporation",
    "language": "en-US",
    "apiKeyPrefix": "D89VszVs",
    "subscribeToCardWhenCommenting": true,
    "enableFavoritesByDefault": true,
    "defaultEditorMode": "wysiwyg",
    "defaultHomeView": "groupedProjects",
    "defaultProjectsOrder": "byDefault",
    "lockedFieldNames": [
      "email",
      "password",
      "name"
    ],
    "createdAt": "2024-01-01T00:00:00.000Z",
    "updatedAt": "2024-01-01T00:00:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.