---
updatedAt: 2026-09-09T12:37:08.000Z
agentTools:
  projectIndex: https://developer.doit.com/llms.txt
---

# Get a GCP billing account

Returns a single GCP Billing Account with the same list-item fields as List GCP Billing Accounts, plus the Overview time series. Use this when you need a single billing account's Console Overview in one call (identity and onboarding status, 30-day ESR and savings, YTD/lifetime totals, CUD export health, and the data behind Cost Summary and CUD Coverage charts) without fetching every billing account.

Fields that drive the Overview tab in the DoiT console — each is an array with one entry per product line (`service` of `compute` or `cloud_sql`):
- `stats30d`: last 30 days ESR and realized savings per product line (ESR and Savings cards).
- `monthlyStats`: last 6 calendar months of ESR, on-demand cost, and cost with savings per product line (Cost Summary chart, and month-over-month card trends).
- `dailyCoverage`: last 30 days of CUD coverage breakdown per product line (CUD Coverage chart).
- `savingsTotals`: year-to-date and lifetime realized savings per product line (shown under the Savings card). Lifetime is bounded by PerfectScale for Commitments onboarding start.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DoiT Cloud Intelligence",
    "description": "Programmatic access to DoiT Platform",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.doit.com"
    }
  ],
  "security": [
    {
      "api_key": []
    },
    {
      "tenantId": [],
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "PerfectScale for Commitments GCP",
      "description": "Evaluate current GCP commitments, plan and automate purchases, and optimize cloud costs with PerfectScale for Commitments."
    }
  ],
  "paths": {
    "/ps4commitments/v1/gcp/billing-accounts/{billingAccountId}": {
      "get": {
        "operationId": "getGcpBillingAccount",
        "tags": [
          "PerfectScale for Commitments GCP"
        ],
        "summary": "Get a GCP billing account",
        "description": "Returns a single GCP Billing Account with the same list-item fields as List GCP Billing Accounts, plus the Overview time series. Use this when you need a single billing account's Console Overview in one call (identity and onboarding status, 30-day ESR and savings, YTD/lifetime totals, CUD export health, and the data behind Cost Summary and CUD Coverage charts) without fetching every billing account.\n\nFields that drive the Overview tab in the DoiT console — each is an array with one entry per product line (`service` of `compute` or `cloud_sql`):\n- `stats30d`: last 30 days ESR and realized savings per product line (ESR and Savings cards).\n- `monthlyStats`: last 6 calendar months of ESR, on-demand cost, and cost with savings per product line (Cost Summary chart, and month-over-month card trends).\n- `dailyCoverage`: last 30 days of CUD coverage breakdown per product line (CUD Coverage chart).\n- `savingsTotals`: year-to-date and lifetime realized savings per product line (shown under the Savings card). Lifetime is bounded by PerfectScale for Commitments onboarding start.",
        "parameters": [
          {
            "$ref": "#/components/parameters/tenantId"
          },
          {
            "$ref": "#/components/parameters/billingAccountId"
          }
        ],
        "responses": {
          "200": {
            "description": "Single GCP Billing Account details (same list-item fields as provided for the billing account through list GCP billing accounts operation) and overview time series: 6 months stats and 30 days of CUD coverage.",
            "headers": {
              "Request-Id": {
                "$ref": "#/components/headers/RequestId"
              },
              "Content-Language": {
                "$ref": "#/components/headers/ContentLanguage"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GcpBillingAccountDetail"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "$ref": "#/components/responses/ServiceUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GcpOnboardingStatusEntry": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "description": "Current onboarding lifecycle stage for this product line.",
            "enum": [
              "not_started",
              "onboarding",
              "done",
              "error"
            ],
            "x-enumDescriptions": {
              "not_started": "This commitment type has not begun onboarding.",
              "onboarding": "Onboarding is in progress (inventory and models still initializing).",
              "done": "Onboarding completed, commitments and recommendations are available.",
              "error": "Onboarding failed, check the DoiT Console or contact support for remediation."
            }
          },
          "onboardingStartedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When PerfectScale for Commitments first began tracking commitments for this commitment type. Bounds lifetime savings totals and onboarding history in the DoiT Console. Omitted or null when onboarding has not started.",
            "nullable": true
          }
        }
      },
      "GcpOnboardingStatusByService": {
        "description": "Onboarding status entry for one product line. When `done`, inventory and recommendations for that commitment type are available.",
        "allOf": [
          {
            "$ref": "#/components/schemas/GcpOnboardingStatusEntry"
          },
          {
            "type": "object",
            "required": [
              "service"
            ],
            "properties": {
              "service": {
                "type": "string",
                "enum": [
                  "compute",
                  "cloud_sql"
                ],
                "description": "Product line this onboarding status belongs to."
              }
            }
          }
        ]
      },
      "GcpBillingAccount": {
        "type": "object",
        "required": [
          "billingAccountId"
        ],
        "properties": {
          "billingAccountId": {
            "type": "string",
            "description": "GCP Billing Account ID.",
            "example": "01D4A2-4E3F1B-9C72A0"
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable account name, if available. Defaults to the GCP Billing Account display name; may be overridden by a custom name set on the asset in the DoiT Console. Null when no name is available.",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 currency code for this billing account.",
            "nullable": true,
            "example": "USD"
          },
          "onboardingStatus": {
            "type": "array",
            "description": "PerfectScale for Commitments onboarding status per product line (`compute`, `cloud_sql`), ordered `compute` first. A product line is omitted when it is not onboarded; the field is absent when no product line is onboarded.",
            "items": {
              "$ref": "#/components/schemas/GcpOnboardingStatusByService"
            }
          },
          "cudExportHealthy": {
            "type": "boolean",
            "description": "`true` if the BigQuery CUD export is healthy and up to date.",
            "nullable": true
          },
          "commitmentsSyncTime": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the last successful CUD inventory sync. Null when a sync has not completed yet.",
            "nullable": true
          },
          "stats30d": {
            "type": "array",
            "description": "Trailing 30-day aggregate metrics (`esr`, `savings`) per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has stats.",
            "items": {
              "$ref": "#/components/schemas/GcpStats30dByService"
            }
          },
          "savingsTotals": {
            "type": "array",
            "description": "Year-to-date and lifetime savings per product line (`compute`, `cloud_sql`), ordered `compute` first; absent when no product line has totals. Same values as returned by `GET /ps4commitments/v1/gcp/billing-accounts/{billingAccountId}` for this billing account, so callers can sum totals across billing accounts without making an extra get-by-id call per billing account. Lifetime is bounded by each billing account's PerfectScale for Commitments onboarding start date.",
            "items": {
              "$ref": "#/components/schemas/GcpSavingsTotalsByService"
            }
          }
        }
      },
      "GcpMonthlyStatsEntry": {
        "type": "object",
        "required": [
          "month",
          "esr",
          "onDemandCost",
          "costWithSavings"
        ],
        "description": "One calendar-month aggregate for the billing account. Money fields are wrapped objects (`{amount, currency}`).",
        "properties": {
          "month": {
            "type": "string",
            "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
            "description": "Calendar month in `YYYY-MM` form (UTC).",
            "example": "2025-06"
          },
          "esr": {
            "type": "number",
            "format": "double",
            "description": "Effective Savings Rate (ESR) for the month, as a fraction from 0 to 1. Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost."
          },
          "onDemandCost": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Eligible on-demand cost for the month. On-demand cost is eligible cloud spend priced at full on-demand rates, that is, not discounted by a commitment."
          },
          "costWithSavings": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Actual cost after commitments for the month."
          }
        }
      },
      "GcpDailyCoverageEntry": {
        "type": "object",
        "required": [
          "date"
        ],
        "description": "One day of CUD coverage breakdown. Money fields are wrapped objects (`{amount, currency}`). Which cost properties are present depends on the product line of the enclosing entry — `compute` rows carry every property except `cloudSql`; `cloud_sql` rows carry only `cloudSql` and `onDemand`. A property that belongs to the product line is present even when the amount is `0.00`.",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Calendar day (UTC) for this coverage row in format YYYY-MM-DD."
          },
          "computeFlexible": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Compute Flexible CUDs for the day."
          },
          "cloudRun": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Cloud Run CUDs for the day."
          },
          "bigQuery": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by BigQuery CUDs for the day."
          },
          "bigtable": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Bigtable CUDs for the day."
          },
          "cloudSql": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Cloud SQL CUDs for the day."
          },
          "cloudFirestore": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Cloud Firestore CUDs for the day."
          },
          "cloudSpanner": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Cloud Spanner CUDs for the day."
          },
          "memorystoreForRedis": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Memorystore for Redis CUDs for the day."
          },
          "alloyDb": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by AlloyDB CUDs for the day."
          },
          "backupForOracle": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Google Cloud Backup and DR for Oracle CUDs for the day."
          },
          "kafka": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by Kafka CUDs for the day."
          },
          "resourceBased": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Spend covered by resource-based (vCPU / memory) CUDs for the day."
          },
          "onDemand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "On-demand spend not covered by any CUD for the day."
          }
        }
      },
      "GcpStats30dByService": {
        "description": "Trailing 30-day aggregate metrics for one product line.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Stats30dSummary"
          },
          {
            "type": "object",
            "required": [
              "service"
            ],
            "properties": {
              "service": {
                "type": "string",
                "enum": [
                  "compute",
                  "cloud_sql"
                ],
                "description": "Product line these metrics belong to."
              }
            }
          }
        ]
      },
      "GcpSavingsTotalsByService": {
        "description": "Year-to-date and lifetime realized savings for one product line.",
        "allOf": [
          {
            "$ref": "#/components/schemas/GcpSavingsTotals"
          },
          {
            "type": "object",
            "required": [
              "service"
            ],
            "properties": {
              "service": {
                "type": "string",
                "enum": [
                  "compute",
                  "cloud_sql"
                ],
                "description": "Product line these savings totals belong to."
              }
            }
          }
        ]
      },
      "GcpMonthlyStatsByService": {
        "type": "object",
        "description": "Trailing 6 calendar months of billing account stats for one product line.",
        "required": [
          "service",
          "months"
        ],
        "properties": {
          "service": {
            "type": "string",
            "enum": [
              "compute",
              "cloud_sql"
            ],
            "description": "Product line these monthly stats belong to."
          },
          "months": {
            "type": "array",
            "description": "Monthly aggregates, sorted ascending by `month`.",
            "items": {
              "$ref": "#/components/schemas/GcpMonthlyStatsEntry"
            }
          }
        }
      },
      "GcpDailyCoverageByService": {
        "type": "object",
        "description": "Trailing 30 days of CUD coverage for one product line. `compute` entries carry every cost property except `cloudSql`; `cloud_sql` entries carry only `cloudSql` and `onDemand`, so each coverage sub-type appears exactly once across the array.",
        "required": [
          "service",
          "days"
        ],
        "properties": {
          "service": {
            "type": "string",
            "enum": [
              "compute",
              "cloud_sql"
            ],
            "description": "Product line this coverage series belongs to."
          },
          "days": {
            "type": "array",
            "description": "Daily coverage rows, sorted ascending by `date`.",
            "items": {
              "$ref": "#/components/schemas/GcpDailyCoverageEntry"
            }
          }
        }
      },
      "GcpSavingsTotals": {
        "type": "object",
        "required": [
          "ytd",
          "lifetime"
        ],
        "description": "Running savings figures derived server-side from the full monthly stats history, as the sum of `onDemandCost - costWithSavings` per month. `lifetime` starts at PerfectScale for Commitments onboarding; `ytd` starts at the later of January 1 of the current year and onboarding. Months before the bound are excluded; the bound month and the current month are prorated.",
        "properties": {
          "ytd": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Year-to-date realized savings."
          },
          "lifetime": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Lifetime realized savings since onboarding."
          }
        }
      },
      "GcpBillingAccountDetail": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GcpBillingAccount"
          },
          {
            "type": "object",
            "properties": {
              "monthlyStats": {
                "type": "array",
                "description": "Trailing 6 calendar months of billing account stats per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has stats.",
                "items": {
                  "$ref": "#/components/schemas/GcpMonthlyStatsByService"
                }
              },
              "dailyCoverage": {
                "type": "array",
                "description": "Trailing 30 days of CUD coverage per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has coverage data.",
                "items": {
                  "$ref": "#/components/schemas/GcpDailyCoverageByService"
                }
              }
            }
          }
        ]
      },
      "ProblemDetails": {
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "retryable"
        ],
        "additionalProperties": true,
        "description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "example": "https://developer.doit.com/errors/not_found"
          },
          "title": {
            "type": "string",
            "example": "Resource not found"
          },
          "status": {
            "type": "integer",
            "example": 404
          },
          "detail": {
            "type": "string",
            "example": "customer not found"
          },
          "instance": {
            "type": "string",
            "format": "uri",
            "example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
          },
          "code": {
            "type": "string",
            "pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
            "example": "not_found"
          },
          "retryable": {
            "type": "boolean",
            "example": false
          },
          "details": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "issue"
              ],
              "properties": {
                "issue": {
                  "type": "string",
                  "pattern": "^[a-z][a-z0-9_]*$"
                },
                "field": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          },
          "docsUrl": {
            "type": "string",
            "format": "uri",
            "nullable": true
          }
        }
      },
      "Money": {
        "type": "object",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
            "description": "Decimal monetary amount at ISO 4217 minor-unit precision (string).",
            "example": "100.00"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "description": "ISO 4217 currency code.",
            "example": "USD"
          }
        }
      },
      "Stats30dSummary": {
        "type": "object",
        "description": "Minimal 30-day aggregate. Only `esr` and `savings` are persisted at this granularity. Responses are denominated in USD.",
        "properties": {
          "esr": {
            "type": "number",
            "format": "double",
            "description": "Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, `0.187` is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available.",
            "nullable": true,
            "example": 0.187
          },
          "savings": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Money"
              }
            ],
            "description": "Total savings realized over the last 30 days from active commitments (USD)."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Syntactically malformed request, missing required parameter, or unsupported parameter value.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "examples": {
              "validationFailed": {
                "summary": "Missing or invalid parameter",
                "value": {
                  "type": "https://developer.doit.com/errors/validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "detail": "The request is missing a required parameter or contains an invalid value.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "validation_failed",
                  "retryable": false
                }
              },
              "tenantIdRequired": {
                "summary": "Tenant scope not resolvable",
                "value": {
                  "type": "https://developer.doit.com/errors/tenant_id_required",
                  "title": "Tenant ID required",
                  "status": 400,
                  "detail": "X-Tenant-Id header is required when the credential can access more than one tenant.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "tenant_id_required",
                  "retryable": false
                }
              },
              "tenantIdMismatch": {
                "summary": "Header conflicts with the key's tenant",
                "value": {
                  "type": "https://developer.doit.com/errors/tenant_id_mismatch",
                  "title": "Tenant ID mismatch",
                  "status": 400,
                  "detail": "X-Tenant-Id does not match the tenant the credential is scoped to.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "tenant_id_mismatch",
                  "retryable": false
                }
              },
              "gcpServiceRequired": {
                "summary": "GCP region filter without commitment type",
                "value": {
                  "type": "https://developer.doit.com/errors/gcp_service_required",
                  "title": "GCP service required",
                  "status": 400,
                  "detail": "The region query parameter requires gcp_service.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "gcp_service_required",
                  "retryable": false
                }
              },
              "paginationTokenInvalid": {
                "summary": "Structurally invalid pagination cursor",
                "value": {
                  "type": "https://developer.doit.com/errors/pagination_token_invalid",
                  "title": "Invalid pagination token",
                  "status": 400,
                  "detail": "The pageToken cursor is structurally invalid (decode failure or tampering).",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "pagination_token_invalid",
                  "retryable": false
                }
              },
              "paginationTokenExpired": {
                "summary": "Expired pagination cursor",
                "value": {
                  "type": "https://developer.doit.com/errors/pagination_token_expired",
                  "title": "Expired pagination token",
                  "status": 400,
                  "detail": "The pageToken cursor is no longer valid; restart pagination from the beginning.",
                  "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
                  "code": "pagination_token_expired",
                  "retryable": false
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing or invalid credentials.",
        "headers": {
          "WWW-Authenticate": {
            "description": "Bearer challenge per RFC 6750.",
            "schema": {
              "type": "string",
              "example": "Bearer realm=\"api.doit.com\""
            }
          },
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/unauthorized",
              "title": "Unauthorized",
              "status": 401,
              "detail": "missing or invalid bearer token",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "unauthorized",
              "retryable": false
            }
          }
        }
      },
      "Forbidden": {
        "description": "Authenticated but not authorized to perform this request.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/forbidden",
              "title": "Forbidden",
              "status": 403,
              "detail": "caller does not have permission to access this customer's commitments",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "forbidden",
              "retryable": false
            }
          }
        }
      },
      "NotFound": {
        "description": "The requested resource does not exist.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/not_found",
              "title": "Resource not found",
              "status": 404,
              "detail": "organization not found",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "not_found",
              "retryable": false
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Unexpected server error.",
        "headers": {
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/internal_error",
              "title": "Internal server error",
              "status": 500,
              "detail": "an unexpected error occurred",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "internal_error",
              "retryable": true
            }
          }
        }
      },
      "ServiceUnavailable": {
        "description": "Service temporarily unavailable; retry after the indicated delay.",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer",
              "example": 30
            }
          },
          "Request-Id": {
            "$ref": "#/components/headers/RequestId"
          },
          "Content-Language": {
            "$ref": "#/components/headers/ContentLanguage"
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            },
            "example": {
              "type": "https://developer.doit.com/errors/service_unavailable",
              "title": "Service unavailable",
              "status": 503,
              "detail": "entitlement check temporarily unavailable",
              "instance": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9",
              "code": "service_unavailable",
              "retryable": true
            }
          }
        }
      }
    },
    "parameters": {
      "billingAccountId": {
        "in": "path",
        "name": "billingAccountId",
        "required": true,
        "description": "GCP Billing Account ID (format `XXXXXX-XXXXXX-XXXXXX`; the account that owns the CUDs) that scopes the request.",
        "schema": {
          "type": "string",
          "pattern": "^[A-Z0-9]{6}-[A-Z0-9]{6}-[A-Z0-9]{6}$",
          "example": "01D4A2-4E3F1B-9C72A0"
        }
      },
      "tenantId": {
        "in": "header",
        "name": "X-Tenant-Id",
        "required": false,
        "description": "Customer (tenant) ID for the request. This is separate from authentication: you still pass your personal or service account API token in the `Authorization` header (`Bearer <token>`). See [Get Started](https://developer.doit.com/docs/start).\n\n**When to omit (most callers):** If your personal or service account token belongs to a single customer, omit this header. The API resolves that customer from the token.\n\n**When to send:** If your credential can access more than one customer, set `X-Tenant-Id` to the customer ID you want to act on. A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "schema": {
          "type": "string",
          "example": "Kp2mN8qL4vR0sT1wX3yZ"
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "description": "Use the \"Bearer <API_KEY>\" format or sign in for autofill",
        "in": "header"
      },
      "tenantId": {
        "type": "apiKey",
        "name": "X-Tenant-Id",
        "description": "Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "in": "header"
      }
    },
    "headers": {
      "RequestId": {
        "description": "DoiT request identifier for support and log correlation. Format `req_<ULID>`.",
        "schema": {
          "type": "string",
          "pattern": "^req_[0-9A-HJKMNP-TV-Z]{26}$",
          "example": "req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
        }
      },
      "ContentLanguage": {
        "description": "Language of the response body. Always `en` for this API.",
        "schema": {
          "type": "string",
          "enum": [
            "en"
          ]
        }
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "go",
    "node",
    "python"
  ],
  "x-cli-config": {
    "security": "oauth2",
    "params": {
      "client_id": "cli"
    }
  }
}
```