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

# List runs

> Returns a paginated list of slice runs for your team, ordered by most recent first. Filter by slice key or status (pending, running, completed, failed).

<Tip>Use `status=running` to check how many runs are active before starting a new one — there's a limit of 5 concurrent runs per team.</Tip>


## OpenAPI

````yaml /api/openapi.yaml get /api/public/v1/slice-runs
openapi: 3.1.0
info:
  title: OnePerfectSlice API
  version: 1.0.0
  description: |
    Programmatic access to OnePerfectSlice. Authenticate with a team-scoped
    API key (Bearer sk_...) obtained from Org Settings → API Keys.
servers:
  - url: https://app.oneperfectslice.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /api/public/v1/slice-runs:
    get:
      tags:
        - Slice Runs
      summary: List runs
      description: >-
        Returns a paginated list of slice runs for your team, ordered by most
        recent first. Filter by slice key or status (pending, running,
        completed, failed).
      operationId: listSliceRuns
      parameters:
        - name: sliceKey
          in: query
          required: false
          schema:
            type: string
          description: Filter by slice key
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - pending
              - running
              - completed
              - failed
          description: Filter by run status
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
          description: Number of results per page (max 100)
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: Offset for pagination
      responses:
        '200':
          description: Paginated run list
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SliceRunListItem'
                  meta:
                    $ref: '#/components/schemas/PaginationMeta'
        '400':
          description: Invalid filters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: INVALID_FILTERS
                  message: >-
                    Invalid status filter. Valid values: pending, running,
                    completed, failed
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          description: Run history request timed out
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              example:
                error:
                  code: RUN_LIST_TIMEOUT
                  message: Run history request timed out
      security:
        - bearerAuth: []
components:
  schemas:
    SliceRunListItem:
      type: object
      required:
        - id
        - sliceKey
        - sliceTitle
        - status
        - callsAnalyzed
        - filterSummary
        - startedAt
      properties:
        id:
          type: integer
          format: int64
          example: 12345
        sliceKey:
          type: string
          example: high_intent_deals
        sliceTitle:
          type: string
          example: High-Intent Deals
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
          example: completed
        matchedCallCount:
          type: integer
          nullable: true
          description: >-
            Total calls matching filters (null while the run is still in
            progress)
          example: 87
        callsAnalyzed:
          type: integer
          description: Number of calls analyzed so far
          example: 42
        filterSummary:
          $ref: '#/components/schemas/SliceRunFilterSummary'
        startedAt:
          type: string
          format: date-time
          example: '2026-04-26T14:30:00Z'
        completedAt:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-26T14:32:18Z'
    PaginationMeta:
      type: object
      required:
        - pagination
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
    ApiError:
      type: object
      description: Standard error envelope for all public API error responses
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable UPPER_SNAKE_CASE error code
              example: INVALID_TOKEN
            message:
              type: string
              description: Human-readable error description
              example: Token is invalid
            details:
              type: object
              description: Optional additional error context
              additionalProperties: true
    SliceRunFilterSummary:
      type: object
      required:
        - callTypes
        - callOwnerEmails
        - companyDomains
        - crmDealStages
        - crmDealIdsCount
        - crmCompanyIdsCount
        - hasCrmCustomFieldFilters
      properties:
        dateFrom:
          type: string
          nullable: true
          description: ISO datetime lower bound from the original run filters, when present
          example: '2026-03-01T00:00:00.000Z'
        dateTo:
          type: string
          nullable: true
          description: ISO datetime upper bound from the original run filters, when present
          example: '2026-04-01T00:00:00.000Z'
        callTypes:
          type: array
          items:
            type: string
          description: Call type keys used when the run was created
        callOwnerEmails:
          type: array
          items:
            type: string
          description: Call owner filters used when the run was created
        companyDomains:
          type: array
          items:
            type: string
          description: Company domain filters used when the run was created
        crmDealStages:
          type: array
          items:
            type: string
          description: CRM deal stage filters used when the run was created
        crmDealIdsCount:
          type: integer
          description: Number of CRM deal IDs present in the original filter set
          example: 2
        crmCompanyIdsCount:
          type: integer
          description: Number of CRM company IDs present in the original filter set
          example: 1
        hasCrmCustomFieldFilters:
          type: boolean
          description: Whether the original run used CRM custom field filters
          example: true
    Pagination:
      type: object
      required:
        - totalCount
        - hasMore
        - limit
        - offset
      properties:
        totalCount:
          type: integer
          description: Total number of results across all pages
          example: 142
        hasMore:
          type: boolean
          description: Whether more results exist beyond the current page
          example: true
        limit:
          type: integer
          description: Number of results per page
          example: 20
        offset:
          type: integer
          description: Current offset into the result set
          example: 0
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            missingToken:
              value:
                error:
                  code: MISSING_TOKEN
                  message: Authorization header with Bearer token is required
            invalidToken:
              value:
                error:
                  code: INVALID_TOKEN
                  message: Token is invalid
            tokenRevoked:
              value:
                error:
                  code: TOKEN_REVOKED
                  message: Token has been revoked
            tokenExpired:
              value:
                error:
                  code: TOKEN_EXPIRED
                  message: Token has expired
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key with sk_ prefix. Create one in Org Settings → API Keys.
      x-default: sk_your_api_key

````