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

# Get usage

> Read daily collection counts and elapsed job seconds for 1–31 inclusive UTC days. Both dates default to today. Usage is attributed to the collection’s creation date and is not a billing statement.



## OpenAPI

````yaml api-reference/openapi.json GET /v1/usage
openapi: 3.0.3
info:
  title: Thred API
  version: 1.0.0
  description: >-
    Thred is the data API for the phone. Use Collect when you know who to ask:
    send a phone number and instructions, add context values in input, and
    define the answers you want with a JSON Schema in output. Use the same base
    URL for Development and Production; your API key selects the environment.
servers:
  - url: https://api.thred.dev
    description: Thred API
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: Verify the workspace and environment selected by your API key.
  - name: Collect
    description: Collect structured answers from a known phone number.
  - name: Usage
    description: Read daily operational usage.
  - name: Health
    description: Check public API availability.
paths:
  /v1/usage:
    get:
      tags:
        - Usage
      summary: Get daily usage
      description: >-
        Read daily collection counts and elapsed job seconds for 1–31 inclusive
        UTC days. Both dates default to today. Usage is attributed to the
        collection’s creation date and is not a billing statement.
      operationId: getUsage
      parameters:
        - name: from
          in: query
          description: First UTC date, inclusive. Defaults to today.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2026-10-30'
        - name: to
          in: query
          description: >-
            Last UTC date, inclusive. Must be on or after from and no more than
            30 days later. Defaults to today.
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2026-10-30'
      responses:
        '200':
          description: Daily operational usage for the selected API environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Usage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    Usage:
      type: object
      properties:
        from:
          type: string
          format: date
        to:
          type: string
          format: date
        environment:
          $ref: '#/components/schemas/Environment'
        timezone:
          type: string
          enum:
            - UTC
        attribution:
          type: string
          enum:
            - call_created_date
        billing_status:
          type: string
          enum:
            - unreconciled
        billed_seconds:
          type: number
          nullable: true
          enum:
            - null
          description: Always null; these counters are not billing reconciliation.
        data:
          type: array
          minItems: 1
          maxItems: 31
          items:
            $ref: '#/components/schemas/DailyUsage'
      required:
        - from
        - to
        - environment
        - timezone
        - attribution
        - billing_status
        - billed_seconds
        - data
    Environment:
      type: string
      enum:
        - development
        - production
      description: >-
        The API key selects the workspace environment. Development and
        Production are isolated, but either can place real calls when enabled.
    DailyUsage:
      type: object
      properties:
        day:
          type: string
          format: date
        requested:
          type: integer
          minimum: 0
          description: >-
            Accepted collections, counted once. Idempotent replays do not
            increment this count.
        completed:
          type: integer
          minimum: 0
        incomplete:
          type: integer
          minimum: 0
        failed:
          type: integer
          minimum: 0
        canceled:
          type: integer
          minimum: 0
        human_assisted:
          type: integer
          minimum: 0
          description: Finalized collections that had live human assistance.
        elapsed_job_seconds:
          type: number
          minimum: 0
          description: Operational elapsed duration recorded on physical call closure.
      required:
        - day
        - requested
        - completed
        - incomplete
        - failed
        - canceled
        - human_assisted
        - elapsed_job_seconds
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error explanation.
      required:
        - code
        - message
  responses:
    BadRequest:
      description: >-
        Invalid request, schema, destination, duration, caller number, webhook,
        or date range. Inspect error.code and error.message.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: >-
        Missing, malformed, invalid, revoked, or environment-mismatched bearer
        API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: >-
        Calling or the backend is unavailable. Codes include
        calling_unavailable, environment_unavailable, not_configured, and
        backend_unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Thred API key
      description: >-
        Send Authorization: Bearer <THRED_API_KEY>. Development keys begin
        thr_dev_; Production keys begin thr_prod_. Each key is scoped to a
        workspace and environment. Keep secrets on your server.

````

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