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

# Get usage summary v2

> Get consumption across usage terms, with a calculation breakdown for each pricing rule.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/usage/summary
openapi: 3.0.0
info:
  title: Checkly Public API
  version: v1
  description: |-
    These are the docs for the newly released Checkly Public API.
    If you have any questions, please do not hesitate to get in touch with us.
servers:
  - url: https://api.checklyhq.com
security:
  - Bearer: []
tags: []
paths:
  /v2/usage/summary:
    get:
      tags:
        - Usage
      summary: Get usage summary
      description: >-
        Get consumption across usage terms, with a calculation breakdown for
        each pricing rule.
      operationId: getV2UsageSummary
      parameters:
        - schema:
            type: string
            format: date
            description: >-
              Inclusive UTC date. Defaults to the earliest selected usage start,
              or to.
          required: false
          description: >-
            Inclusive UTC date. Defaults to the earliest selected usage start,
            or to.
          name: from
          in: query
        - schema:
            type: string
            format: date
            description: Inclusive UTC date. Defaults to today.
          required: false
          description: Inclusive UTC date. Defaults to today.
          name: to
          in: query
        - schema:
            type: array
            items:
              type: string
              format: uuid
            minItems: 1
            maxItems: 100
          required: false
          name: usageTermsIds
          in: query
        - schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 100
          required: false
          name: accountIds
          in: query
        - schema:
            type: array
            items:
              type: string
              enum:
                - apiChecks
                - multistepChecks
                - browserChecks
                - playwrightCheckSuites
                - uptimeMonitors
                - aiInvocations
                - statusPages
                - statusPageAdditionalServices
                - statusPageAdditionalSubscribers
                - additionalSms
                - additionalPhoneAlerts
            minItems: 1
            maxItems: 100
          required: false
          name: pricingRuleKeys
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Your Checkly account ID, you can find it at
              https://app.checklyhq.com/settings/account/general
          required: false
          description: >-
            Your Checkly account ID, you can find it at
            https://app.checklyhq.com/settings/account/general
          name: x-checkly-account
          in: header
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2SummaryResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
        '502':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageV2ReportingError'
components:
  schemas:
    UsageV2SummaryResponse:
      type: object
      properties:
        period:
          type: object
          properties:
            from:
              type: string
              format: date
            to:
              type: string
              format: date
          required:
            - from
            - to
        usageTermsIds:
          type: array
          items:
            type: string
            format: uuid
        totals:
          type: object
          properties:
            creditsUsed:
              type: number
              nullable: true
              minimum: 0
              description: >-
                Credits rounded to four decimals before aggregation: once per
                organization-day for uptime monitors, and per resource-day and
                applied rate for other usage. Rules absent from configured
                pricing contribute zero. Null means unavailable or incompatible
                pricing, or uncovered dates.
          required:
            - creditsUsed
        breakdown:
          type: array
          items:
            $ref: '#/components/schemas/UsageV2Breakdown'
        coverage:
          type: object
          properties:
            gaps:
              type: array
              items:
                type: object
                properties:
                  from:
                    type: string
                    format: date
                  to:
                    type: string
                    format: date
                required:
                  - from
                  - to
          required:
            - gaps
          description: >-
            Dates outside organization usage terms. Credits for gaps are
            unknown; deliberately filtered terms are excluded.
      required:
        - period
        - usageTermsIds
        - totals
        - breakdown
        - coverage
    UsageV2ReportingError:
      type: object
      properties:
        statusCode:
          type: number
        error:
          type: string
        message:
          type: string
        code:
          type: string
          enum:
            - ACCOUNT_NOT_IN_USAGE_TERMS
            - INVALID_CURSOR
            - INVALID_RANGE
            - NO_USAGE_TERMS
            - USAGE_STORE_UNAVAILABLE
            - USAGE_TERMS_CONFLICT
      required:
        - statusCode
        - error
        - message
    UsageV2Breakdown:
      type: object
      properties:
        usageTermsId:
          type: string
          format: uuid
        pricingRuleKey:
          type: string
          enum:
            - apiChecks
            - multistepChecks
            - browserChecks
            - playwrightCheckSuites
            - uptimeMonitors
            - aiInvocations
            - statusPages
            - statusPageAdditionalServices
            - statusPageAdditionalSubscribers
            - additionalSms
            - additionalPhoneAlerts
        accountId:
          type: string
        period:
          type: object
          properties:
            from:
              type: string
              format: date
            to:
              type: string
              format: date
          required:
            - from
            - to
        pricingRule:
          $ref: '#/components/schemas/UsageV2PricingRule'
        calculations:
          type: array
          items:
            $ref: '#/components/schemas/UsageV2Calculation'
        creditsUsed:
          type: number
          nullable: true
          minimum: 0
          description: >-
            Credits rounded to four decimals before aggregation: once per
            organization-day for uptime monitors, and per resource-day and
            applied rate for other usage. Rules absent from configured pricing
            contribute zero. Null means unavailable or incompatible pricing, or
            uncovered dates.
      required:
        - usageTermsId
        - pricingRuleKey
        - period
        - pricingRule
        - calculations
        - creditsUsed
    UsageV2PricingRule:
      anyOf:
        - type: object
          properties:
            method:
              type: string
              enum:
                - per_unit
            quantity:
              type: number
              minimum: 0
              exclusiveMinimum: true
            unit:
              type: string
              minLength: 1
            credits:
              type: number
              minimum: 0
            rates:
              type: array
              items:
                type: object
                properties:
                  when:
                    type: string
                    minLength: 1
                  credits:
                    type: number
                    minimum: 0
                required:
                  - when
                  - credits
                additionalProperties: false
            included:
              type: object
              properties:
                quantity:
                  type: number
                  minimum: 0
                period:
                  type: string
                  minLength: 1
              required:
                - quantity
              additionalProperties: false
          required:
            - method
            - quantity
            - unit
            - credits
          additionalProperties: false
        - type: object
          properties:
            method:
              type: string
              enum:
                - per_period
            period:
              type: string
              enum:
                - day
            price:
              type: object
              properties:
                annualCredits:
                  type: number
                  minimum: 0
              required:
                - annualCredits
              additionalProperties: false
          required:
            - method
            - period
            - price
          additionalProperties: false
        - type: object
          properties:
            method:
              type: string
              enum:
                - capacity_blocks_per_period
            period:
              type: string
              enum:
                - day
            unit:
              type: string
              minLength: 1
            included:
              type: object
              properties:
                quantity:
                  type: number
                  minimum: 0
              required:
                - quantity
              additionalProperties: false
            block:
              type: object
              properties:
                quantity:
                  type: number
                  minimum: 0
                  exclusiveMinimum: true
                annualCredits:
                  type: number
                  minimum: 0
              required:
                - quantity
                - annualCredits
              additionalProperties: false
          required:
            - method
            - period
            - unit
            - included
            - block
          additionalProperties: false
    UsageV2Calculation:
      anyOf:
        - type: object
          properties:
            rateCondition:
              type: string
              nullable: true
            measuredQuantity:
              type: number
              minimum: 0
            includedQuantity:
              type: number
              nullable: true
              minimum: 0
            billableQuantity:
              type: number
              nullable: true
              minimum: 0
            creditsUsed:
              type: number
              nullable: true
              minimum: 0
              description: >-
                Credits rounded to four decimals before aggregation: once per
                organization-day for uptime monitors, and per resource-day and
                applied rate for other usage. Rules absent from configured
                pricing contribute zero. Null means unavailable or incompatible
                pricing, or uncovered dates.
          required:
            - rateCondition
            - measuredQuantity
            - includedQuantity
            - billableQuantity
            - creditsUsed
        - type: object
          properties:
            billableResourceDays:
              type: number
              minimum: 0
            appliedDailyCredits:
              type: number
              minimum: 0
            proration:
              type: object
              properties:
                daysPerYear:
                  type: number
                  enum:
                    - 365
              required:
                - daysPerYear
            creditsUsed:
              type: number
              nullable: true
              minimum: 0
              description: >-
                Credits rounded to four decimals before aggregation: once per
                organization-day for uptime monitors, and per resource-day and
                applied rate for other usage. Rules absent from configured
                pricing contribute zero. Null means unavailable or incompatible
                pricing, or uncovered dates.
          required:
            - billableResourceDays
            - appliedDailyCredits
            - proration
            - creditsUsed
        - type: object
          properties:
            scope:
              type: string
              enum:
                - statusPage
            measuredQuantity:
              type: number
              minimum: 0
            includedQuantity:
              type: number
              minimum: 0
            billableBlockDays:
              type: number
              minimum: 0
            appliedDailyCreditsPerBlock:
              type: number
              minimum: 0
            proration:
              type: object
              properties:
                daysPerYear:
                  type: number
                  enum:
                    - 365
              required:
                - daysPerYear
            creditsUsed:
              type: number
              nullable: true
              minimum: 0
              description: >-
                Credits rounded to four decimals before aggregation: once per
                organization-day for uptime monitors, and per resource-day and
                applied rate for other usage. Rules absent from configured
                pricing contribute zero. Null means unavailable or incompatible
                pricing, or uncovered dates.
          required:
            - scope
            - measuredQuantity
            - includedQuantity
            - billableBlockDays
            - appliedDailyCreditsPerBlock
            - proration
            - creditsUsed
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: Bearer
      description: >
        The Checkly Public API uses API keys to authenticate requests. You can
        get the API Key
        [here](https://app.checklyhq.com/settings/user/api-keys).

        Your API key is like a password: 

        keep it secure!


        Authentication to the API is performed using the Bearer auth method in
        the Authorization header and using the account ID.


        For example, set **Authorization** header while using cURL: `curl -H
        "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"`

````

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