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

# API overview

> How the Partner API relates to the RaiseGate app, and how the resources fit together.

The Partner API is a second set of routes in the same Next.js application as the RaiseGate UI. It is **not a proxy** in front of the UI's `/api/tracker/*` routes. It calls the same shared tracker functions (`lib/tracker/*`: entity creation and updates, alert-policy compilation, profile enrichment), reads and writes the same Supabase tables, and triggers the same Python tracker backend.

As a result:

* A company created through the API is indistinguishable from one created in the UI: it is enriched, scheduled, scraped, classified and alerted on the same way, and it appears in the UI.
* Lead decisions are shared. Accepting, rejecting or tracking a lead through the API shows as decided in the UI, and decisions made in the UI are visible through the API.
* The API adds only what an external client needs on top: machine credentials, input validation, stable JSON shapes, idempotent creation, cursor pagination, fuzzy entity and sector lookup, compact views and rate limits.

<Note>
  Because a few UI steps are re-implemented rather than shared (forcing the email action onto compiled alert rules, the lead "Track" mapping, the lead decision key), changes to those UI behaviours must be mirrored in `lib/partner-api/`.
</Note>

## Resources

<Columns cols={2}>
  <Card title="Tracker" icon="radar" href="/platform/tracker">
    Same entities as the Tracker UI in `rg-v2`.
  </Card>

  <Card title="Signals" icon="activity" href="/conventions">
    One analysed run per company. Compact by default.
  </Card>

  <Card title="Alerts" icon="bell" href="/operations">
    Whether a run emailed the VC, and why.
  </Card>

  <Card title="Leads" icon="user-plus" href="/platform/leads">
    Same inbox as `/leads` in the app.
  </Card>
</Columns>

## Interactive playground

Every endpoint in this tab is generated from the OpenAPI 3.1 document. Paste a key in the playground to call production:

```http theme={null}
Authorization: Bearer rg_live_...
```

The live spec is also served unauthenticated at `GET /api/v1/openapi`.
