> 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/developer-api-keys-and-usage.md).

# Developer API, Keys & Usage

Canonical SONIC v1.0.0 developer authentication, Developer role, API-key lifecycle, scopes, limits, usage and provider-security boundaries.

**Version `1.0.0` · Status `Preview` unless explicitly promoted**

SONIC developer credentials authenticate applications to SONIC. They are never provider credentials.

## Access requirement

Developer product access is derived from workspace authority rather than a plan name alone:

```
DEVELOPER role
+ developer.portal.read
+ feature entitlement where required
= Developer Portal
```

Credential mutations require the specific permission and can require fresh AAL:

```
developer.api_key.read
developer.api_key.manage
developer.webhook.read
developer.webhook.manage
developer.usage.read
developer.logs.read
developer.provider.read
developer.provider.manage
```

A Developer role does not inherit Finance, Admin, Owner, wallet-signing or treasury permissions.

## Credential domains

```
Developer / SDK
   │ Authorization: Bearer sonic_test_* / sonic_live_*
   ▼
SONIC API Gateway
   ├── SONIC-managed provider secret → provider
   └── encrypted customer BYOK       → provider
```

SONIC API keys and provider keys remain separate security domains.

## Key lifecycle

```http
GET    /api/v1/api-keys
POST   /api/v1/api-keys
GET    /api/v1/api-keys/{keyId}
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
GET    /api/v1/api-keys/{keyId}/limits
PUT    /api/v1/api-keys/{keyId}/limits
```

Plaintext secrets are displayed once. SONIC stores a keyed digest/metadata/prefix/scopes rather than recoverable plaintext.

## Gateway order

```
request ID
→ parse session/API key
→ credential state/expiry
→ workspace/project authority
→ Developer permission / scope authorization
→ IP/rate/budget/concurrency policy
→ idempotency where required
→ durable request receipt
→ domain handler
→ usage/accounting completion
```

Raw `Authorization` values are never persisted.

## Dashboard

```
Developers
├── Overview
├── API Keys
├── Webhooks
├── Usage
├── Logs
├── Provider Connections
├── Rate Limits
├── OpenAPI / Swagger
└── Postman
```

Test and Live environments remain distinct, and Live credential operations should support stronger re-authentication policy than ordinary read access.


---

# 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/developer-api-keys-and-usage.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.
