Agent key bindings — K8 HQ Sign-in API
Agent key bindings operations for K8 HQ Sign-in API. Requests, permissions and responses.
Version 1OpenAPI description (JSON)
Before making requests, read the authentication and request requirements.
Apps connected by a person prove they hold the keys K8 HQ may later share with them, and the person confirms them.
Design note 0031. Off until zero-access inboxes ship: every operation answers 404 not_found.
Base URL
| Base URL | For |
https://api.k8hq.com/auth | The K8 HQ web app, and programs acting with a person's session |
Endpoints
Agent key bindings
Prove an app holds its keys
POST/v1/agent-key-bindings
The app returns the signed binding with the challenge digest, its signature and the opened challenge. The binding is stored pending until the person confirms it.
Parameters
| Name | Type | Description |
Idempotency-Key (header) required | string | 16 to 128 visible ASCII characters, new for each change. |
Response body (JSON)
| Field | Type | Description |
schemaVersion required | integer | |
agentSignature | string | |
authority | active | revoked | |
binding | object | |
confirmBy | string | Unix seconds the person must confirm a pending binding by (24 hours, at most the connection's expiry). |
display | object | Trusted display identities from K8 HQ's records, never from the app: the app and its publisher from the app registry, the key provider (the app itself when self-hosted) and the organization's name. Only on the person's read. |
fingerprint | string | The full binding fingerprint, lowercase hex. |
pairingSignature | string | |
pairingSignerId | string | |
state | pending | verified | revoked | |
Responses
| Status | Body | Meaning |
| 200 | AgentKeyBinding | The binding. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Key sharing with apps is off (not_found), or no such binding you may see. |
| 409 | application/problem+json | The challenge expired (challenge_expired), was already answered (conflict), or the keys are already bound (keys_bound). |
| 422 | application/problem+json | The proof of possession didn't verify (invalid_proof). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Start pairing an app's keys
POST/v1/agent-key-bindings/challenges
An app proposes its X25519 and Ed25519 public keys for its own connection in one organization. K8 HQ assigns the binding ID and returns a fresh challenge sealed to the X25519 key, valid 5 minutes. A public key grants nothing.
Parameters
| Name | Type | Description |
Idempotency-Key (header) required | string | 16 to 128 visible ASCII characters, new for each change. |
Response body (JSON)
| Field | Type | Description |
schemaVersion required | integer | |
agentSignature | string | |
authority | active | revoked | |
binding | object | |
confirmBy | string | Unix seconds the person must confirm a pending binding by (24 hours, at most the connection's expiry). |
display | object | Trusted display identities from K8 HQ's records, never from the app: the app and its publisher from the app registry, the key provider (the app itself when self-hosted) and the organization's name. Only on the person's read. |
fingerprint | string | The full binding fingerprint, lowercase hex. |
pairingSignature | string | |
pairingSignerId | string | |
state | pending | verified | revoked | |
Responses
| Status | Body | Meaning |
| 200 | AgentKeyBinding | The sealed challenge. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Key sharing with apps is off (not_found), or no such binding you may see. |
| 409 | application/problem+json | This pairing request has expired (challenge_expired), another pairing is waiting for confirmation, or the Idempotency-Key was used for different input (conflict). |
| 429 | application/problem+json | Four pairing requests are already waiting (rate_limited). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Read an app's key binding
GET/v1/agent-key-bindings/{id}
The person who connected the app reads its binding: the signed fields, the fingerprint to check through a channel they trust, its confirmation deadline and who the app, provider and organization are.
For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused.
Parameters
| Name | Type | Description |
id (path) required | string | The binding (akb_). |
ownerKind (query) required | string | |
ownerId (query) required | string | |
orgId (query) required | string | |
Response body (JSON)
| Field | Type | Description |
schemaVersion required | integer | |
agentSignature | string | |
authority | active | revoked | |
binding | object | |
confirmBy | string | Unix seconds the person must confirm a pending binding by (24 hours, at most the connection's expiry). |
display | object | Trusted display identities from K8 HQ's records, never from the app: the app and its publisher from the app registry, the key provider (the app itself when self-hosted) and the organization's name. Only on the person's read. |
fingerprint | string | The full binding fingerprint, lowercase hex. |
pairingSignature | string | |
pairingSignerId | string | |
state | pending | verified | revoked | |
Responses
| Status | Body | Meaning |
| 200 | AgentKeyBinding | The binding. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session, or it expired or was revoked (unauthenticated): refresh, or sign in again. |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Key sharing with apps is off (not_found), or no such binding you may see. |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Replace an app's key binding
POST/v1/agent-key-bindings/{id}/replace
The person replaces an older binding with a newer confirmed one. Keys shared with the old binding stop being available from K8 HQ; the affected inboxes need new keys for future content.
For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.
Parameters
| Name | Type | Description |
id (path) required | string | The binding (akb_). |
Idempotency-Key (header) required | string | 16 to 128 visible ASCII characters, new for each change. |
Response body (JSON)
| Field | Type | Description |
schemaVersion required | integer | |
agentSignature | string | |
authority | active | revoked | |
binding | object | |
confirmBy | string | Unix seconds the person must confirm a pending binding by (24 hours, at most the connection's expiry). |
display | object | Trusted display identities from K8 HQ's records, never from the app: the app and its publisher from the app registry, the key provider (the app itself when self-hosted) and the organization's name. Only on the person's read. |
fingerprint | string | The full binding fingerprint, lowercase hex. |
pairingSignature | string | |
pairingSignerId | string | |
state | pending | verified | revoked | |
Responses
| Status | Body | Meaning |
| 200 | AgentKeyBinding | The replacement's outcome. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session or it expired (unauthenticated), or its passkey confirmation is more than 5 minutes old (step_up_required). |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Key sharing with apps is off (not_found), or no such binding you may see. |
| 409 | application/problem+json | The binding was already replaced by another (revoked) or the new one isn't confirmed (conflict). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |
Confirm an app's key binding
POST/v1/agent-key-bindings/{id}/verify
The person signs the binding with their own key after checking its fingerprint, before its confirmation deadline.
For a person's own session (x-k8hq-token) only: assistants' delegated tokens and API tokens are refused. The session needs a recent passkey: if its last passkey confirmation is more than 5 minutes old, the answer is 401 step_up_required.
Parameters
| Name | Type | Description |
id (path) required | string | The binding (akb_). |
Idempotency-Key (header) required | string | 16 to 128 visible ASCII characters, new for each change. |
Response body (JSON)
| Field | Type | Description |
schemaVersion required | integer | |
agentSignature | string | |
authority | active | revoked | |
binding | object | |
confirmBy | string | Unix seconds the person must confirm a pending binding by (24 hours, at most the connection's expiry). |
display | object | Trusted display identities from K8 HQ's records, never from the app: the app and its publisher from the app registry, the key provider (the app itself when self-hosted) and the organization's name. Only on the person's read. |
fingerprint | string | The full binding fingerprint, lowercase hex. |
pairingSignature | string | |
pairingSignerId | string | |
state | pending | verified | revoked | |
Responses
| Status | Body | Meaning |
| 200 | AgentKeyBinding | The binding. |
| 400 | application/problem+json | The request is malformed or a field is invalid (invalid). |
| 401 | application/problem+json | No session or it expired (unauthenticated), or its passkey confirmation is more than 5 minutes old (step_up_required). |
| 403 | application/problem+json | Not allowed (forbidden): an assistant's delegated token, or a browser origin other than the web app's. |
| 404 | application/problem+json | Key sharing with apps is off (not_found), or no such binding you may see. |
| 409 | application/problem+json | The deadline passed (challenge_expired), the binding was revoked (revoked) or isn't pending (conflict). |
| 422 | application/problem+json | The signature didn't verify with your key (invalid_proof). |
| 500 | application/problem+json | A temporary problem (unavailable); retry. |