# Download Usage Runs Report

> GET /api/v1/organizations/usage/runs/report — request parameters and responses from the Menace Voice API schema.

`GET /api/v1/organizations/usage/runs/report`

{/* Generated by scripts/sync_docs_api.mjs. Edit the API schema source to change the contract. */}

See [authentication](/api-reference/authentication) for workspace API access. Public embed and artifact endpoints use their documented session or access tokens.

## API contract for documentation tools

Generated from the OpenAPI schema. Do not infer a different parameter type from an example. Authentication headers are alternatives as explained in the authentication guide.

### Parameters

| Name | Location | Type | Required | Description and constraints |
| --- | --- | --- | --- | --- |
| start_date | query | string or null | no | ISO 8601 date-time string (UTC). Lower bound (inclusive) on `created_at`. |
| end_date | query | string or null | no | ISO 8601 date-time string (UTC). Upper bound (inclusive) on `created_at`. |
| filters | query | string or null | no | JSON-encoded array of filter objects. Each object has the shape: ```json &#123; "attribute": "&lt;name&gt;", "type": "&lt;type&gt;", "value": &lt;value&gt; &#125; ``` Supported `attribute` / `type` / `value` combinations: \| attribute \| type \| value shape \| matches \| \|-----------------\|---------------\|----------------------------------------------\|------------------------------------------------------\| \| `runId` \| `number` \| `&#123; "value": 12345 &#125;` \| exact run id \| \| `workflowId` \| `number` \| `&#123; "value": 42 &#125;` \| exact agent (workflow) id \| \| `campaignId` \| `number` \| `&#123; "value": 7 &#125;` \| exact campaign id \| \| `callerNumber` \| `text` \| `&#123; "value": "415555" &#125;` \| substring match on `initial_context.caller_number` \| \| `calledNumber` \| `text` \| `&#123; "value": "9911848" &#125;` \| substring match on `initial_context.called_number` \| \| `dispositionCode` \| `multiSelect` \| `&#123; "codes": ["XFER", "DNC"] &#125;` \| any of the codes in `gathered_context.mapped_call_disposition` \| \| `duration` \| `numberRange` \| `&#123; "min": 60, "max": 300 &#125;` \| call duration (seconds), inclusive bounds \| \| `callDirection` \| `radio` \| `&#123; "status": "inbound" &#125;` \| `inbound` or `outbound`; any other value matches all \| \| `callChannel` \| `radio` \| `&#123; "status": "telephony" &#125;` \| `telephony`, `web`, or `chat` — the group of run modes for that channel \| Unknown attributes and unsupported `type` values are silently ignored. Date filtering on this endpoint is done via the dedicated `start_date` / `end_date` query params, not via a `dateRange` filter object.  |
| authorization | header | string or null | no |  |
| X-API-Key | header | string or null | no |  |

### Response 200

Successful Response

application/json: unspecified.

### Response 404

Not found

### Response 422

Validation Error

application/json: HTTPValidationError (object).

| Field | Type | Required | Description and constraints |
| --- | --- | --- | --- |
| detail | array of ValidationError (object) | no |  |

## OpenAPI

````yaml api-reference/openapi.json get /api/v1/organizations/usage/runs/report
openapi: 3.1.0
info:
  title: Menace Voice API
  description: API for Menace Voice agents
  version: 1.0.0
servers:
  - url: https://voice.menaceui.com
    description: Production
  - url: http://localhost:8000
    description: Local development
paths:
  /api/v1/organizations/usage/runs/report:
    get:
      tags:
        - main
      summary: Download Usage Runs Report
      description: Download a CSV of runs matching the same filters as `/usage/runs`.
      operationId: download_usage_runs_report_api_v1_organizations_usage_runs_report_get
      parameters:
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            description: ISO 8601 date-time string (UTC). Lower bound (inclusive) on
              `created_at`.
            title: Start Date
          description: ISO 8601 date-time string (UTC). Lower bound (inclusive) on
            `created_at`.
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            description: ISO 8601 date-time string (UTC). Upper bound (inclusive) on
              `created_at`.
            title: End Date
          description: ISO 8601 date-time string (UTC). Upper bound (inclusive) on
            `created_at`.
        - name: filters
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            description: |
              JSON-encoded array of filter objects. Each object has the shape:

              ```json
              { "attribute": "<name>", "type": "<type>", "value": <value> }
              ```

              Supported `attribute` / `type` / `value` combinations:

              | attribute       | type          | value shape                                  | matches                                              |
              |-----------------|---------------|----------------------------------------------|------------------------------------------------------|
              | `runId`         | `number`      | `{ "value": 12345 }`                         | exact run id                                         |
              | `workflowId`    | `number`      | `{ "value": 42 }`                            | exact agent (workflow) id                            |
              | `campaignId`    | `number`      | `{ "value": 7 }`                             | exact campaign id                                    |
              | `callerNumber`  | `text`        | `{ "value": "415555" }`                      | substring match on `initial_context.caller_number`   |
              | `calledNumber`  | `text`        | `{ "value": "9911848" }`                     | substring match on `initial_context.called_number`   |
              | `dispositionCode` | `multiSelect` | `{ "codes": ["XFER", "DNC"] }`             | any of the codes in `gathered_context.mapped_call_disposition` |
              | `duration`      | `numberRange` | `{ "min": 60, "max": 300 }`                  | call duration (seconds), inclusive bounds            |
              | `callDirection` | `radio`       | `{ "status": "inbound" }`                    | `inbound` or `outbound`; any other value matches all |
              | `callChannel`   | `radio`       | `{ "status": "telephony" }`                  | `telephony`, `web`, or `chat` — the group of run modes for that channel |

              Unknown attributes and unsupported `type` values are silently ignored.

              Date filtering on this endpoint is done via the dedicated `start_date` / `end_date` query params, not via a `dateRange` filter object.
            title: Filters
          description: |
            JSON-encoded array of filter objects. Each object has the shape:

            ```json
            { "attribute": "<name>", "type": "<type>", "value": <value> }
            ```

            Supported `attribute` / `type` / `value` combinations:

            | attribute       | type          | value shape                                  | matches                                              |
            |-----------------|---------------|----------------------------------------------|------------------------------------------------------|
            | `runId`         | `number`      | `{ "value": 12345 }`                         | exact run id                                         |
            | `workflowId`    | `number`      | `{ "value": 42 }`                            | exact agent (workflow) id                            |
            | `campaignId`    | `number`      | `{ "value": 7 }`                             | exact campaign id                                    |
            | `callerNumber`  | `text`        | `{ "value": "415555" }`                      | substring match on `initial_context.caller_number`   |
            | `calledNumber`  | `text`        | `{ "value": "9911848" }`                     | substring match on `initial_context.called_number`   |
            | `dispositionCode` | `multiSelect` | `{ "codes": ["XFER", "DNC"] }`             | any of the codes in `gathered_context.mapped_call_disposition` |
            | `duration`      | `numberRange` | `{ "min": 60, "max": 300 }`                  | call duration (seconds), inclusive bounds            |
            | `callDirection` | `radio`       | `{ "status": "inbound" }`                    | `inbound` or `outbound`; any other value matches all |
            | `callChannel`   | `radio`       | `{ "status": "telephony" }`                  | `telephony`, `web`, or `chat` — the group of run modes for that channel |

            Unknown attributes and unsupported `type` values are silently ignored.

            Date filtering on this endpoint is done via the dedicated `start_date` / `end_date` query params, not via a `dateRange` filter object.
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: Authorization
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: "null"
            title: X-Api-Key
      responses:
        "200":
          description: Successful Response
          content:
            application/json:
              schema: {}
        "404":
          description: Not found
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
````
