> ## 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.

# Identify a user

> Identify user.  The user id, or the user's device id, or both must be provided

<Note>
  You can associate traits with a user id or a device id.  If the user or device id already exists, the given
  traits are merged with the existing traits.
</Note>


## OpenAPI

````yaml POST /bc/v1/user/identify
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/identify:
    post:
      tags:
        - User
      summary: Identify user
      description: >-
        Identify user.  The user id, or the user's device id, or both must be
        provided
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: The unique ID of the user
                device_id:
                  type: string
                  description: The ID of the device, if applicable
                traits:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: >-
                    Any additional traits to be associated with the user (name,
                    gender, etc)
              description: User identification - requires either id or device_id (or both)
      responses:
        '200':
          description: User identified
          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

````