# Discovery

> The Discovery operations of the Kabu API: what this key can do, limits and machine-readable links.

What this key can do, limits and machine-readable links.

Generated from the contract, version `2.0.0-draft.2` ([OpenAPI](/openapi.yaml)). Base URL `https://usekabu.com/api`. Errors are problem details, each [code](/docs/errors) with its own page.

## `GET /v2` · Who am I, and what can this key do

- **Auth:** an API key, or no credentials, or a signed-in human's token (the Kabu apps).
- **Signed-in humans:** `member`.

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Kabu-Org` | header | string | no | Select a live membership (default personal org); non-member is 404. Human tokens are live-only. Caller user id is distinct from billing owner. |

| Status | Means | Body |
|---|---|---|
| `200` | OK | [Capabilities](#schema-Capabilities) |
| `4XX` | Error | [Problem](#schema-Problem) |
| `5XX` | Error | [Problem](#schema-Problem) |

```sh
curl "https://usekabu.com/api/v2" \
  -H "Authorization: Bearer $KABU_API_KEY"
```

## Schemas

### Capabilities

| Property | Type | Required | Description |
|---|---|---|---|
| `object` | `"capabilities"` | yes |  |
| `api_version` | string | yes |  |
| `livemode` | boolean | yes |  |
| `org` | string | yes |  |
| `project` | string or null | yes |  |
| `agent` | string or null | yes |  |
| `default_to` | string or null | yes |  |
| `scopes` | array of string | yes |  |
| `limits` | object | yes | e.g. title_max, body_max_bytes, options_max, wait_max, recipients_max. |
| `features` | array of string | yes | e.g. ask.form, choice.quiz, grants, kickoff, web_push, live_activity, mcp. |
| `ask_types` | array of string | yes |  |
| `decisions` | array of string | yes |  |
| `priorities` | array of object | yes |  |
| `priorities[].name` | string | yes |  |
| `priorities[].rank` | integer | yes |  |
| `sounds` | array of string | yes |  |
| `links` | object | yes | openapi, llms_txt, mcp, jwks, docs. |

### Problem

RFC 9457 problem details with Kabu extensions.

| Property | Type | Required | Description |
|---|---|---|---|
| `type` | string (uri) | yes | Documentation URL for this problem type. |
| `title` | string | yes |  |
| `status` | integer | yes |  |
| `code` | string | yes | Stable machine code, e.g. invalid_request, unknown_parameter, unauthorized, forbidden, self_response_forbidden, incompatible_scopes, not_found, idempotency_key_reused, idempotency_key_in_use, already_settled, ask_expired, lease_lost, invalid_ack_transition, rate_limited, quota_exceeded, payload_too_large, unsupported_media_type, checkpoint_expired, checkpoint_filter_mismatch, upload_expired, media_not_ready, unsupported_schema_keyword, invalid_receipt, attempt_expired, precondition_failed, session_ended, project_in_use. Unknown codes must be handled by `status`. |
| `detail` | string | no |  |
| `param` | string | no | JSON pointer to the offending field. |
| `errors` | array of [ProblemFieldError](#schema-ProblemFieldError) | no |  |
| `retryable` | boolean | yes |  |
| `hint` | string | no | One actionable sentence an agent can follow to fix the call. |
| `doc_url` | string (uri) | no |  |
| `request_id` | string | yes |  |

### ProblemFieldError

| Property | Type | Required | Description |
|---|---|---|---|
| `param` | string | yes |  |
| `code` | string | yes |  |
| `detail` | string | no |  |
