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

# Update the authenticated user

> Updates the authenticated user's profile fields (name, username, preferences).



## OpenAPI

````yaml /api-reference/openapi.json put /v1/me/
openapi: 3.0.3
info:
  title: Enkryptify API
  version: 1.0.0
  description: >-
    REST API for Enkryptify. Manage secrets, projects, teams and workspaces.
    Authenticate with an `ek_live_` API token via the `Authorization: Bearer`
    header. See https://docs.enkryptify.com/api-reference/introduction.
servers:
  - url: http://localhost:8080
    description: Production
security: []
tags:
  - name: auth
    description: Token exchange and authentication for API access.
  - name: workspace
    description: Workspaces group your projects, teams and members.
  - name: project
    description: Projects organize secrets per application or service.
  - name: team
    description: Teams scope which members can access which projects.
  - name: secret
    description: Read, create, update and delete secret values.
  - name: secret-share
    description: Create and consume time-bound encrypted secret shares.
  - name: tokens
    description: Manage API tokens for programmatic access.
  - name: sync
    description: Manage integrations that sync secrets to external systems.
  - name: me
    description: Inspect the authenticated user, sessions and preferences.
  - name: oidc
    description: Workspace-scoped OpenID Connect identity federation.
paths:
  /v1/me/:
    put:
      tags:
        - me
      summary: Update the authenticated user
      description: >-
        Updates the authenticated user's profile fields (name, username,
        preferences).
      operationId: updateMe
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  minLength: 2
                  maxLength: 32
                  pattern: ^[a-zA-Z0-9_ -]+$
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
                additionalProperties: false
      security:
        - apiKeyAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT 'http://localhost:8080/v1/me/' \
              -H 'Authorization: Bearer ek_live_xxxxx' \
              -H 'Content-Type: application/json' \
              -d '{ // request body fields, see schema }'
        - lang: javascript
          label: TypeScript
          source: |-
            const response = await fetch('http://localhost:8080/v1/me/', {
              method: 'PUT',
              headers: {
                Authorization: 'Bearer ek_live_xxxxx',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({
                // request body fields, see schema
              }),
            });

            const data = await response.json();
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.put(
                'http://localhost:8080/v1/me/',
                headers={
                    'Authorization': 'Bearer ek_live_xxxxx',
                    'Content-Type': 'application/json',
                },
                json={
                    # request body fields, see schema
                },
            )

            data = response.json()
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key authentication. Pass `Authorization: Bearer ek_live_xxxxx` on
        every request.

````