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

# Get Organization Usage

> Prompt use against the pool and content-credit use, for organization members.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/organizations/{organization_id}/usage
openapi: 3.1.0
info:
  description: >-
    Read-only access to one organization's brands, as the member who created the
    API key. Each key may make 120 requests a minute. Every error is an RFC 9457
    problem (`application/problem+json`) whose `code` names it.
  summary: Read your brands' AI visibility in Heralded.
  title: Heralded API
  version: '1'
servers:
  - url: https://api.heralded.ai
security: []
paths:
  /v1/organizations/{organization_id}/usage:
    get:
      tags:
        - v1
      summary: Get Organization Usage
      description: >-
        Prompt use against the pool and content-credit use, for organization
        members.
      operationId: getOrganizationUsage
      parameters:
        - in: path
          name: organization_id
          required: true
          schema:
            format: uuid
            title: Organization Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V1Usage'
          description: Successful Response
        '400':
          content:
            application/problem+json:
              example:
                code: invalid_cursor
                detail: The cursor is invalid or belongs to a different query.
                instance: example-request-id
                status: 400
                title: Bad Request
                type: about:blank
              schema:
                $ref: '#/components/schemas/Problem'
          description: The cursor is invalid or belongs to a different query.
        '401':
          content:
            application/problem+json:
              example:
                code: invalid_token
                detail: >-
                  The Authorization header carries no API key Heralded knows: it
                  is missing, mistyped, revoked or expired.
                instance: example-request-id
                status: 401
                title: Unauthorized
                type: about:blank
              schema:
                $ref: '#/components/schemas/Problem'
          description: No API key, or one that is unknown, revoked or expired.
          headers:
            WWW-Authenticate:
              schema:
                example: Bearer
                type: string
        '404':
          content:
            application/problem+json:
              example:
                code: not_found
                detail: Nothing here that this API key can read.
                instance: example-request-id
                status: 404
                title: Not Found
                type: about:blank
              schema:
                $ref: '#/components/schemas/Problem'
          description: No such brand or answer, or the key's owner cannot read it.
        '409':
          content:
            application/problem+json:
              example:
                code: workspace_archived
                detail: The API key's organization is archived.
                instance: example-request-id
                status: 409
                title: Conflict
                type: about:blank
              schema:
                $ref: '#/components/schemas/Problem'
          description: The API key's organization is archived.
        '422':
          content:
            application/problem+json:
              example:
                code: invalid_request
                detail: The request's parameters are invalid; `errors` names each one.
                errors:
                  - loc:
                      - query
                      - limit
                    msg: Input should be less than or equal to 100
                    type: less_than_equal
                instance: example-request-id
                status: 422
                title: Unprocessable Content
                type: about:blank
              schema:
                $ref: '#/components/schemas/ValidationProblem'
          description: A path or query parameter is invalid.
        '429':
          content:
            application/problem+json:
              example:
                code: rate_limited
                detail: >-
                  This caller is past its requests for the minute. Retry after
                  the seconds in Retry-After.
                instance: example-request-id
                rate_limit:
                  limit: 120
                  remaining: 0
                  reset: 60
                  window: 60
                status: 429
                title: Too Many Requests
                type: about:blank
              schema:
                $ref: '#/components/schemas/RateLimitProblem'
          description: The API key made more than 120 requests in the minute.
          headers:
            Retry-After:
              description: Seconds until the key may call again.
              schema:
                example: 60
                type: integer
      security:
        - apiKey: []
components:
  schemas:
    V1Usage:
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
          description: Normalized query and newest included scan.
        organization_id:
          format: uuid
          title: Organization Id
          type: string
        usage:
          $ref: '#/components/schemas/WorkspaceUsage'
      required:
        - meta
        - organization_id
        - usage
      title: V1Usage
      type: object
    Problem:
      description: |-
        An RFC 9457 problem. `type` is always `about:blank`, so `title` is the
        status's name, and `code` is what a client branches on.
      properties:
        code:
          title: Code
          type: string
        detail:
          title: Detail
          type: string
        instance:
          default: ''
          title: Instance
          type: string
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          const: about:blank
          default: about:blank
          title: Type
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
        - instance
      title: Problem
      type: object
    ValidationProblem:
      properties:
        code:
          title: Code
          type: string
        detail:
          title: Detail
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ValidationIssue'
          title: Errors
          type: array
        instance:
          default: ''
          title: Instance
          type: string
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          const: about:blank
          default: about:blank
          title: Type
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
        - instance
        - errors
      title: ValidationProblem
      type: object
    RateLimitProblem:
      properties:
        code:
          title: Code
          type: string
        detail:
          title: Detail
          type: string
        instance:
          default: ''
          title: Instance
          type: string
        rate_limit:
          $ref: '#/components/schemas/RateLimitValues'
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          const: about:blank
          default: about:blank
          title: Type
          type: string
      required:
        - type
        - title
        - status
        - detail
        - code
        - instance
        - rate_limit
      title: RateLimitProblem
      type: object
    Meta:
      properties:
        data_as_of:
          anyOf:
            - $ref: '#/components/schemas/DataAsOf'
            - type: 'null'
        query:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          title: Query
          type: object
      required:
        - query
        - data_as_of
      title: Meta
      type: object
    WorkspaceUsage:
      properties:
        agent_answers:
          anyOf:
            - $ref: '#/components/schemas/AgentAnswers'
            - type: 'null'
        brands:
          default: []
          items:
            $ref: '#/components/schemas/UsageBrand'
          title: Brands
          type: array
        content_credits:
          $ref: '#/components/schemas/UsageContentCredits'
        entitlement_source:
          anyOf:
            - enum:
                - stripe
                - partner
              type: string
            - type: 'null'
          title: Entitlement Source
        included_managed_accounts:
          title: Included Managed Accounts
          type: integer
        manager_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Manager Name
        month_start:
          title: Month Start
          type: string
        paid_by:
          default: self
          enum:
            - self
            - manager
            - partner
          title: Paid By
          type: string
        period_end:
          title: Period End
          type: string
        period_start:
          title: Period Start
          type: string
        plan:
          anyOf:
            - enum:
                - core
                - plus
              type: string
            - type: 'null'
          title: Plan
        prompts:
          $ref: '#/components/schemas/UsagePrompts'
      required:
        - month_start
        - period_start
        - period_end
        - entitlement_source
        - plan
        - paid_by
        - manager_name
        - included_managed_accounts
        - prompts
        - content_credits
        - agent_answers
        - brands
      title: WorkspaceUsage
      type: object
    ValidationIssue:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Loc
          type: array
        msg:
          title: Msg
          type: string
        type:
          title: Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationIssue
      type: object
    RateLimitValues:
      properties:
        limit:
          title: Limit
          type: integer
        remaining:
          title: Remaining
          type: integer
        reset:
          title: Reset
          type: integer
        window:
          title: Window
          type: integer
      required:
        - limit
        - window
        - remaining
        - reset
      title: RateLimitValues
      type: object
    DataAsOf:
      properties:
        completed_at:
          format: date-time
          title: Completed At
          type: string
        id:
          format: uuid
          title: Id
          type: string
      required:
        - id
        - completed_at
      title: DataAsOf
      type: object
    JsonValue: {}
    AgentAnswers:
      properties:
        cap:
          anyOf:
            - type: integer
            - type: 'null'
          title: Cap
        used:
          title: Used
          type: integer
      required:
        - used
        - cap
      title: AgentAnswers
      type: object
    UsageBrand:
      description: |-
        One live brand's part of the two meters. A null reservation is a brand
        drawing on the shared pool.
      properties:
        brand_id:
          title: Brand Id
          type: string
        credits_left:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Left
        credits_reserved:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Reserved
        credits_used:
          title: Credits Used
          type: integer
        domain:
          title: Domain
          type: string
        paused:
          title: Paused
          type: boolean
        prompts_reserved:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompts Reserved
        prompts_used:
          title: Prompts Used
          type: integer
      required:
        - brand_id
        - domain
        - paused
        - prompts_used
        - prompts_reserved
        - credits_used
        - credits_reserved
        - credits_left
      title: UsageBrand
      type: object
    UsageContentCredits:
      description: >-
        A balance and a spend history, which are different questions.


        `balance` is what is left to spend now; `months` is what was spent, and
        a

        month a workspace bought credits in shows the spend, not the purchase.

        `purchased_balance` is the part of `balance` a pack paid for, spent
        after

        the allowance and never expiring with the period (#2367): the page draws

        one bar and splits the balance in its note.
      properties:
        balance:
          title: Balance
          type: integer
        in_reserve:
          title: In Reserve
          type: integer
        included_per_month:
          title: Included Per Month
          type: integer
        months:
          items:
            $ref: '#/components/schemas/UsageCreditMonth'
          title: Months
          type: array
        next_top_up_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Top Up At
        purchased_balance:
          title: Purchased Balance
          type: integer
        used_this_month:
          title: Used This Month
          type: integer
        used_this_period:
          title: Used This Period
          type: integer
      required:
        - balance
        - purchased_balance
        - included_per_month
        - used_this_month
        - used_this_period
        - in_reserve
        - months
        - next_top_up_at
      title: UsageContentCredits
      type: object
    UsagePrompts:
      description: >-
        The organization's slots: how many its brands track together, of the

        pool the plan sizes. A prompt tracked in a second segment spends a
        second

        slot.
      properties:
        free:
          anyOf:
            - type: integer
            - type: 'null'
          title: Free
        pool:
          title: Pool
          type: integer
        used:
          title: Used
          type: integer
      required:
        - used
        - pool
        - free
      title: UsagePrompts
      type: object
    UsageCreditMonth:
      properties:
        month:
          title: Month
          type: string
        used:
          title: Used
          type: integer
      required:
        - month
        - used
      title: UsageCreditMonth
      type: object
  securitySchemes:
    apiKey:
      description: 'An API key, sent as `Authorization: Bearer hrld_...`.'
      scheme: bearer
      type: http

````

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