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

# API Reference

> The LinkXG REST API — conventions, authentication, and the full endpoint reference

The LinkXG API is a REST API over JSON. Every endpoint lives under the `/api/v1` base path, returns a consistent response envelope, and is authenticated. The full, generated endpoint reference is in the sidebar — this page covers the conventions that apply across all of it.

## Base URL

| Environment | Base URL                        |
| ----------- | ------------------------------- |
| Production  | `https://api.linkxg.com/api/v1` |
| Development | `http://localhost:3000/api/v1`  |

## Authentication

Most endpoints require a bearer token. Server-to-server integrations use OAuth 2.0 Client Credentials; first-party browser clients use the `/auth/v2` cookie session, including SSO and magic-link sign-in.

```bash theme={null}
curl https://api.linkxg.com/api/v1/products \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

See [Authentication](/developers/authentication) for the full flows.

## Response envelope

Successful responses wrap their payload in a consistent envelope:

```json theme={null}
{ "success": true, "data": { } }
```

Errors follow the matching shape with `success: false` and a structured `error`. See [Error handling](/developers/errors) for status codes and error codes, and [Rate limits](/developers/rate-limits) for limit headers and the `429` contract.

## Where to start

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/developers/authentication">
    OAuth 2.0, cookie sessions, SSO, and magic-link sign-in
  </Card>

  <Card title="Adoption state" icon="signs-post" href="/developers/adoption">
    Read a tenant's maturity, milestones, and next-best-action
  </Card>

  <Card title="Company enrichment" icon="satellite-dish" href="/developers/company-enrichment">
    Stream profile-enrichment suggestions over SSE
  </Card>

  <Card title="Rate limits" icon="gauge" href="/developers/rate-limits">
    Limits, usage, and contextual upgrade prompts
  </Card>
</CardGroup>
