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

# API Reference

> Authenticate, resolve entities, query data, run analytics, and discover metadata via the Credit Benchmark REST API.

Credit Benchmark APIs provide programmatic access to entity resolution, raw entity-level data, computed analytics, and metadata for integration into risk workflows and reporting pipelines. All routes are relative to `https://gateway.creditbenchmark.com`.

<Tip title="Quick start">
  Authenticate with `POST /api/security/token`. If you already have `CB_ID` values, skip entity resolution and go straight to `POST /analytics/v2/data/getdata` or the analytics routes under `/analytics/v2/data/`.
</Tip>

## How it works

<Steps>
  <Step title="Get a token">
    Call `POST /api/security/token` with your `Username` and `Password`. Reuse the returned bearer token until it expires.
  </Step>

  <Step title="Resolve entities (if needed)">
    If your source data uses company names rather than CB identifiers, call `POST /matching/text/match_external` to resolve them. Keep the matched identifiers as `CB_ID` values for analytics calls.
  </Step>

  <Step title="Check available fields">
    Call `GET /analytics/v2/metadata/columns` to see which fields, data types, and entitlements are available before building requests.
  </Step>

  <Step title="Query analytics">
    Start with `POST /analytics/v2/data/getdata` for row-level output. Use the specific analytics endpoints for trends, breakdowns, rating changes, and distributions.
  </Step>

  <Step title="Discover metadata">
    Use the metadata routes under `/analytics/v2/metadata/` for available columns, rating scales, industry and geography schemas, and effective dates.
  </Step>
</Steps>
