> ## 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 projections v2

> Project whole-term credit consumption from completed UTC days using v2 pricing rules.



## OpenAPI

````yaml /api-reference/openapi.json get /v2/usage/terms/{id}/projections
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/terms/{id}/projections:
    get:
      tags:
        - Usage
      summary: Get usage projections
      description: >-
        Project whole-term credit consumption from completed UTC days using v2
        pricing rules.
      operationId: getV2UsageTermsIdProjections
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
        - schema:
            type: string
            format: date
            description: >-
              Inclusive completed UTC date. Defaults to yesterday UTC; today and
              future dates are rejected.
          required: false
          description: >-
            Inclusive completed UTC date. Defaults to yesterday UTC; today and
            future dates are rejected.
          name: asOf
          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/UsageV2ProjectionsResponse'
        '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:
    UsageV2ProjectionsResponse:
      type: object
      properties:
        usageTermsId:
          type: string
          format: uuid
        asOf:
          type: string
          format: date
          description: >-
            Requested completed UTC date, including when it falls outside the
            term.
        period:
          type: object
          nullable: true
          properties:
            from:
              type: string
              format: date
            to:
              type: string
              format: date
          required:
            - from
            - to
          description: >-
            Usage start through the earlier of asOf and term end. Null before
            usage starts.
        weeksSinceStart:
          type: integer
          minimum: 0
        weeksRemaining:
          type: integer
          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.
        remainingCredits:
          type: number
          nullable: true
          description: Term budget minus credits used. Negative when over budget.
        budgetedDailyCredits:
          type: number
          nullable: true
          minimum: 0
          description: >-
            Term budget divided by inclusive days from usage start through
            contract end, rounded to four decimals. Null when the budget is
            unavailable.
        windows:
          type: object
          properties:
            sinceStart:
              $ref: '#/components/schemas/UsageV2ProjectionWindow'
            last30Days:
              $ref: '#/components/schemas/UsageV2ProjectionWindow'
            last7Days:
              $ref: '#/components/schemas/UsageV2ProjectionWindow'
            last1Day:
              $ref: '#/components/schemas/UsageV2ProjectionWindow'
          required:
            - sinceStart
            - last30Days
            - last7Days
            - last1Day
      required:
        - usageTermsId
        - asOf
        - period
        - weeksSinceStart
        - weeksRemaining
        - creditsUsed
        - remainingCredits
        - budgetedDailyCredits
        - windows
      description: >-
        Whole-term projections from v2-priced daily charges. Credit amounts use
        four decimals; percentages and exhaustion weeks use two. Reads are live,
        including historical asOf dates.
    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
    UsageV2ProjectionWindow:
      type: object
      properties:
        period:
          type: object
          nullable: true
          properties:
            from:
              type: string
              format: date
            to:
              type: string
              format: date
          required:
            - from
            - to
          description: Actual window clipped to the term. Null before usage starts.
        observedDays:
          type: integer
          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.
        averageDailyCredits:
          type: number
          nullable: true
          minimum: 0
          description: Window credits divided by observed days, rounded to four decimals.
        projectedAnnualPercentOfBudget:
          type: number
          nullable: true
          minimum: 0
          description: Daily credit consumption annualized over 365 days.
        projectedCreditsAtContractEnd:
          type: number
          nullable: true
          minimum: 0
          description: >-
            Term-to-date credits plus the unrounded daily average times
            remaining calendar days, rounded to four decimals.
        projectedRemainingCredits:
          type: number
          nullable: true
          description: >-
            Term budget minus the unrounded contract-end forecast, rounded to
            four decimals. Negative when projected over budget; null when budget
            or forecast is unavailable.
        projectedPercentAtContractEnd:
          type: number
          nullable: true
          minimum: 0
        projectedWeeksUntilExhausted:
          type: number
          nullable: true
          minimum: 0
          description: >-
            Remaining budget divided by weekly consumption. Zero when exhausted;
            null when no estimate is available.
      required:
        - period
        - observedDays
        - creditsUsed
        - averageDailyCredits
        - projectedAnnualPercentOfBudget
        - projectedCreditsAtContractEnd
        - projectedRemainingCredits
        - projectedPercentAtContractEnd
        - projectedWeeksUntilExhausted
  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.