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

# Alias a user

> Alias user

<Note>
  Use this endpoint to associate another id with a particular user.  The new id becomes the
  primary id.  All previous ids are kept in the user's "aliases" field.
</Note>


## OpenAPI

````yaml POST /bc/v1/user/alias
openapi: 3.0.0
info:
  title: Mindlytics API
  version: 1.0.0
servers:
  - url: https://app.mindlytics.ai
security:
  - APIKey: []
    APPId: []
paths:
  /bc/v1/user/alias:
    post:
      tags:
        - User
      summary: Alias user
      description: Alias user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: The new ID of the user
                previous_id:
                  type: string
                  description: The previous ID of the user
              required:
                - id
                - previous_id
              description: User alias - requires previous_id and id
      responses:
        '200':
          description: User aliased
          content:
            application/json:
              schema:
                type: object
                properties:
                  organization_id:
                    type: string
                  app_id:
                    type: string
                  user_id:
                    type: string
                  id:
                    type: string
                  aliases:
                    type: array
                    items:
                      type: string
                  created_at:
                    type: string
                  traits:
                    type: object
                    additionalProperties:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                required:
                  - organization_id
                  - app_id
                  - user_id
                  - id
                  - aliases
                  - created_at
                  - traits
components:
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: Authorization
      description: API Key for your organization
    APPId:
      type: apiKey
      in: header
      name: X-App-ID
      description: Project ID

````