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

# POST /api/public/apps/identify

> The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, name, and more.

The following is an example of an identify body.

```json example body theme={null}
{
  "userId": "532",
  "traits": {
    "email": "john@email.com"
  },
  "messageId": "6f5f436d-8534-4070-8023-d18f8b78ed39"
}
```


## OpenAPI

````yaml POST /api/public/apps/identify
openapi: 3.1.0
info:
  title: Tranthor API
  description: Tranthor API Swagger Documentation
  version: 0.0.1
servers: []
security: []
paths:
  /api/public/apps/identify:
    post:
      tags:
        - Public Apps
      description: >-
        The Identify call lets you tie a user to their actions and record traits
        about them. It includes a unique User ID and any optional traits you
        know about the user, like their email, name, and more.
      parameters:
        - schema:
            type: string
          example: >-
            Basic
            YzQ2MDllYjMtYTE2OC00MGI5LWI1ZWMtYTdiYTFkYzY2NWYwOjI5NGYwYjkyOTI1YWZhNzM=
          in: header
          name: authorization
          required: true
          description: >-
            Authorization header for the request, in the format `Bearer
            <token>`. You can collect your token at
            https://app.tranthor.com/dashboard/settings#write-key.
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    messageId:
                      description: >-
                        Unique identifier for the message, used as an
                        idempotency key for safe retries. Can provide a UUID.
                      examples:
                        - 23d04926-78e5-4ebc-853f-f26c84ff629e
                      type: string
                    timestamp:
                      description: >-
                        ISO 8601 formatted timestamp of when the event occurred.
                        If not provided, the current server time will be used.
                      examples:
                        - '2024-04-22T07:00:00.000Z'
                      type: string
                    context:
                      description: >-
                        Provides metadata about the user submitting the event
                        and the context in which the event occurred.
                      examples:
                        - ip: 192.0.2.1
                      type: object
                      additionalProperties: {}
                    traits:
                      description: >-
                        Free-form dictionary of traits of the user, like email
                        or name. Can contain arbitrary JSON values.
                      examples:
                        - name: Michael Scott
                          items:
                            - id: 1
                              name: Paper
                            - id: 2
                              name: Stapler
                      type: object
                      additionalProperties: {}
                    userId:
                      description: >-
                        Unique identifier for the user. Should be the id of the
                        user in your system. Only applicable to logged in users.
                      examples:
                        - '1043'
                        - user-123
                        - 0a58e5e4-c753-477e-a6c4-f9b0e3396b9b
                      type: string
                  required:
                    - messageId
                    - userId
                - type: object
                  properties:
                    messageId:
                      description: >-
                        Unique identifier for the message, used as an
                        idempotency key for safe retries. Can provide a UUID.
                      examples:
                        - 23d04926-78e5-4ebc-853f-f26c84ff629e
                      type: string
                    timestamp:
                      description: >-
                        ISO 8601 formatted timestamp of when the event occurred.
                        If not provided, the current server time will be used.
                      examples:
                        - '2024-04-22T07:00:00.000Z'
                      type: string
                    context:
                      description: >-
                        Provides metadata about the user submitting the event
                        and the context in which the event occurred.
                      examples:
                        - ip: 192.0.2.1
                      type: object
                      additionalProperties: {}
                    traits:
                      description: >-
                        Free-form dictionary of traits of the user, like email
                        or name. Can contain arbitrary JSON values.
                      examples:
                        - name: Michael Scott
                          items:
                            - id: 1
                              name: Paper
                            - id: 2
                              name: Stapler
                      type: object
                      additionalProperties: {}
                    anonymousId:
                      description: >-
                        Identifier for a logged out user. It can be any
                        pseudo-unique identifier, for example a session Id or a
                        UUID.
                      examples:
                        - 0a58e5e4-c753-477e-a6c4-f9b0e3396b9b
                        - session-123
                      type: string
                  required:
                    - messageId
                    - anonymousId
      responses:
        '204':
          description: An empty String
          content:
            application/json:
              schema:
                description: An empty String
                type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - publicWriteKey: []
components:
  securitySchemes:
    publicWriteKey:
      type: apiKey
      description: >-
        Authorization header for the request, in the format `Bearer <token>`.
        You can collect your token at
        https://app.tranthor.com/dashboard/settings#write-key.
      name: PublicWriteKey
      in: header

````