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

# Count volumes

> Returns organization-wide volume counts, the effective count limit, and available storage measurements. Volumes awaiting deletion cleanup are counted separately. Counts and lists are separate live reads.



## OpenAPI

````yaml /sailbox-openapi.json get /sailbox-volumes/counts
openapi: 3.1.0
info:
  title: Sail Sailbox API
  version: '2026-10-04'
  description: >-
    Create and operate Sailboxes over HTTP. Sailboxes are fast-booting virtual
    machines that you can pause, resume, and checkpoint.


    Run commands, stream files, manage lifecycle and networking, and inspect
    usage. Turning on SSH and building an image still require an SDK or the CLI.
    See the [HTTP API guide](/sailboxes-http-api).
servers:
  - url: https://sailbox-api.sailresearch.com/v1
security:
  - BearerAuth: []
tags:
  - name: Apps
    description: Groups that own Sailboxes. One app per workload.
  - name: Lifecycle
    description: >-
      A Sailbox's whole life: create it, watch it, stop and start it, terminate
      it.
  - name: Checkpoints
    description: Save a Sailbox to start from later, and copy a running one.
  - name: Image builds
    description: >-
      Watch and cancel the image builds your organization starts with an SDK or
      the CLI.
  - name: Exec
    description: Run commands and control their standard input and terminals.
  - name: Files
    description: Stream regular files into and out of a Sailbox.
  - name: Networking
    description: >-
      Publish ports, serve them on hostnames you own, and identify a Sailbox to
      other Sailboxes.
  - name: Secrets
    description: >-
      Organization and personal values that egress policy rules can add to
      matching requests. Sail never returns a stored value.
  - name: Egress policies
    description: >-
      What a Sailbox may connect to, and what happens to the HTTPS requests it
      sends.
  - name: Volumes
    description: >-
      Shared storage that outlives any one Sailbox. Alpha: these endpoints can
      still change.
  - name: SSH access
    description: Certificates for connecting to a Sailbox with `ssh`.
  - name: Usage
    description: Resource usage and spend.
  - name: Identity
    description: Who your API key belongs to.
paths:
  /sailbox-volumes/counts:
    get:
      tags:
        - Volumes
      summary: Count volumes
      description: >-
        Returns organization-wide volume counts, the effective count limit, and
        available storage measurements. Volumes awaiting deletion cleanup are
        counted separately. Counts and lists are separate live reads.
      operationId: getVolumeCounts
      responses:
        '200':
          description: Current volume counts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VolumeCounts'
        '400':
          description: >-
            The request was rejected. See the error message for the offending
            field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: memory_limit_mib must be between 16384 and 262144
                  type: invalid_request_error
                  param: null
                  code: null
        '401':
          description: The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Invalid API key
                  type: authentication_error
                  param: null
                  code: invalid_api_key
        '402':
          description: >-
            The organization is out of credits. The error carries a
            `billing_url` pointing at the page where you add them. Retry once
            you have.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: >-
                    Your API key has been disabled due to insufficient credits.
                    Visit https://app.sailresearch.com/billing to add credits.
                  type: billing_error
                  param: null
                  code: credits_exhausted
                  billing_url: https://app.sailresearch.com/billing
        '403':
          description: The API key is not allowed to perform this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: sailboxes require an organization-scoped API key
                  type: permission_error
                  param: null
                  code: null
        '429':
          description: >-
            For its first ten minutes a new organization is capped on how many
            requests it can have in flight at once, and yours is over that cap.
            The request never started, so retry it unchanged after the delay in
            the `Retry-After` header. The limit clears as those requests finish.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: >-
                    Too many concurrent requests. Please retry after some of
                    your organization's in-flight requests complete.
                  type: rate_limit_error
                  param: null
                  code: rate_limited
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: failed to fetch sailbox
                  type: server_error
                  param: null
                  code: null
        '503':
          description: >-
            Sail is momentarily unavailable. Retry after the delay in the
            `Retry-After` header when one is present, and with backoff
            otherwise.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  message: Authentication service unavailable
                  type: server_error
                  param: null
                  code: null
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
components:
  schemas:
    VolumeCounts:
      type: object
      required:
        - total
        - ready
        - provisioning
        - failed
        - deleting
        - volume_count
        - volume_limit
        - used_bytes
        - measured_volume_count
        - latest_storage_sampled_at
      properties:
        total:
          type: integer
          format: int64
          minimum: 0
          description: >-
            All non-deleted managed volumes in your organization, including
            volumes not yet ready.
        ready:
          type: integer
          format: int64
          minimum: 0
          description: Ready, non-deleted managed volumes available to list and mount.
        provisioning:
          type: integer
          format: int64
          minimum: 0
          description: Non-deleted managed volumes being provisioned.
        failed:
          type: integer
          format: int64
          minimum: 0
          description: Non-deleted managed volumes in the failed state.
        deleting:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Managed volumes awaiting deletion cleanup, counted separately from
            total.
        volume_count:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Count used to enforce volume creation limits, including legacy
            volumes.
        measured_volume_count:
          type: integer
          format: int64
          minimum: 0
          description: How many managed volumes contributed a recent storage measurement.
        volume_limit:
          oneOf:
            - type: integer
              minimum: 1
            - type: 'null'
          description: Effective organization volume count limit, or null when unlimited.
        used_bytes:
          oneOf:
            - type: integer
              format: int64
              minimum: 0
            - type: 'null'
          description: >-
            Sum of recent measurements. This is a subtotal when
            measured_volume_count is smaller than total. Returns zero for an
            empty inventory and null when a nonempty inventory has no recent
            measurements.
        latest_storage_sampled_at:
          oneOf:
            - type: string
              format: date-time
            - type: 'null'
          description: Newest measurement included in used_bytes, or null without a sample.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorObject'
    ErrorObject:
      type: object
      required:
        - message
        - type
        - param
        - code
      properties:
        message:
          type: string
          description: Human-readable description of what went wrong.
        type:
          type: string
          description: >-
            Error category: `invalid_request_error`, `authentication_error`,
            `permission_error`, `billing_error`, `not_found_error`,
            `conflict_error`, `rate_limit_error`, `quota_exceeded_error`,
            `not_implemented_error`, or `server_error`.
        param:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            The request field the error refers to, when the error is about one
            field.
        code:
          oneOf:
            - type: string
            - type: integer
            - type: 'null'
          description: >-
            Stable short code for the error, when one applies. Errors relayed
            from the Sailbox runtime carry its status token, for example
            `already_exists` or `failed_precondition` on a 409, which the HTTP
            status alone does not distinguish.
        billing_url:
          type: string
          format: uri
          description: Page where you add credits. Sent with a 402.
      additionalProperties: true
  headers:
    RetryAfter:
      description: >-
        How many seconds to wait before retrying. On a 429 it also means the
        request never started, so the retry can reuse the same
        `Idempotency-Key`.
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````