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

# List project resources

> List a project's reference resources by `resource`: users (pass the id whoami returned for you as `resource_id` to get your own project-scoped record, e.g. your role in this project), labels, settings, skills, agents, or agent_settings. Pass `resource_id` to fetch one item's detail (users, skills, agents only).



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/project-resources/query
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/project-resources/query:
    post:
      tags:
        - business
      summary: List project resources
      description: >-
        List a project's reference resources by `resource`: users (pass the id
        whoami returned for you as `resource_id` to get your own project-scoped
        record, e.g. your role in this project), labels, settings, skills,
        agents, or agent_settings. Pass `resource_id` to fetch one item's detail
        (users, skills, agents only).
      operationId: list_project_resources_api_v1_business_project_resources_query_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectResourceArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ProjectUser'
                  - $ref: '#/components/schemas/Listing_ProjectUser_'
                  - $ref: '#/components/schemas/Listing_LabelResponse_'
                  - $ref: '#/components/schemas/OffsetPage_SettingRead_'
                  - $ref: '#/components/schemas/AgentSkillDetailResponse'
                  - $ref: '#/components/schemas/Listing_AgentSkillResponse_'
                  - $ref: '#/components/schemas/AgentResponse'
                  - $ref: '#/components/schemas/CursorPage_AgentListResponseItem_'
                  - $ref: '#/components/schemas/CursorPage_AgentSettingsItem_'
                title: >-
                  Response List Project Resources Api V1 Business Project
                  Resources Query Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ProjectResourceArgs:
      properties:
        resource:
          $ref: '#/components/schemas/ProjectResource'
          description: Which project resource catalog to read.
        resource_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resource Id
          description: >-
            If set, fetch this one resource's detail instead of listing.
            Supported for users, skills, agents.
        settings_resource_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Settings Resource Id
          description: >-
            For resource='settings': filter settings scoped to this resource's
            id.
        resource_type:
          anyOf:
            - $ref: '#/components/schemas/ResourceType'
            - type: 'null'
          description: >-
            For resource='settings': filter settings by the type of resource
            they scope.
        setting_name:
          anyOf:
            - $ref: '#/components/schemas/SettingName'
            - type: 'null'
          description: 'For resource=''settings'': filter to a single setting name.'
        page:
          type: integer
          minimum: 1
          title: Page
          description: 'For resource=''settings'': 1-based page number (offset pagination).'
          default: 1
        size:
          type: integer
          maximum: 100
          minimum: 1
          title: Size
          description: 'For resource=''settings'': page size (offset pagination).'
          default: 50
        role:
          anyOf:
            - $ref: '#/components/schemas/AgentRole'
            - type: 'null'
          description: 'For resource=''agents'': filter agents by role.'
        setting_names:
          anyOf:
            - items:
                $ref: '#/components/schemas/SettingName'
              type: array
            - type: 'null'
          title: Setting Names
          description: >-
            For resource='agent_settings': restrict to these setting names
            (defaults to all seeded settings).
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: >-
            For resource='agents' or 'agent_settings': opaque cursor for the
            next page.
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: >-
            For resource='agents' or 'agent_settings': page size (cursor
            pagination).
          default: 50
      type: object
      required:
        - resource
      title: ProjectResourceArgs
    ProjectUser:
      properties:
        id:
          type: string
          title: Id
        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'
      type: object
      required:
        - id
        - full_name
      title: ProjectUser
    Listing_ProjectUser_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/ProjectUser'
          type: array
          title: Items
      type: object
      required:
        - items
      title: Listing[ProjectUser]
    Listing_LabelResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/LabelResponse'
          type: array
          title: Items
      type: object
      required:
        - items
      title: Listing[LabelResponse]
    OffsetPage_SettingRead_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SettingRead'
          type: array
          title: Items
        page:
          type: integer
          title: Page
        size:
          type: integer
          title: Size
        total_items:
          type: integer
          title: Total Items
      type: object
      required:
        - items
        - page
        - size
        - total_items
      title: OffsetPage[SettingRead]
    AgentSkillDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        blob_prefix:
          type: string
          title: Blob Prefix
        uploaded_by:
          type: string
          title: Uploaded By
        version:
          type: integer
          title: Version
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        download_url:
          type: string
          title: Download Url
        download_url_expires_at:
          type: string
          format: date-time
          title: Download Url Expires At
        files:
          items:
            $ref: '#/components/schemas/SkillBundleFile'
          type: array
          title: Files
      type: object
      required:
        - id
        - name
        - description
        - blob_prefix
        - uploaded_by
        - version
        - created_at
        - updated_at
        - download_url
        - download_url_expires_at
        - files
      title: AgentSkillDetailResponse
    Listing_AgentSkillResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentSkillResponse'
          type: array
          title: Items
      type: object
      required:
        - items
      title: Listing[AgentSkillResponse]
    AgentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tagline:
          anyOf:
            - type: string
            - type: 'null'
          title: Tagline
        icon_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Url
        identity_prompt:
          type: string
          title: Identity Prompt
        role:
          $ref: '#/components/schemas/AgentRole'
        parent_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Agent Id
        version:
          type: integer
          title: Version
        skill_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Skill Ids
        run_status_counts:
          $ref: '#/components/schemas/AgentRunStatusCounts'
        last_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - description
        - tagline
        - icon_url
        - identity_prompt
        - role
        - parent_agent_id
        - version
        - created_at
        - updated_at
      title: AgentResponse
    CursorPage_AgentListResponseItem_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentListResponseItem'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - has_more
      title: CursorPage[AgentListResponseItem]
    CursorPage_AgentSettingsItem_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/AgentSettingsItem'
          type: array
          title: Items
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          type: boolean
          title: Has More
      type: object
      required:
        - items
        - has_more
      title: CursorPage[AgentSettingsItem]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProjectResource:
      type: string
      enum:
        - users
        - labels
        - settings
        - skills
        - agents
        - agent_settings
      title: ProjectResource
    ResourceType:
      type: string
      enum:
        - agent
        - task
      title: ResourceType
    SettingName:
      type: string
      enum:
        - skip_review
        - gated_tools
        - gated_capabilities
        - mcp_gated_tools
      title: SettingName
    AgentRole:
      type: string
      enum:
        - orchestrator
        - executor
        - pipeline
      title: AgentRole
    UserRole:
      type: string
      enum:
        - super_admin
        - admin
        - member
      title: UserRole
      description: Preserve lowercase enum names to match the Writesonic DB enum values.
    LabelResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        name:
          type: string
          title: Name
        color:
          type: string
          title: Color
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - project_id
        - name
        - color
        - created_at
      title: LabelResponse
    SettingRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        resource_type:
          $ref: '#/components/schemas/ResourceType'
        resource_id:
          type: string
          format: uuid
          title: Resource Id
        setting_name:
          $ref: '#/components/schemas/SettingName'
        setting_value:
          title: Setting Value
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - resource_type
        - resource_id
        - setting_name
        - setting_value
        - created_at
        - updated_at
      title: SettingRead
      description: >-
        Resource-tier row for the project-scoped endpoints.


        Deliberately narrow: the workspace read path needs its own schema, not a
        widening.
    SkillBundleFile:
      properties:
        path:
          type: string
          title: Path
        download_url:
          type: string
          title: Download Url
        download_url_expires_at:
          type: string
          format: date-time
          title: Download Url Expires At
      type: object
      required:
        - path
        - download_url
        - download_url_expires_at
      title: SkillBundleFile
    AgentSkillResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        blob_prefix:
          type: string
          title: Blob Prefix
        uploaded_by:
          type: string
          title: Uploaded By
        version:
          type: integer
          title: Version
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - description
        - blob_prefix
        - uploaded_by
        - version
        - created_at
        - updated_at
      title: AgentSkillResponse
    AgentRunStatusCounts:
      properties:
        total:
          type: integer
          title: Total
          default: 0
        pending:
          type: integer
          title: Pending
          default: 0
        running:
          type: integer
          title: Running
          default: 0
        awaiting_approval:
          type: integer
          title: Awaiting Approval
          default: 0
        awaiting_workflow:
          type: integer
          title: Awaiting Workflow
          default: 0
        awaiting_knowledge_sync:
          type: integer
          title: Awaiting Knowledge Sync
          default: 0
        succeeded:
          type: integer
          title: Succeeded
          default: 0
        failed:
          type: integer
          title: Failed
          default: 0
        cancelled:
          type: integer
          title: Cancelled
          default: 0
        skipped:
          type: integer
          title: Skipped
          default: 0
      type: object
      title: AgentRunStatusCounts
    AgentListResponseItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tagline:
          anyOf:
            - type: string
            - type: 'null'
          title: Tagline
        icon_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Url
        role:
          $ref: '#/components/schemas/AgentRole'
        parent_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Agent Id
        run_status_counts:
          $ref: '#/components/schemas/AgentRunStatusCounts'
        last_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run At
      type: object
      required:
        - id
        - name
        - description
        - tagline
        - icon_url
        - role
        - parent_agent_id
      title: AgentListResponseItem
    AgentSettingsItem:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tagline:
          anyOf:
            - type: string
            - type: 'null'
          title: Tagline
        icon_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Icon Url
        role:
          $ref: '#/components/schemas/AgentRole'
        parent_agent_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Parent Agent Id
        run_status_counts:
          $ref: '#/components/schemas/AgentRunStatusCounts'
        last_run_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Run At
        settings:
          additionalProperties: true
          propertyNames:
            $ref: '#/components/schemas/SettingName'
          type: object
          title: Settings
      type: object
      required:
        - id
        - name
        - description
        - tagline
        - icon_url
        - role
        - parent_agent_id
      title: AgentSettingsItem
    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

````