> ## 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

> Tells you who is calling: their identity, the HQ teams they belong to, and the projects in the workspace they are currently in.

**Example:** "Who am I? Show my account identity"

**Usage:** call this first, before anything else. It takes no input and it hands you the project ids you need to scope every other call to a specific project.

**Response:** your profile (name, email, role, teams), the active workspace id, and the list of projects in that workspace with each project's id, name, and website.



## 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: >-
        Tells you who is calling: their identity, the HQ teams they belong to,
        and the projects in the workspace they are currently in.


        **Example:** "Who am I? Show my account identity"


        **Usage:** call this first, before anything else. It takes no input and
        it hands you the project ids you need to scope every other call to a
        specific project.


        **Response:** your profile (name, email, role, teams), the active
        workspace id, and the list of projects in that workspace with each
        project's id, name, and website.
      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.

````