---
title: "Register the public key a distributor signs its claims with"
method: POST
path: "/api/v2/evidence/keys"
tags: ["Evidence"]
---

# Register the public key a distributor signs its claims with

`POST /api/v2/evidence/keys`

## Request

- Base URL: `https://api.riskrouter.eu`
- URL: `https://api.riskrouter.eu/api/v2/evidence/keys`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-RiskRouter-Key`

Once per key. Idempotent for the same key and distributor (200); a new key answers 201; a key id already registered to another distributor answers 409. Keys are never removed, so leaves signed before a rotation stay verifiable. The key is public and served to anyone by GET; publish it under your own control too.

## Request body

- object
  - `public_key` SignerPublicKey, required: A P-256 public key in JWK form. Its id is the first 16 hex characters of SHA-256 over the JSON array [x, y].
    - `kty` 'EC', required
    - `crv` 'P-256', required
    - `x` string, required
    - `y` string, required

## Response `200`

Already registered to this distributor.

- SignerKeyRegistration
  - `ok` boolean
  - `registered` boolean: true when this call stored the key; false when it was already yours.
  - `key_id` string
  - `public_key` SignerPublicKey: A P-256 public key in JWK form. Its id is the first 16 hex characters of SHA-256 over the JSON array [x, y].
    - `kty` 'EC', required
    - `crv` 'P-256', required
    - `x` string, required
    - `y` string, required
  - `registered_at` string
  - `lookup` string
  - `publish` string
  - `sign` string

## Other responses

- `201`: Registered.
- `400`: Every error carries the same envelope with a stable code.
- `401`: Every error carries the same envelope with a stable code.
- `409`: Every error carries the same envelope with a stable code.
- `429`: Every error carries the same envelope with a stable code.
- `503`: Every error carries the same envelope with a stable code.

---

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