> ## Documentation Index
> Fetch the complete documentation index at: https://docs.immutable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update username

> Update username for the authenticated user's Passport wallet



## OpenAPI

````yaml https://imx-openapiv3-mr-sandbox.s3.us-east-2.amazonaws.com/openapi.json post /passport-profile/v1/username
openapi: 3.0.3
info:
  title: Immutable zkEVM API
  version: 1.0.0
  description: Immutable Multi Rollup API
  contact:
    name: Immutable API Support
    email: support@immutable.com
    url: https://support.immutable.com
servers:
  - url: https://api.sandbox.immutable.com
security: []
tags:
  - name: activities
    description: Activities Endpoints
    x-displayName: activities
  - name: chains
    description: Chains Endpoints
    x-displayName: chains
  - name: collections
    description: Collections Endpoints
    x-displayName: collections
  - name: nfts
    description: NFTs Endpoints
    x-displayName: nfts
  - name: nft owners
    description: NFT Owner Endpoints
    x-displayName: nft owners
  - name: metadata
    description: NFT Metadata Endpoints
    x-displayName: metadata
  - name: tokens
    description: ERC20 Token Endpoints
    x-displayName: tokens
  - name: demopage
    description: Temporary HTML endpoint for demo purposes
    x-displayName: demopage
  - name: verification
    x-displayName: verification
  - name: operatorallowlist
    x-displayName: operatorallowlist
  - name: crafting
    x-displayName: crafting
  - name: listings
    description: Listings Endpoints
    x-displayName: listings
  - name: orders
    x-displayName: orders
  - name: passport
    description: Passport operations
    x-displayName: passport
  - name: gamefi
    description: team gamefi
    x-displayName: gamefi
  - name: health
    x-displayName: health
  - name: passport profile
    description: Passport Profile endpoints
    x-displayName: passport profile
  - name: feed-items
    x-displayName: feed-items
  - name: assets
    x-displayName: assets
  - name: guardian
    description: Guardian endpoints
    x-displayName: guardian
  - name: pricing
    description: Pricing Endpoints
    x-displayName: pricing
  - name: metadata-search
    x-displayName: metadata-search
paths:
  /passport-profile/v1/username:
    post:
      tags:
        - passport profile
      summary: Update username
      description: Update username for the authenticated user's Passport wallet
      operationId: update-username
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsernameUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsernameUpdateResponse'
        '400':
          description: BadRequestError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError400'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError401'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError403'
        '500':
          description: InternalServerError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIError500'
      security:
        - BearerAuth:
            - openid
components:
  schemas:
    UsernameUpdateRequest:
      description: Request to update username
      type: object
      required:
        - username
      properties:
        username:
          type: string
          description: The new username
          minLength: 3
          maxLength: 18
          pattern: ^[a-zA-Z0-9]+$
    UsernameUpdateResponse:
      description: Username update response
      type: object
      properties:
        username:
          type: string
      required:
        - username
    APIError400:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - VALIDATION_ERROR
              example: VALIDATION_ERROR
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    APIError401:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - UNAUTHORISED_REQUEST
              example: UNAUTHORISED_REQUEST
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    APIError403:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - AUTHENTICATION_ERROR
              example: AUTHENTICATION_ERROR
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    APIError500:
      allOf:
        - $ref: '#/components/schemas/BasicAPIError'
        - type: object
          properties:
            code:
              type: string
              description: Error Code
              enum:
                - INTERNAL_SERVER_ERROR
              example: INTERNAL_SERVER_ERROR
            details:
              type: object
              nullable: true
              description: Additional details to help resolve the error
          required:
            - code
            - details
    BasicAPIError:
      type: object
      properties:
        message:
          type: string
          description: Error Message
          example: all fields must be provided
        link:
          type: string
          description: Link to IMX documentation that can help resolve this error
          example: https://docs.x.immutable.com/reference/#/
        trace_id:
          type: string
          description: Trace ID of the initial request
          example: e47634b79a5cd6894ddc9639ec4aad26
      required:
        - message
        - link
        - trace_id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````