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

# Get current browser session

> Cookie-only browser operation. Mutations require an exact app Origin and reject cross-site requests. Authorization headers are rejected. Responses are never cached.



## OpenAPI

````yaml /openapi.yaml get /api/v1/session
openapi: 3.1.0
info:
  title: Factorize API
  version: 1.0.0
  description: >-
    Versioned Factorize REST API. See the hosted docs for examples and OAuth
    discovery.
  x-dashboard-auth: >-
    Access-token and authorized-client management and trace replay operations
    require an interactive owner session; all other operations accept a suitably
    scoped bearer token or owner session.
servers:
  - url: https://app.factorize.sh
security:
  - bearerAuth: []
paths:
  /api/v1/session:
    get:
      tags:
        - session
      summary: Get current browser session
      description: >-
        Cookie-only browser operation. Mutations require an exact app Origin and
        reject cross-site requests. Authorization headers are rejected.
        Responses are never cached.
      operationId: get_api_v1_session
      responses:
        '200':
          description: >-
            Unauthenticated sessions return authenticated:false; expired,
            unverified, removed or revoked owners are unauthenticated.
          headers:
            X-Factorize-Webhook-Conditions:
              description: Conditions-only webhook runtime deployment marker.
              schema:
                type: string
                const: v1
            X-Factorize-Contract:
              description: >-
                Deployment compatibility marker for the complete GEN-2157
                static-client API contract. Deploy this API stage before static
                frontend cutover.
              schema:
                type: string
                const: gen-2157-static-v1
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      authenticated:
                        type: boolean
                        const: false
                    required:
                      - authenticated
                    additionalProperties: false
                  - type: object
                    properties:
                      authenticated:
                        type: boolean
                        const: true
                      user:
                        type: object
                        properties:
                          id:
                            type: string
                          email:
                            type: string
                            format: email
                            pattern: >-
                              ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                        required:
                          - id
                          - email
                        additionalProperties: false
                      workspace:
                        type: object
                        properties:
                          id:
                            type: string
                          name:
                            type:
                              - string
                              - 'null'
                          role:
                            type: string
                            const: owner
                        required:
                          - id
                          - name
                          - role
                        additionalProperties: false
                      capabilities:
                        type: array
                        items:
                          type: string
                          enum:
                            - flows:read
                            - flows:write
                            - runs:read
                            - runs:write
                      expiresAt:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    required:
                      - authenticated
                      - user
                      - workspace
                      - capabilities
                      - expiresAt
                    additionalProperties: false
        '400':
          $ref: '#/components/responses/Error400'
        '401':
          $ref: '#/components/responses/Error401'
        '403':
          $ref: '#/components/responses/Error403'
        '404':
          $ref: '#/components/responses/Error404'
        '409':
          $ref: '#/components/responses/Error409'
        '429':
          $ref: '#/components/responses/Error429'
        '500':
          $ref: '#/components/responses/Error500'
        '503':
          $ref: '#/components/responses/Error503'
      security: []
components:
  responses:
    Error400:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error401:
      description: Invalid or revoked credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error403:
      description: Missing scope or required owner session
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error409:
      description: Operation conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error429:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error500:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Error503:
      description: Service unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: OAuth2

````

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