> For the complete documentation index, see [llms.txt](https://sonic-ai-works.gitbook.io/sonic-networks-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-ai-works.gitbook.io/sonic-networks-docs/api-reference/sonic-api-reference.md).

# SONIC API Reference

Canonical SONIC API v1.0.0 baseline for auth/access, developer credentials, AI/media operations, commerce, wallets, token state, realtime projections and errors.

**Contract version:** `1.0.0`\
**Status:** `Preview` unless a route is explicitly `Live` or `Verified`.\
**API origin:** `https://api.sonicai.works`\
**Base path:** `/api/v1`

SONIC uses `/api/v1` as the HTTP contract-major boundary and `/ws/v1` for authorized realtime projections. Realtime events do not replace HTTP authorization or durable state.

## Identity and access

```http
GET /api/v1/auth/context
GET /api/v1/saas/me
GET /api/v1/access/context?path=<normalized-path>
```

Canonical workspace roles are:

```
OWNER · ADMIN · CREATOR · DEVELOPER · FINANCE · MODERATOR · MEMBER · VIEWER
```

`DEVELOPER` is an RBAC role, not a plan. Developer surfaces additionally require explicit `developer.*` permissions and, where applicable, product entitlements.

## Developer credential surface

```http
GET    /api/v1/api-keys
POST   /api/v1/api-keys
PATCH  /api/v1/api-keys/{keyId}
DELETE /api/v1/api-keys/{keyId}
POST   /api/v1/api-keys/{keyId}/rotate
POST   /api/v1/api-keys/{keyId}/revoke
```

Creating/rotating/revoking credentials requires server-side authorization and may require fresh re-authentication according to policy.

## Common invariants

* protected routes re-resolve authority server-side;
* role, plan, wallet connection and cached client state are not bearer capabilities;
* duplicate-sensitive mutations use idempotency;
* atomic values use integers/decimal-safe strings with explicit decimals;
* provider/RPC/mail secrets remain server-only;
* unavailable canonical/provider state is never fabricated as success or zero;
* `configured ≠ verified ≠ live`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sonic-ai-works.gitbook.io/sonic-networks-docs/api-reference/sonic-api-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
