---
title: "Ask a super-admin to approve a service signing key in the browser"
method: POST
path: "/auth/service-client-key-requests"
tags: ["API Keys", "Auth"]
---

# Ask a super-admin to approve a service signing key in the browser

`POST /auth/service-client-key-requests`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/auth/service-client-key-requests`
- Auth: none required

No session (RFC 8628 device-authorization shape). The consumer sends the P-256 public JWK it wants registered and a proof of possession: a compact ES256 JWS signed by that key's private half, with header kid = the key's RFC 7638 thumbprint and claims aud = this endpoint's absolute URL, iat and exp (exp - iat at most 300 seconds). Returns a user code and the accountant-app approval URL; a signed-in super-admin approves or denies the request there within 10 minutes, and approval registers the key exactly as POST /admin/service-client-keys does. Nothing secret is returned. Rate limited per client IP. Answers 503 before validating the body while the service-assertion exchange is not configured, so nothing is registered that could not then be exchanged.

## Request body

- OpenServiceClientKeyRequestInput
  - `name` string, required
  - `publicKeyJwk` object, required: P-256 public JWK (kty EC, crv P-256, x, y). Must not contain d.
  - `expiresInDays` integer: Lifetime of the key once approved; default 180
  - `proof` string, required: Compact ES256 JWS over {aud, iat, exp}, signed by this key, header kid = its thumbprint

## Response `201`

Request opened; show the user code and open the verification URL

- OpenedServiceClientKeyRequestResponse
  - `success` true, required
  - `data` object, required
    - `requestId` string, uuid, required: Poll with this id
    - `userCode` string, required: Shown to the approver; compare it on the approval page
    - `kid` string, required: RFC 7638 thumbprint of the key; shown on the approval page
    - `verificationUri` string, uri, nullable, required: Accountant-app approval page; null when ACCOUNTANT_APP_BASE_URL is unset
    - `verificationUriComplete` string, uri, nullable, required: The approval page with the user code filled in
    - `expiresIn` integer, required: Seconds the request stays approvable
    - `interval` integer, required: Seconds to wait between polls

## Other responses

- `409`: This public key is already registered
- `422`: Validation error
- `429`: Too many requests from this client
- `503`: The service-assertion exchange is not configured (API_BASE_URL or the service principal)

## Changes

- **2026-10-28** `1ee6b9fed8c4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/auth/service-client-key-requests/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
