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

# Get rate-limit headroom

> Return an authoritative point-in-time snapshot of all rate-limit buckets applicable to the authenticated Partner credential. The call itself counts against the token and partner buckets. The snapshot also includes the hourly per-partner mail budgets `mail:company-create` (company creates) and `mail:membership-create` (membership invites, inline users included). Those two are charged only by successful commands.



## OpenAPI

````yaml /api-docs/partner-api/openapi.json get /partner/v2/usage/
openapi: 3.0.3
info:
  description: >-
    Onboard and manage companies and their memberships through the current API
    at the `/partner/v2/` HTTP path.
  title: paywise Partner API
  version: current
servers:
  - description: Production environment
    url: https://api.paywise.de
  - description: Sandbox environment
    url: https://api-sandbox.paywise.de
security: []
tags:
  - description: Client companies managed by the partner.
    name: Companies
  - description: Memberships and invitations of a managed company.
    name: Company users
  - description: Webhook endpoints and their signing secrets.
    name: Webhooks
  - description: Delivery log and redelivery of webhook events.
    name: Webhook deliveries
  - description: Ordered feed of the events webhooks deliver.
    name: Events
  - description: Reference catalog of legal forms.
    name: Legal forms
  - description: The authenticated credential and API availability.
    name: Meta
  - description: Rate-limit headroom of the credential.
    name: Usage
externalDocs:
  url: https://docs.paywise.de/api-docs/partner-api/introduction
paths:
  /partner/v2/usage/:
    get:
      tags:
        - Usage
      summary: Get rate-limit headroom
      description: >-
        Return an authoritative point-in-time snapshot of all rate-limit buckets
        applicable to the authenticated Partner credential. The call itself
        counts against the token and partner buckets. The snapshot also includes
        the hourly per-partner mail budgets `mail:company-create` (company
        creates) and `mail:membership-create` (membership invites, inline users
        included). Those two are charged only by successful commands.
      operationId: get-rate-limit-headroom
      parameters: []
      responses:
        '200':
          content:
            application/json:
              examples:
                EmptyOperationScopes:
                  description: >-
                    A Partner credential with no operation scopes has its
                    principal buckets plus the two hourly mail budgets; the
                    usage call itself is counted against the minute buckets.
                  summary: Empty operation scopes
                  value:
                    generated_at: '2026-07-17T10:00:00Z'
                    limits:
                      - limit: 600
                        remaining: 599
                        resets_at: '2026-07-17T10:01:00Z'
                        scope: token
                        used: 1
                        window_seconds: 60
                      - limit: 600
                        remaining: 599
                        resets_at: '2026-07-17T10:01:00Z'
                        scope: partner
                        used: 1
                        window_seconds: 60
                      - limit: 30
                        remaining: 30
                        resets_at: '2026-07-17T11:00:00Z'
                        scope: mail:company-create
                        used: 0
                        window_seconds: 3600
                      - limit: 60
                        remaining: 60
                        resets_at: '2026-07-17T11:00:00Z'
                        scope: mail:membership-create
                        used: 0
                        window_seconds: 3600
              schema:
                $ref: '#/components/schemas/UsageResponse'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '401':
          content:
            application/json:
              examples:
                authentication-error:
                  value:
                    code: not_authenticated
                    detail: Authentication credentials were not provided.
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            Retry-After:
              description: Integer seconds to wait before retrying a throttled request.
              schema:
                minimum: 1
                type: integer
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
      security:
        - partnerBearerAuth: []
components:
  schemas:
    UsageResponse:
      description: Point-in-time live usage returned by `/usage`.
      properties:
        generated_at:
          description: Time at which this usage snapshot was calculated.
          format: date-time
          readOnly: true
          type: string
        limits:
          description: Current usage and remaining capacity for each rate-limit bucket.
          items:
            $ref: '#/components/schemas/UsageLimit'
          readOnly: true
          type: array
      required:
        - generated_at
        - limits
      type: object
    Error:
      properties:
        code:
          description: Machine-readable error category.
          type: string
        detail:
          description: Short human-readable summary of the error.
          type: string
        errors:
          description: Field-level validation errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
      required:
        - detail
        - code
      type: object
    UsageLimit:
      description: One live sliding-window bucket for the calling API principal.
      properties:
        limit:
          description: Maximum requests allowed within the window.
          readOnly: true
          type: integer
        remaining:
          description: Requests still available in the current window.
          readOnly: true
          type: integer
        resets_at:
          description: Earliest time at which capacity becomes available again.
          format: date-time
          readOnly: true
          type: string
        scope:
          description: Rate-limit bucket this usage entry describes.
          readOnly: true
          type: string
        used:
          description: Requests already counted in the current window.
          readOnly: true
          type: integer
        window_seconds:
          description: Length of the bucket's rolling window in seconds.
          readOnly: true
          type: integer
      required:
        - limit
        - remaining
        - resets_at
        - scope
        - used
        - window_seconds
      type: object
    ErrorItem:
      properties:
        code:
          description: Machine-readable field error code.
          type: string
        field:
          description: >-
            Path to the field that caused the error, using dots for objects and
            brackets for list indexes, for example `claims[0].amount`; null for
            an error without a field path.
          nullable: true
          type: string
        message:
          description: Human-readable explanation of the field error.
          type: string
      required:
        - field
        - code
        - message
      type: object
  securitySchemes:
    partnerBearerAuth:
      description: >-
        Partner API Bearer key: `Authorization: Bearer <key>`. Keys are created
        only through authorized portal or staff flows.
      scheme: bearer
      type: http

````

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