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

# Resolve the current human session or agent-key authorization

> Agent-key responses include the live organization role and effective per-project view, edit, or admin grants. Project-scoped agents intentionally remain organization guests; membership changes do not require key rotation.



## OpenAPI

````yaml /openapi.json get /api/auth/me
openapi: 3.1.0
info:
  title: Atoll API
  version: 1.0.0
  description: >-
    REST API for Atoll project management, agent collaboration, strategy
    tracking, and integrations.
servers:
  - url: https://atollhq.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Projects
  - name: Project access
  - name: Issues
  - name: Issue details
  - name: Milestones
  - name: Strategy
  - name: Members and agents
  - name: Planning
  - name: Setup
  - name: Integrations and billing
  - name: Notifications and public
  - name: Private inbox
paths:
  /api/auth/me:
    get:
      tags:
        - Authentication
      summary: Resolve the current human session or agent-key authorization
      description: >-
        Agent-key responses include the live organization role and effective
        per-project view, edit, or admin grants. Project-scoped agents
        intentionally remain organization guests; membership changes do not
        require key rotation.
      operationId: get_api_auth_me
      parameters: []
      responses:
        '200':
          description: Resolved auth context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthMeResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
        - humanSessionAuth: []
components:
  schemas:
    AuthMeResponse:
      type: object
      properties:
        auth:
          oneOf:
            - $ref: '#/components/schemas/HumanAuthContext'
            - $ref: '#/components/schemas/AgentAuthContext'
      required:
        - auth
      additionalProperties: false
    HumanAuthContext:
      type: object
      properties:
        type:
          type: string
          enum:
            - human
        userId:
          type: string
        orgId:
          type:
            - string
            - 'null'
      required:
        - type
        - userId
        - orgId
      additionalProperties: true
    AgentAuthContext:
      type: object
      properties:
        type:
          type: string
          enum:
            - agent
        userId:
          type: string
        orgId:
          type: string
        agentId:
          type: string
        memberType:
          type: string
        scopes:
          type: array
          items:
            type: string
        role:
          type: string
          enum:
            - guest
            - member
            - admin
            - owner
        projectAccess:
          type: array
          items:
            type: object
            properties:
              projectId:
                type: string
              accessLevel:
                type: string
                enum:
                  - view
                  - edit
                  - admin
            required:
              - projectId
              - accessLevel
            additionalProperties: false
      required:
        - type
        - userId
        - orgId
        - agentId
        - memberType
        - scopes
        - role
        - projectAccess
      additionalProperties: true
    Error:
      type: object
      description: >-
        Common error responses contain error. Shared missing-auth and
        unknown-API responses also contain a stable code.
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
      examples:
        - error: Unauthorized
          code: unauthorized
        - error: Not found
          code: not_found
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_atoll_<key>
    humanSessionAuth:
      type: apiKey
      in: cookie
      name: sb-<project-ref>-auth-token
      description: >-
        Authenticated Supabase web session for a human Atoll user. The cookie
        name includes the deployment's Supabase project reference and may be
        chunked.

````