Skip to navigation

Create a JSON Web Key

View as Markdown

Generate a new RS256 key pair for a JWK set and inserts it as an inactive key.

Usage notes

  • To perform this operation, you must use API credentials owned by a user assigned the Admin account type.
  • A set may hold at most two keys at a time. Delete an existing key before creating a new one.
  • The response never includes private key material.

Usage scenarios

  • Key rotation: Stage a new key ahead of an upcoming rotation window.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

jwkSetIdstringRequired
Unique identifier of the JWK set.

Request

The request body.
validForDaysdoubleOptional
Number of days the generated certificate is valid for. Must be a positive integer. Defaults to 365.

Response

The response body.
jsonWebKeyIdstring
Unique identifier of the JSON Web Key.
jwkSetIdstring
Unique identifier of the JWK set this key belongs to.
algorithmenum
Signing algorithm this key was generated for.
Allowed values:
publicKeystring

PEM-encoded X.509 certificate wrapping the public key. Never includes private key material.

expiresAtdatetime
Expiration timestamp of the underlying certificate.
statusenum

active if this is the key currently used to sign JWT bearer tokens for the set, otherwise inactive.

Allowed values: