Skip to main content

Get a signing key

GET 

https://api.dilisense.com/v1/keys/{kid}

The keys API method returns the public key for a key ID as a JSON Web Key.

Key rotation. The signing key is rotated regularly, every key is used for signing for a limited period and is then retired. Keys stay retrievable by their ID after their retirement, so that you can verify a stored body at any later point in time. Follow these rules in your implementation:

  • Look up the key by the kid of the signature header, never rely on current for verification. The current key can change between the moment a body is signed and the moment you fetch the key.
  • Do not hardcode a key. Fetch a key the first time you see its ID and cache it by ID. The key material of a key document never changes, only its status does, so refresh cached keys from time to time to notice a revocation.
  • Accept the statuses ACTIVE and RETIRED, reject REVOKED.

Request​

Example request​

curl --location --request GET 'https://api.dilisense.com/v1/keys/current' \
--header 'x-api-key: <api_key>'

Responses​

OK

Error responses are the same for all endpoints, see Errors.