Rivier/ Reference/ keys

Mint a key. The secret is returned once

post/keys

Before you call

Credential
Authorization: Bearer $KEY
Scope
keys:admin
Sdk
keys.key.create
Cli
keys key create
Events
keys.key.created

Request bodyapplication/json, required

  • namestringrequired
    At most 200 characters.
  • rolestring
    One of: agent, manage.
  • rpmLimitinteger
    At least 1. At most 100000.
  • expiresInDaysinteger
    At least 1. At most 3650.
  • kindstring
    One of: secret, publishable.
  • scopeslist of string
  • allowedOriginslist of string
  • ipAllowlistlist of string
  • modestring
    One of: live, test.

Responses

  • 201application/json
    Success
    • modestring
      One of: live, test.
    • key_idstring (uuid)required
    • namestringrequired
    • rolestringrequired
      One of: agent, manage, admin.
    • kindstringrequired
      One of: secret, publishable.
    • prefixstringrequired
    • scopeslist of string or nullrequired
    • allowed_originslist of stringrequired
    • ip_allowlistlist of stringrequired
    • rpm_limitnumber or null
    • expires_atstring or null
    • created_atstringrequired
    • secretstringrequired
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown