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

# Attach an end user identity to a session



## OpenAPI

````yaml https://api.interfere.com/openapi.json post /v3/session/identify
openapi: 3.0.0
info:
  title: Interfere API
  termsOfService: https://interfere.com/legal/terms-of-service
  contact:
    email: support@interfere.com
    name: Interfere Support
    url: https://interfere.com/~/*/settings/support
  license:
    name: All Rights Reserved
  description: >-
    Interfere empowers engineers, product managers and designers with real-time
    understanding of previously unseen bugs and issues.
  version: 3.0.0
servers:
  - url: https://api.interfere.com
    description: This environment
security: []
tags:
  - name: Drain
    description: Drain API
  - name: Releases
    description: Build-time release API
  - name: Replay
    description: Session replay chunk ingest API
  - name: Sessions
    description: Session and end-user identity API
  - name: Updates
    description: Desktop app update API
  - name: Traces
    description: Trace waterfall read API
externalDocs:
  url: https://interfere.com/docs
  description: Interfere Documentation
paths:
  /v3/session/identify:
    post:
      tags:
        - Sessions
      summary: Attach an end user identity to a session
      operationId: identifySession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdentifySessionRequest'
      responses:
        '200':
          description: Identity attached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Missing or invalid public key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthProblem'
        '503':
          description: >-
            A dependency failed while accepting the request; retry with backoff
            after the Retry-After delay
          headers:
            Retry-After:
              schema:
                type: string
                description: Seconds to wait before retrying
              required: true
              description: Seconds to wait before retrying
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionUnavailableProblem'
      security:
        - publicKeyHeader: []
        - publicKey: []
components:
  schemas:
    IdentifySessionRequest:
      type: object
      properties:
        sessionId:
          type: string
          minLength: 1
        deviceId:
          type: string
          nullable: true
          format: uuid
        fpHash:
          type: string
          nullable: true
        visitorId:
          type: string
          nullable: true
          format: uuid
        avatar:
          type: string
        email:
          type: string
          format: email
        identifier:
          type: string
        name:
          type: string
        source:
          $ref: '#/components/schemas/IdentifySource'
        traits:
          $ref: '#/components/schemas/IdentifyTraits'
        country:
          type: string
          maxLength: 2
      required:
        - sessionId
        - identifier
        - source
      description: Request body for identifying the end user associated with a session.
    SessionResponse:
      type: object
      properties:
        ok:
          type: boolean
      required:
        - ok
      description: SessionResponse
    AuthProblem:
      type: object
      properties:
        code:
          type: string
          enum:
            - AUTH_MISSING
            - AUTH_PK_INVALID
        message:
          type: string
        service:
          type: string
          enum:
            - collector
            - gateway
            - operation
            - intelligence
      required:
        - code
    SessionUnavailableProblem:
      type: object
      properties:
        code:
          type: string
          enum:
            - INGEST_INFRA_UNAVAILABLE
        message:
          type: string
        service:
          type: string
          enum:
            - collector
            - gateway
            - operation
            - intelligence
      required:
        - code
    IdentifySource:
      oneOf:
        - $ref: '#/components/schemas/ClerkIdentifySource'
        - $ref: '#/components/schemas/Auth0IdentifySource'
        - $ref: '#/components/schemas/WorkOSIdentifySource'
        - $ref: '#/components/schemas/CustomIdentifySource'
      discriminator:
        propertyName: type
        mapping:
          clerk:
            $ref: '#/components/schemas/ClerkIdentifySource'
          auth0:
            $ref: '#/components/schemas/Auth0IdentifySource'
          workos:
            $ref: '#/components/schemas/WorkOSIdentifySource'
          custom:
            $ref: '#/components/schemas/CustomIdentifySource'
      description: Auth provider that surfaced this identification.
    IdentifyTraits:
      type: object
      additionalProperties:
        nullable: true
      description: >-
        Free-form key/value bag of user attributes attached when identifying a
        session.
    ClerkIdentifySource:
      type: object
      properties:
        type:
          type: string
          enum:
            - clerk
        name:
          type: string
          enum:
            - Clerk
      required:
        - type
        - name
      description: ClerkIdentifySource
    Auth0IdentifySource:
      type: object
      properties:
        type:
          type: string
          enum:
            - auth0
        name:
          type: string
          enum:
            - Auth0
      required:
        - type
        - name
      description: Auth0IdentifySource
    WorkOSIdentifySource:
      type: object
      properties:
        type:
          type: string
          enum:
            - workos
        name:
          type: string
          enum:
            - WorkOS
      required:
        - type
        - name
      description: WorkOSIdentifySource
    CustomIdentifySource:
      type: object
      properties:
        type:
          type: string
          enum:
            - custom
        name:
          type: string
      required:
        - type
        - name
      description: CustomIdentifySource
  securitySchemes:
    publicKeyHeader:
      type: apiKey
      in: header
      name: x-interfere-public-key
      description: >-
        Public key of the receiving surface; preferred for OTel Collector
        exporters, whose endpoint config cannot carry query strings
    publicKey:
      type: apiKey
      in: query
      name: public_key
      description: Public key of the receiving surface

````