---
title: "Register an agent key"
method: POST
path: "/v1/inboxes/{id}/agent/keys"
tags: ["Agent network"]
---

# Register an agent key

`POST /v1/inboxes/{id}/agent/keys`

## Request

- Base URL: `https://api.agentboxd.com`
- URL: `https://api.agentboxd.com/v1/inboxes/{id}/agent/keys`
- Auth: HTTP bearer

`{ public_jwk, proof }` → `201` key. `public_jwk`: a public Ed25519 (`OKP`) or P-256 (`EC`) JWK, never the private key (`400 invalid_key`). `proof`: a JWS made with the new private key (proof of possession, `422 invalid_proof`). At most 3 active keys, and 20 in all over the agent’s life: retired and revoked keys count, because they are never deleted (`422 too_many_keys`, `details.counted` is `active` or `all`). A key is registered once per agent (`409 key_exists`). Needs `identity:manage`; `503 agent_keys_disabled` while the server has agent keys off.

Permission: `identity:manage`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `public_jwk` object, required
  - `proof` string, required

## Response `200`

OK

- object

## Other responses

- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/agentboxd/apis/agentboxd-api.md) · [All operations](https://skmtc.dev/agentboxd/apis/agentboxd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentboxd/apis/agentboxd-api/revisions/ee7b079f0e97?raw)
