---
title: "Update User"
url: "https://nov18-dev.movespot.fyi/apis/konnect-identity-3/versions/7179cf49-bbc4-42fb-b00f-57a9115554be/operations/update-user"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-identity-3/versions/7179cf49-bbc4-42fb-b00f-57a9115554be.md

# Update User

`PATCH` `/users/{userId}`

Operation ID: `update-user`

Update an individual user.

## Path parameters

- `userId` (string, uuid, required) - The ID of the user being deleted.

## Request body

Content types: `application/json`

## Responses

- `200` - A get action response of a single user.
- `401` - Unauthenticated
- `403` - Permission denied
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Identity
  version: 3.0.2
servers:
  - url: https://global.api.konghq.com/v3
    description: Global Base URL
paths:
  /users/{userId}:
    parameters:
      - name: userId
        in: path
        description: The ID of the user being deleted.
        required: true
        schema:
          type: string
          format: uuid
          example: d32d905a-ed33-46a3-a093-d8f536af9a8a
    patch:
      operationId: update-user
      summary: Update User
      description: Update an individual user.
      requestBody:
        $ref: "#/components/requestBodies/UpdateUser"
      responses:
        "200":
          $ref: "#/components/responses/UserSingle"
        "401":
          $ref: "#/components/responses/IdentityUnauthenticated"
        "403":
          $ref: "#/components/responses/IdentityPermissionDenied"
        "404":
          $ref: "#/components/responses/IdentityNotFound"
      tags:
        - Users
security:
  - personalAccessToken: []
  - systemAccountAccessToken: []
  - konnectAccessToken: []
  - serviceAccessToken: []
components:
  requestBodies:
    UpdateUser:
      description: The request schema for the update user request.
      content:
        application/json:
          schema:
            type: object
            properties:
              full_name:
                description: The user's full name.
                type: string
                example: James C. Woods
                maxLength: 250
                pattern: ^[\w \W]+$
                writeOnly: true
              preferred_name:
                description: The user's desired name.
                type: string
                example: Jimmy
                maxLength: 250
                writeOnly: true
          examples:
            Example Request Body:
              $ref: "#/components/examples/Update-User-Request"
  responses:
    UserSingle:
      description: A get action response of a single user.
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/User"
          examples:
            Example:
              $ref: "#/components/examples/Get-User-Response"
    IdentityUnauthenticated:
      description: Unauthenticated
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            Unauthorized:
              $ref: "#/components/examples/401-unauthenticated"
    IdentityPermissionDenied:
      description: Permission denied
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            Permission Denied:
              $ref: "#/components/examples/403-permission-denied"
            Invalid Permissions:
              $ref: "#/components/examples/403-invalid-permissions"
            Username or Password invalid:
              $ref: "#/components/examples/403-auth-invalid"
    IdentityNotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            Not Found:
              $ref: "#/components/examples/404-not-found"
  examples:
    Update-User-Request:
      value:
        full_name: James C Woods
        preferred_name: Jimmy
    Get-User-Response:
      value:
        id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        email: james.woods@email.com
        full_name: James Woods
        preferred_name: Jimmy
        active: true
        created_at: 1992-02-07T17:46:57.52Z
        updated_at: 2022-02-07T17:00:00.52Z
    401-unauthenticated:
      value:
        status: 401
        title: Unauthenticated
        instance: konnect:trace:952172606039454040
        detail: A valid token is required
    403-permission-denied:
      value:
        status: 403
        title: Permission denied
        instance: konnect:trace:2822394689570210664
        detail: Only enterprise organizations can create teams
    403-invalid-permissions:
      value:
        status: 403
        title: Invalid Permissions
        detail: You must have the [administrator] role to perform this action
        instance: konnect:trace:6c1ef33ae5bce33634d7d7d695c7f203
    403-auth-invalid:
      value:
        type: https://kongapi.info/konnect/invalid-permissions
        status: 403
        title: Invalid Permissions
        detail: You must have the [administrator] role to perform this action
        instance: konnect:trace:6c1ef33ae5bce33634d7d7d695c7f203
    404-not-found:
      value:
        status: 404
        title: Not Found
        instance: konnect:trace:2287285207635123011
        detail: The requested team was not found
  schemas:
    User:
      description: The user object contains information about an individual user who
        can use the Konnect application and API.
      type: object
      properties:
        id:
          description: The User ID.
          type: string
          format: uuid
          example: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
          readOnly: true
        email:
          description: The email registered to the user.
          type: string
          format: email
          example: user@email.com
          maxLength: 250
        full_name:
          description: The User's full name.
          type: string
          example: Jane Doe
          maxLength: 250
          pattern: ^[\w \W]+$
        preferred_name:
          description: The User's preferred name.
          type: string
          example: Jane
          maxLength: 250
        active:
          description: Returns True if a user has verified their email address.
          type: boolean
          default: true
          readOnly: true
        inferred_region:
          description: The Konnect region closest to the user's IP address. This property
            might only be set for users on signup through Konnect’s build-in
            native authentication.
          type: string
          example: us
          readOnly: true
        created_at:
          description: The time stamp for the date the account was registered.
          type: string
          format: date-time
          example: 2022-02-07T17:46:57.52Z
          readOnly: true
        updated_at:
          description: A Unix timestamp representation of the most recent change to the
            User account.
          type: string
          format: date-time
          example: 2022-10-08T17:00:00.52Z
          readOnly: true
      example:
        id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        email: user@email.com
        full_name: Test User
        preferred_name: test
        active: true
        inferred_region: us
        created_at: 2022-02-07T17:46:57.52Z
        updated_at: 2022-10-08T17:00:00.52Z
      title: User
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
    serviceAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        The Service access token is meant to be used between internal services.
```
