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

# Set username

> Sets the username of a person. Requires the right to manage the person.

> [!WARNING]
>
> This endpoint is in preview: it may change without notice until it becomes part of a stable version.


## OpenAPI

````yaml preview post /api/security/credentials.set-username
openapi: 3.1.0
info:
  title: tipee
  version: preview
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Expenses
    description: Expenses
  - name: Schedule
    description: Schedule
  - name: Security
    description: Security
  - name: Timeclock
    description: Timeclock
paths:
  /api/security/credentials.set-username:
    post:
      tags:
        - Security
      summary: Set username
      description: Sets the username of a person. Requires the right to manage the person.
      operationId: post_app_ui_api_security_credentialscommand_setusername
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCredentialsUsernameCommand'
      responses:
        '204':
          description: Credential username set.
        '409':
          description: Another person already uses this username.
components:
  schemas:
    SetCredentialsUsernameCommand:
      required:
        - resource_id
        - username
      properties:
        resource_id:
          $ref: '#/components/schemas/Snowflake'
          description: Refused on a person who is not an employee.
        username:
          description: Unique within the instance, surrounding spaces ignored.
          type: string
          maxLength: 255
          minLength: 2
      type: object
      additionalProperties: false
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.