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

# Set Username Slug



## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json patch /api/v1/user/slug
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/user/slug:
    patch:
      tags:
        - user
      summary: Set Username Slug
      operationId: set_username_slug_api_v1_user_slug_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSlugUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenericResponse_User_'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    UserSlugUpdateRequest:
      properties:
        slug:
          type: string
          maxLength: 30
          minLength: 3
          pattern: ^[a-z0-9-]+$
          title: Slug
          description: Desired unique username/slug (lowercase, 3-30 chars, a-z, 0-9, -)
      type: object
      required:
        - slug
      title: UserSlugUpdateRequest
    GenericResponse_User_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/User'
            - type: 'null'
          description: Response data
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          description: Response status
      type: object
      title: GenericResponse[User]
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    User:
      properties:
        id:
          type: string
          title: Id
        role:
          $ref: '#/components/schemas/UserRoleEnum'
          default: USER
        createdAt:
          type: string
          format: date-time
          title: Createdat
        name:
          type: string
          title: Name
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        email:
          type: string
          title: Email
        image:
          anyOf:
            - type: string
            - type: 'null'
          title: Image
        emailVerified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Emailverified
        hasBetaAccess:
          type: boolean
          title: Hasbetaaccess
          default: false
        isBanned:
          type: boolean
          title: Isbanned
          default: false
        skipPrepay:
          type: boolean
          title: Skipprepay
          default: false
        blacklist:
          items:
            type: string
          type: array
          title: Blacklist
          default: []
      type: object
      required:
        - name
        - email
      title: User
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
    UserRoleEnum:
      type: string
      enum:
        - ADMIN
        - MANAGER
        - USER
      title: UserRoleEnum
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````