# API access and contracts

Use a deployment-approved API contract when building a programmatic client. The public documentation currently provides provider setup and operating guidance; it does not publish a versioned CloudVerse OpenAPI specification, public SDK or self-service API-key workflow.

## Obtain the contract before implementation

Ask your CloudVerse administrator or agreed technical support contact for:

| Contract item | Required detail |
|---|---|
| Endpoint | Approved gateway base URL, API version and supported operations |
| Authentication | Supported client identity, token acquisition, audience, expiry and renewal |
| Authorization | Organization scope, permissions and allowed accounts/resources |
| Request schema | Filter names, date/time conventions, pagination and maximum page size |
| Response schema | Currency, units, cost basis, nullability, coverage and freshness fields |
| Failure behavior | Error format, request identifier, retryability, timeout and rate-limit handling |
| Compatibility | Version policy, change notification and deprecation process |
| Test scope | Approved organization and representative source/report sample |

Confirm the operation is part of the supported external contract. A route seen in browser traffic, an internal controller or an ingestion worker is not automatically an external API. Do not call internal collection, administrative or execution endpoints from a third-party client.

## Implement a reporting client

1. Begin with an authorized read operation and an explicit account/date scope.
2. Load credentials through your approved secret mechanism. Keep them out of URLs, source control and diagnostics.
3. Use the contract's pagination and bounded query windows. Preserve stable identifiers across pages.
4. Validate both the HTTP status and the response's availability, coverage and freshness. HTTP 200 can still carry an unavailable measure.
5. Preserve decimals, currency, units and nulls. Follow [data semantics](data-and-reconciliation.md) before aggregating.
6. Apply bounded retries only to errors the contract marks retryable. Respect rate-limit instructions and use backoff; do not retry authorization failures indefinitely.
7. For writes, require the operation's documented idempotency and approval rules before enabling retries.
8. Verify a representative response against the authenticated product view and source evidence.

## Keep these identities separate

Provider OAuth credentials authorize CloudVerse to read that provider. A browser session authorizes an interactive user. Neither should be repurposed as an unattended API credential. Caller-supplied organization or user headers are not proof of identity.

For provider-native API permissions and data sources, use the [engineering provider library](../integrations/providers/engineering.md). For the documentation itself, use the [machine-readable indexes](../reference/index.md#ai-agent-entry-points).
