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

# Get User Sessions



## OpenAPI

````yaml user-openapi.json GET /v1/user/{user_id}/sessions
openapi: 3.0.0
info:
  title: Verisoul API v1 (beta)
  description: >-
    The new Verisoul API, served at api.verisoul.com under /v1. Endpoints not
    yet moved to the new shape return their legacy success body. Every /v1 error
    uses the new error body.
  license:
    name: MIT
  version: 1.0.0-beta
servers:
  - url: https://api.sandbox.verisoul.com
    description: Sandbox
  - url: https://api.verisoul.com
    description: Production
security:
  - apiKeyAuth: []
paths:
  /v1/user/{user_id}/sessions:
    get:
      description: Returns the user's sessions, most recent first, up to 100
      parameters:
        - schema:
            type: string
            description: ID of the user to retrieve sessions for
          required: true
          name: user_id
          in: path
      responses:
        '200':
          description: User sessions response
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The project's request limit for the rolling 60-second window
              required: false
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                description: >-
                  Requests left in the rolling 60-second window. Shorter burst
                  windows can still return a 429 while this is above 0
              required: false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSessionsResponse'
              example:
                metadata:
                  timestamp: '2026-11-11T15:42:08.311Z'
                  request_id: 6486af8d-0588-4a29-a89e-04e5669220d9
                  project_id: be121fa6-0da6-4d65-bb75-6fd56c7dfa53
                sessions:
                  - id: 059fbf67-96b0-4ba8-adb2-40b8b339d7e0
                    tags:
                      - login
                  - id: 8a41c2d9-5f37-4b6e-a0d8-1c9e7b3f2a64
                    tags:
                      - login
                  - id: f3e9a7c1-0b6d-4d28-9a54-7e2c8b1d6f05
                    tags:
                      - signup
        '400':
          description: Invalid request. See error.code and error.details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                metadata:
                  timestamp: '2026-11-04T12:00:00.000Z'
                  request_id: 3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f6b7c90
                  project_id: 00000000-0000-4000-8000-000000000001
                error:
                  code: invalid_request
                  message: Request validation failed
                  details:
                    - field: user.id
                      message: user.id should not be empty
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                metadata:
                  timestamp: '2026-11-04T12:00:00.000Z'
                  request_id: 3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f6b7c90
                  project_id: null
                error:
                  code: api_key_not_found
                  message: API Key not found
                  details: []
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                metadata:
                  timestamp: '2026-11-04T12:00:00.000Z'
                  request_id: 3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f6b7c90
                  project_id: 00000000-0000-4000-8000-000000000001
                error:
                  code: user_not_found
                  message: User not found
                  details: []
        '429':
          description: >-
            Rate limit exceeded. Retry after the seconds in the Retry-After
            header
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                description: The project's request limit for the rolling 60-second window
              required: true
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
                description: Always 0 on a rate-limited response
              required: true
            Retry-After:
              schema:
                type: integer
                minimum: 1
                description: Seconds to wait before retrying
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                metadata:
                  timestamp: '2026-11-04T12:00:00.000Z'
                  request_id: 3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f6b7c90
                  project_id: 00000000-0000-4000-8000-000000000001
                error:
                  code: rate_limit_exceeded
                  message: >-
                    Current rate limit is 900 requests per minute. Please try
                    again later.
                  details: []
components:
  schemas:
    UserSessionsResponse:
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/Metadata'
        sessions:
          type: array
          items:
            $ref: '#/components/schemas/UserSession'
          description: The user's sessions, most recent first. At most 100 are returned
    ErrorResponse:
      type: object
      properties:
        metadata:
          type: object
          properties:
            timestamp:
              type: string
              format: date-time
              description: When the response was generated
            request_id:
              type: string
              description: ID of the failed request. Quote it to support
            project_id:
              type: string
              nullable: true
              description: >-
                Project of the API key; null when the key is missing or unknown,
                or the route does not exist
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable, machine-readable error code
            message:
              type: string
              description: Human-readable explanation. The text can change; branch on code
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: >-
                      Request field the problem is about, e.g. user.id; null
                      when it is not tied to one field
                  message:
                    type: string
                    description: What is wrong with the field
              description: Per-field problems for validation errors; empty otherwise
    Metadata:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
          description: When the response was generated
        request_id:
          type: string
          description: The ID of the request
        project_id:
          type: string
          description: The ID of the project
    UserSession:
      type: object
      properties:
        id:
          type: string
          description: The session ID
        tags:
          type: array
          items:
            type: string
          description: Session tags. See [Session Tags](/integration/advanced/session-tags)
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.