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

# List project templates

> List project templates with filtering, sorting, and pagination. Supports minimal data mode. Non-minimal responses include schedules, task counts, and the number of active (not completed) projects launched from each template plus the incomplete tasks on those projects.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /library/project_template/_list
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /library/project_template/_list:
    post:
      tags:
        - library
      summary: List project templates
      description: >-
        List project templates with filtering, sorting, and pagination. Supports
        minimal data mode. Non-minimal responses include schedules, task counts,
        and the number of active (not completed) projects launched from each
        template plus the incomplete tasks on those projects.
      parameters:
        - description: Return minimal data (set to any value)
          name: minimal
          in: query
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/pkg_routes_library_project_templates.ListProjectTemplatesRequest
        description: List project templates request
        required: true
      responses:
        '200':
          description: Project templates list
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_library_project_templates.ListProjectTemplatesResponse
        '400':
          description: Bad request - invalid request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_library_project_templates.ListProjectTemplatesRequest:
      type: object
      properties:
        filters:
          $ref: >-
            #/components/schemas/pkg_routes_library_project_templates.ListProjectTemplatesFilters
        page:
          $ref: '#/components/schemas/types.ListPagination'
        sort:
          $ref: '#/components/schemas/types.ListSort'
    pkg_routes_library_project_templates.ListProjectTemplatesResponse:
      type: object
      properties:
        project_templates:
          type: array
          items:
            $ref: '#/components/schemas/types.ProjectTemplate'
        total:
          type: integer
    pkg_routes_library_project_templates.ListProjectTemplatesFilters:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        search:
          type: string
        tags:
          description: |-
            Tags accepts a plain array (include-only, legacy) or the
            {include,exclude} shape from the ENG-6934 filter toggle.
          type: array
          items:
            type: string
    types.ListPagination:
      type: object
      properties:
        limit:
          type: integer
        skip:
          type: integer
    types.ListSort:
      type: object
      properties:
        field:
          type: string
        last: {}
        order:
          type: integer
    types.ProjectTemplate:
      type: object
      properties:
        _id:
          type: string
        activity:
          description: For returning
          type: array
          items:
            $ref: '#/components/schemas/types.Activity'
        billing:
          $ref: '#/components/schemas/types.ProjectTemplateBilling'
        category:
          description: Category - identifies special template behaviors (e.g. "plan_audit")
          type: string
        created_at:
          description: Time tracking
          type: string
        deleted_at:
          type: string
        description:
          type: string
        estimated_time:
          type: integer
        fields:
          type: array
          items:
            $ref: '#/components/schemas/types.Field'
        lead:
          description: >-
            Default project lead when launching (user id, expression, or queue
            group)
          type: string
        lead_group:
          type: string
        n_active_projects:
          type: integer
        n_active_tasks:
          type: integer
        num_tasks:
          type: integer
        projects:
          $ref: '#/components/schemas/types.ProjectsAggregation'
        schedule:
          description: Schedules to launch automatically
          type: array
          items:
            $ref: '#/components/schemas/types.ProjectSchedule'
        tags:
          type: array
          items:
            type: string
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/types.TaskTemplate'
        team:
          type: string
        title:
          type: string
        triggers:
          description: 'Triggers - example: "Payroll Received"'
          type: array
          items:
            $ref: '#/components/schemas/types.TriggerConfig'
        view:
          description: Estimated time to complete in minutes
          type: string
    types.ListFilterData:
      type: object
      properties:
        key:
          type: string
        op:
          type: string
        value: {}
    types.Activity:
      type: object
      properties:
        _id:
          type: string
        action:
          type: string
        changes:
          type: array
          items:
            $ref: '#/components/schemas/types.Change'
        client:
          type: string
        on_id:
          type: string
        on_py:
          type: integer
        on_type:
          type: string
        team:
          type: string
        timestamp:
          type: string
        user:
          type: string
    types.ProjectTemplateBilling:
      type: object
      properties:
        billable_field_key:
          type: string
        default_quantity:
          $ref: '#/components/schemas/bson.Decimal128'
        fee_item:
          type: string
        nonbillable_reason_field_key:
          type: string
        quantity_field_key:
          type: string
        require_billable_decision:
          type: boolean
        revision:
          type: integer
    types.Field:
      type: object
      properties:
        key:
          type: string
        value: {}
    types.ProjectsAggregation:
      type: object
      properties:
        complete:
          type: integer
        in_progress:
          type: integer
        on_hold:
          type: integer
        overdue:
          type: integer
        projects:
          type: array
          items:
            type: string
        tasks:
          type: array
          items:
            $ref: '#/components/schemas/types.TasksAggregation'
        total:
          type: integer
    types.ProjectSchedule:
      type: object
      properties:
        client_request:
          description: >-
            ClientRequest distinguishes portal form submissions that share
            client+template.
          type: string
        clients:
          type: array
          items:
            type: string
        clients_filter:
          description: Filter instead of predefined list?
          allOf:
            - $ref: '#/components/schemas/types.ClientsFilter'
        deals:
          type: array
          items:
            type: string
        deals_filter:
          $ref: '#/components/schemas/types.DealsFilter'
        due:
          description: >-
            Due - can either be a specific date or relative to the project
            launch date
          type: string
        fields:
          description: Fields to be set to the project
          type: array
          items:
            $ref: '#/components/schemas/types.Field'
        file:
          description: Who are we launching it for? (clients/plans)
          type: string
        frequency:
          type: string
        ignore_active:
          description: Ignore resource who already have active projects with this template?
          type: boolean
        lead:
          type: string
        lead_group:
          type: string
        plans:
          type: array
          items:
            type: string
        plans_filter:
          $ref: '#/components/schemas/types.PlansFilter'
        timestamp:
          description: |-
            Schedules
            When are we launching it?
          type: string
    types.TaskTemplate:
      type: object
      properties:
        assignee:
          type: string
        assignee_group:
          type: string
        automation:
          description: Automation
          type: string
        automation_config:
          type: array
          items:
            $ref: '#/components/schemas/types.Field'
        automation_timing:
          description: >-
            AutomationTiming, when non-nil, schedules the automation to run
            later

            (N days after the task starts, at a wall-clock hour in the team's
            local

            timezone) instead of immediately. nil = run immediately. A pointer
            (not a

            value) so the all-zero config {RunAfterDays:0, RunHour:0} = "same
            day,

            midnight" is a valid, distinguishable schedule rather than "unset".
          allOf:
            - $ref: '#/components/schemas/types.AutomationTiming'
        billable:
          description: >-
            Billable includes this task's work-log time in hours-logged project
            fees.
          type: boolean
        billing_decision:
          description: >-
            BillingDecision identifies the task that collects the project's
            required

            billable/not-billable decision.
          type: boolean
        blocked_fields:
          description: >-
            BlockingFields are project field keys that must be populated before
            the

            task can be completed. Unlike FieldsToComplete, these cannot be
            overridden.
          type: array
          items:
            type: string
        client_task_data:
          $ref: '#/components/schemas/types.ClientTaskDataTemplate'
        client_task_type:
          type: string
        description:
          type: string
        due_after_days:
          type: integer
        due_static:
          description: >-
            Due - can either be a specific date or relative to the project
            launch date
          type: string
        fields_to_complete:
          type: array
          items:
            type: string
        internal_task_data:
          $ref: '#/components/schemas/types.InternalTaskDataTemplate'
        internal_task_type:
          type: string
        log_completion_to:
          type: string
        log_completion_type:
          description: Log completion time to project variable?
          type: string
        notes:
          type: string
        required:
          description: Required tasks cannot be deleted on plan_audit templates/projects
          type: boolean
    types.TriggerConfig:
      type: object
      properties:
        file_upload:
          $ref: '#/components/schemas/types.FileUploadTrigger'
        form_email_field:
          type: string
        form_file_field:
          type: string
        form_name_field:
          type: string
        form_template:
          type: string
        lead:
          type: string
        lead_group:
          type: string
        payroll_trigger_clients:
          type: integer
        type:
          type: string
    types.Change:
      type: object
      properties:
        data:
          type: string
        field:
          type: string
        from:
          type: string
        to:
          type: string
    bson.Decimal128:
      type: object
    types.TasksAggregation:
      type: object
      properties:
        assignee:
          type: string
        doing:
          type: integer
        done:
          type: integer
        overdue:
          type: integer
        total:
          type: integer
    types.ClientsFilter:
      type: object
      properties:
        assignee:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        status:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
    types.DealsFilter:
      type: object
      properties:
        funnel:
          type: array
          items:
            type: string
        owner:
          type: array
          items:
            type: string
        source:
          type: array
          items:
            type: string
        stage:
          type: array
          items:
            type: string
        status:
          type: array
          items:
            type: string
        value:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
    types.PlansFilter:
      type: object
      properties:
        client:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/types.ListFilterData'
        provisions:
          type: object
          additionalProperties:
            type: string
        pye: {}
        status:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        type:
          type: array
          items:
            type: string
    types.AutomationTiming:
      type: object
      properties:
        anchor:
          type: string
        date:
          description: YYYY-MM-DD, team-local; anchor "date" only
          type: string
        run_after_days:
          description: >-
            anchor "": >= 0 after the trigger; "project_due": signed, negative
            is before
          type: integer
        run_hour:
          description: 0..23, wall-clock in the team's local timezone
          type: integer
    types.ClientTaskDataTemplate:
      type: object
      properties:
        allow_skip_census_upload:
          type: string
        census_upload_instructions:
          type: string
        census_v2_employee_data_policy:
          $ref: '#/components/schemas/sharedtypes.CensusV2EmployeeDataPolicy'
        census_v2_export_field:
          type: string
        census_v2_export_file_type:
          type: string
        census_v2_flow_preset:
          $ref: '#/components/schemas/sharedtypes.CensusV2FlowPreset'
        destination:
          type: string
        download_file:
          type: string
        form_file:
          type: string
        form_template:
          type: string
        notice_file:
          type: string
        payroll_connect_instructions:
          type: string
        payroll_enabled:
          type: string
        payroll_upload_instructions:
          type: string
        py:
          type: string
        url:
          type: string
        w2_upload_instructions:
          type: string
    types.InternalTaskDataTemplate:
      type: object
      properties:
        form_id:
          type: string
        py:
          type: string
        task_type:
          type: string
        url:
          type: string
    types.FileUploadTrigger:
      type: object
      properties:
        directory:
          type: string
        file_field_key:
          type: string
        plan_type:
          type: string
        relative_path:
          type: string
    sharedtypes.CensusV2EmployeeDataPolicy:
      type: string
      enum:
        - any
        - payroll_or_census
        - census_only
        - census_or_w2
        - w2_only
      x-enum-varnames:
        - CensusV2EmployeeDataPolicyAny
        - CensusV2EmployeeDataPolicyPayrollOrCensus
        - CensusV2EmployeeDataPolicyCensusOnly
        - CensusV2EmployeeDataPolicyCensusOrW2
        - CensusV2EmployeeDataPolicyW2Only
    sharedtypes.CensusV2FlowPreset:
      type: string
      enum:
        - company_contacts_ownership_payroll_census
        - company_contacts_ownership
        - payroll_census_only
      x-enum-varnames:
        - CensusV2FlowPresetCompanyContactsOwnershipPayrollCensus
        - CensusV2FlowPresetCompanyContactsOwnership
        - CensusV2FlowPresetPayrollCensusOnly
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.