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

# Get caller identity and projects

> Return the caller's identity, HQ teams, and the projects in the active workspace.

Call this first to bootstrap: you're scoped to one workspace automatically,
so its projects come back here — pass a project's id as the `project_id`
argument on project-scoped tools. `identity.role` is account-wide, not
per-project (see list_project_resources resource=users for your own
project-scoped record).



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json get /api/v1/business/whoami
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/whoami:
    get:
      tags:
        - business
      summary: Get caller identity and projects
      description: >-
        Return the caller's identity, HQ teams, and the projects in the active
        workspace.


        Call this first to bootstrap: you're scoped to one workspace
        automatically,

        so its projects come back here — pass a project's id as the `project_id`

        argument on project-scoped tools. `identity.role` is account-wide, not

        per-project (see list_project_resources resource=users for your own

        project-scoped record).
      operationId: whoami_api_v1_business_whoami_get
      parameters:
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhoamiResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WhoamiResponse:
      properties:
        identity:
          $ref: '#/components/schemas/MeResponse'
        active_workspace_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Active Workspace Id
          description: The user's active workspace, scoping the projects below.
        projects:
          items:
            $ref: '#/components/schemas/ProjectSummary'
          type: array
          title: Projects
          description: >-
            Projects in the active workspace; empty when no workspace is
            resolved.
      type: object
      required:
        - identity
      title: WhoamiResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MeResponse:
      properties:
        id:
          type: string
          title: Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
        full_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Full Name
        photo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Photo Url
        role:
          anyOf:
            - $ref: '#/components/schemas/UserRole'
            - type: 'null'
        teams:
          items:
            $ref: '#/components/schemas/TeamSummary'
          type: array
          title: Teams
      type: object
      required:
        - id
        - email
        - full_name
        - photo_url
        - role
        - teams
      title: MeResponse
    ProjectSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        owner_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Owner Id
        root_website:
          anyOf:
            - type: string
            - type: 'null'
          title: Root Website
        project_type:
          $ref: '#/components/schemas/ProjectType'
        project_scope:
          $ref: '#/components/schemas/ProjectScope'
        is_default:
          type: boolean
          title: Is Default
        created_date:
          type: string
          format: date-time
          title: Created Date
        updated_date:
          type: string
          format: date-time
          title: Updated Date
      type: object
      required:
        - id
        - name
        - owner_id
        - root_website
        - project_type
        - project_scope
        - is_default
        - created_date
        - updated_date
      title: ProjectSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UserRole:
      type: string
      enum:
        - super_admin
        - admin
        - member
      title: UserRole
      description: Preserve lowercase enum names to match the Writesonic DB enum values.
    TeamSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        role:
          type: string
          enum:
            - owner
            - member
          title: Role
      type: object
      required:
        - id
        - name
        - role
      title: TeamSummary
    ProjectType:
      type: string
      enum:
        - STANDARD
        - PITCH
      title: ProjectType
      description: >-
        Names mirror the writesonic-backend postgres enum labels — do not
        rename.
    ProjectScope:
      type: string
      enum:
        - domain
        - subdomain
        - exact
        - path
      title: ProjectScope
      description: >-
        Names mirror the writesonic-backend postgres enum labels — do not
        rename.

````