---
title: "Confirm a just-issued hosted gateway key was received (the key itself)"
method: POST
path: "/v1/hosted-gateway/keys/confirm"
---

# Confirm a just-issued hosted gateway key was received (the key itself)

`POST /v1/hosted-gateway/keys/confirm`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/hosted-gateway/keys/confirm`
- Auth: HTTP bearer

Called with the key the token endpoint returned, as Bearer, before `confirm_by`. The key then no longer expires, and in the same transaction the tenant's earlier keys it replaces are revoked (`revoked_key_ids`). Idempotent: a second call revokes nothing more. A key no sign-on issued answers 404 HOSTED_GATEWAY_KEY_NOT_FOUND. A key that is revoked (superseded, disconnected, revoked by itself) or past `confirm_by` is refused by the org-key authentication before this route runs: 401 UNAUTHORIZED ("Invalid API key"). The 409s HOSTED_GATEWAY_KEY_RETIRED and HOSTED_GATEWAY_KEY_INACTIVE answer only a race with a concurrent retirement.

## Request body

- object

## Response `200`

Delivery confirmed

- HostedGatewayDeliveryConfirmation
  - `key_id` string, uuid, required
  - `org_id` string, uuid, required
  - `tenant_label` string, required
  - `delivered_at` string, date-time, required
  - `expires_at` unknown, required
  - `already_confirmed` boolean, required
  - `revoked_key_ids` string[], required: The tenant's earlier keys this confirmation revoked (the token answer's `replaced_key_ids` still live); empty when already confirmed.

## Other responses

- `401`: UNAUTHORIZED: the key is revoked, superseded, or past `confirm_by` (or none was presented)
- `403`: Structured API error
- `404`: Structured API error
- `409`: HOSTED_GATEWAY_KEY_RETIRED or HOSTED_GATEWAY_KEY_INACTIVE, only in a race with a concurrent retirement (otherwise such a key gets 401)

---

[API](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/revisions/357f5e459d0c?raw)
