Poll a hosted gateway sign-on for its workspace key (fleet operator)

The operator's poll, with the same Entra token as the start: a device code redeems only for the operator who started it. Until the customer decides, it answers authorization_pending (or slow_down, with a 5 s wider interval, when polled sooner than the interval allows). Once approved, the next poll first applies approval's workspace rules again (the approver ADMIN or above, a paid plan, an active entitlement); a workspace that no longer qualifies denies the authorization (access_denied with a reason), and Accounts being unreachable answers 503 temporarily_unavailable to retry, nothing minted. Otherwise it mints the key in the same transaction that consumes the authorization and makes it the tenant's current key (one per organization and tenant label), and returns it exactly once: a MEMBER key named agentsafe-hosted-<tenant_label> with scopes ["decision:shadow"], created by the approver. The key expires at confirm_by (10 minutes) unless the holder calls POST /v1/hosted-gateway/keys/confirm with it, so a key whose delivery was never confirmed does not stay active. The tenant's earlier keys (replaced_key_ids) stay live until that confirmation revokes them, except one that was itself never delivered, which is revoked now; a new key that is lost in transit never leaves the tenant without one. Later polls answer invalid_grant. Sixty polls per minute per operator.

post/v1/hosted-gateway/authorizations/token

Request

  • Base URL: https://api.decionis.com
  • URL: https://api.decionis.com/v1/hosted-gateway/authorizations/token
  • Auth: HTTP bearer

Request body

device_codestring required
grant_type'urn:ietf:params:oauth:grant-type:device_code'

Response

The workspace key; it appears only here

api_keystring required

The raw key, returned exactly once. Never stored by Decionis.

key_idstring uuid required
key_namestring required
org_idstring uuid required
org_namestring required
tenant_labelstring required
tenant_hoststring required
upstream_originstring uri required

The upstream origin the customer approved; the tenant is held to it.

max_embedded_body_bytesinteger required

The request-body embedding limit the customer approved.

approved_by_emailstring email required
approved_atstring date-time required
role'MEMBER' required
scopesstring[] required
confirm_bystring date-time required

The key expires then unless POST /v1/hosted-gateway/keys/confirm is called with it.

replaced_key_idsstring[] required

The tenant's earlier keys in this workspace that this key replaces. One that was never delivered is revoked by this redemption; the others stay live until POST /v1/hosted-gateway/keys/confirm with this key revokes them.

Example response

{
  "key_name": "agentsafe-hosted-acme"
}

Changes

No recorded changes to this operation across all 1 revision of this API.