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

# Get Me

> Return the authenticated principal for the request.

Send either `X-Access-Key` (workspace runtime key) or `X-API-Key` (user API key).
Access-key responses include workspace permissions. API-key responses include the
owning user and key metadata.



## OpenAPI

````yaml /openapi.yaml get /me
openapi: 3.1.0
info:
  title: Actx0 API
  version: 1.0.0
  description: >-
    REST API for Actx0 workspaces, access keys, agents, sessions, messages,
    memories, prompts, and knowledge documents.


    Authenticate with `X-Access-Key` (workspace), `X-API-Key` (user), or a
    dashboard session.
servers:
  - url: https://app.actx0.com/api/v1
    description: Actx0 cloud
security: []
tags:
  - name: Me
    description: Inspect the authenticated access key or API key
  - name: API Keys
    description: User API keys for X-API-Key auth
  - name: Workspaces
    description: Team workspaces
  - name: Access Keys
    description: Scoped workspace keys for agents and SDKs
  - name: Agents
    description: Agents inside a workspace
  - name: Sessions
    description: Agent conversation sessions
  - name: Messages
    description: Session messages and semantic search
  - name: Memories
    description: Session memories, search, batch, and regenerate
  - name: Prompts
    description: Versioned prompts
  - name: Knowledge
    description: Document upload and semantic search
paths:
  /me:
    get:
      tags:
        - Me
      summary: Get Me
      description: >-
        Return the authenticated principal for the request.


        Send either `X-Access-Key` (workspace runtime key) or `X-API-Key` (user
        API key).

        Access-key responses include workspace permissions. API-key responses
        include the

        owning user and key metadata.
      operationId: getMe
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeResponse'
              examples:
                accessKey:
                  summary: Access key principal
                  value:
                    principalType: ACCESS_KEY
                    accessKey:
                      id: 99999999-9999-9999-9999-999999999999
                      workspaceId: 11111111-1111-1111-1111-111111111111
                      name: Agent runtime
                      permissions:
                        - CAN_CREATE_SESSION_MEMORY
                        - CAN_LIST_SESSION_MEMORIES
                      createdAt: '2026-07-01T12:00:00Z'
                      updatedAt: '2026-07-01T12:00:00Z'
                apiKey:
                  summary: API key principal
                  value:
                    principalType: API_KEY
                    owner:
                      id: 88888888-8888-8888-8888-888888888888
                      email: owner@example.com
                      name: Ada Lovelace
                      role: user
                    apiKey:
                      id: 77777777-7777-7777-7777-777777777777
                      name: CI key
                      createdAt: '2026-07-01T12:00:00Z'
                      updatedAt: '2026-07-01T12:00:00Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AccessKeyAuth: []
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl / acli
          source: |
            curl -X GET 'https://app.actx0.com/api/v1/me' \
              -H "X-Access-Key: YOUR_ACCESS_KEY" \
              -H "Accept: application/json"

            # ---

            # acli
            export ACTX0_ACCESS_KEY="YOUR_ACCESS_KEY"
            export ACTX0_WORKSPACE_ID="YOUR_WORKSPACE_ID"

            acli me
        - lang: python
          label: pctx0
          source: |
            from pctx0 import Pctx0Client

            client = Pctx0Client(
                access_key="YOUR_ACCESS_KEY",
                workspace_id="YOUR_WORKSPACE_ID",
            )

            me = client.me.get()
        - lang: javascript
          label: nctx0
          source: |
            import { Nctx0Client } from "@actx0/nctx0";

            const client = new Nctx0Client({
              accessKey: "YOUR_ACCESS_KEY",
              workspaceId: "YOUR_WORKSPACE_ID",
            });

            const me = await client.me.get();
        - lang: go
          label: gtcx0
          source: "package main\n\nimport (\n\t\"context\"\n\n\t\"github.com/Actx0/Gctx0\"\n)\n\nfunc main() {\n\tclient := gctx0.NewClient(\n\t\tgctx0.WithAccessKey(\"YOUR_ACCESS_KEY\"),\n\t\tgctx0.WithWorkspaceId(\"YOUR_WORKSPACE_ID\"),\n\t)\n\tdefer client.Close()\n\tctx := context.Background()\n\tme, err := client.Me.Get(ctx)\n\t_ = me\n\t_ = err\n}\n"
components:
  schemas:
    MeResponse:
      oneOf:
        - $ref: '#/components/schemas/MeAccessKeyPrincipal'
        - $ref: '#/components/schemas/MeAPIKeyPrincipal'
      discriminator:
        propertyName: principalType
        mapping:
          ACCESS_KEY:
            $ref: '#/components/schemas/MeAccessKeyPrincipal'
          API_KEY:
            $ref: '#/components/schemas/MeAPIKeyPrincipal'
    Error:
      type: object
      required:
        - errorMessage
      properties:
        errorMessage:
          type: string
          example: Name is required
    MeAccessKeyPrincipal:
      type: object
      required:
        - principalType
        - accessKey
      properties:
        principalType:
          type: string
          enum:
            - ACCESS_KEY
          example: ACCESS_KEY
        accessKey:
          $ref: '#/components/schemas/AccessKey'
    MeAPIKeyPrincipal:
      type: object
      required:
        - principalType
        - owner
        - apiKey
      properties:
        principalType:
          type: string
          enum:
            - API_KEY
          example: API_KEY
        owner:
          $ref: '#/components/schemas/MeAPIKeyOwner'
        apiKey:
          $ref: '#/components/schemas/MeAPIKeyInfo'
    AccessKey:
      type: object
      required:
        - id
        - workspaceId
        - name
        - permissions
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          example: 99999999-9999-9999-9999-999999999999
        workspaceId:
          type: string
          format: uuid
          example: 11111111-1111-1111-1111-111111111111
        name:
          type: string
          example: Agent runtime
        permissions:
          type: array
          items:
            type: string
          example:
            - CAN_CREATE_SESSION_MEMORY
            - CAN_LIST_SESSION_MEMORIES
        expiresAt:
          type: string
          format: date-time
          example: '2027-01-01T00:00:00Z'
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
        key:
          type: string
          description: Raw secret. Returned only on create. Send as X-Access-Key.
          example: b2c3d4e5-f6a7-8901-bcde-f12345678901
    MeAPIKeyOwner:
      type: object
      required:
        - id
        - email
        - name
        - role
      properties:
        id:
          type: string
          format: uuid
          example: 88888888-8888-8888-8888-888888888888
        email:
          type: string
          format: email
          example: owner@example.com
        name:
          type: string
          example: Ada Lovelace
        role:
          type: string
          example: user
    MeAPIKeyInfo:
      type: object
      required:
        - id
        - name
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          format: uuid
          example: 77777777-7777-7777-7777-777777777777
        name:
          type: string
          example: CI key
        expiresAt:
          type: string
          format: date-time
          nullable: true
          example: '2027-01-01T00:00:00Z'
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T12:00:00Z'
  securitySchemes:
    AccessKeyAuth:
      type: apiKey
      in: header
      name: X-Access-Key
      description: Workspace access key for agent/runtime integrations.
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: User API key for management and automation.

````