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

# Submission Counts by Status

> Returns the number of submissions per status for the workspace. All body fields are optional; omitting them counts every non-draft submission. Results are scoped to the key user's authorized locations; this endpoint has no CAN_VIEW_REPORTING gate.

Returns the number of submissions per status for the workspace, using the same optional filters as Submission Records. Each status key maps to an object with a `count`, and the top-level `total` is a plain number. Results are scoped to the key user's authorized locations; this endpoint has no `CAN_VIEW_REPORTING` gate.


## OpenAPI

````yaml POST /api/v1/ops/submissions-count-by-status
openapi: 3.1.0
info:
  title: Xenia Team API - Submission Counts by Status
  description: >-
    Returns submission counts grouped by status for the workspace, honoring the
    same filters as the submission records endpoint.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/ops/submissions-count-by-status:
    post:
      tags:
        - Reporting
      summary: Submission Counts by Status
      description: >-
        Returns the number of submissions per status for the workspace. All body
        fields are optional; omitting them counts every non-draft submission.
        Results are scoped to the key user's authorized locations; this endpoint
        has no CAN_VIEW_REPORTING gate.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                fromDate:
                  type: string
                  format: date-time
                  description: >-
                    Start of the submission date range (filters on
                    lastItemUpdatedAt). Requires toDate.
                toDate:
                  type: string
                  format: date-time
                  description: End of the submission date range. Requires fromDate.
                checklists:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Template (ChecklistId) UUIDs to include.
                locations:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: Location UUIDs to include.
                users:
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: User UUIDs (creator, updater, or last item updater).
                searchText:
                  type: string
                  description: >-
                    Free-text match against the template name and
                    submitter/updater name.
            example:
              fromDate: '2025-06-01T00:00:00.000Z'
              toDate: '2025-06-30T23:59:59.999Z'
              checklists: []
              locations: []
              users: []
      responses:
        '200':
          description: >-
            Submission counts retrieved successfully. Each status key maps to an
            object with a count; the top-level total is a plain number.
          content:
            application/json:
              example:
                data:
                  Submitted:
                    count: 120
                  In Progress:
                    count: 14
                  Pending Approval:
                    count: 8
                  total: 142
                meta: {}
        '401':
          description: >-
            Unauthorized - Invalid client credentials, or client does not belong
            to this workspace.
        '403':
          description: 'Forbidden: API key not authorized for this route.'
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````