Skip to content
dimmiDocs

Messenger

Rotate an identity secret

POST/api/v1/identity-secrets/{secret}/rotations

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the settings:write ability

Path parameters

secretstringrequired

Id of the identity verification secret, starting with isk_, such as isk_01jx2m8k4t. Find it with GET /identity-secrets.

Body

application/json
public_keystring

The new public key as PEM text, required for RS256, ES256 and EdDSA secrets.

Maximum length: 16384

Response 201

Created
dataobjectrequired
Show child attributes
algorithmstringrequired

The signing algorithm identity tokens are checked with: HS256 (shared secret), RS256, ES256 or EdDSA (public key or key set).

audiencestring | nullrequired

An extra aud value accepted on tokens checked with this secret. Null when none is set.

created_atstringrequired

When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.

Format: date-time

fingerprintstringrequired

A short mark to tell secrets apart: the last 4 characters of a shared secret, or 16 hex characters for a public key or key set.

idstringrequired

The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.

issuerstring | nullrequired

For a key set only: the issuer tokens must carry. Null otherwise or when it is read off the key set's address.

jwks_errorstring | nullrequired

For a key set only: why the last fetch of the provider's keys failed. Null when it worked or the secret is not a key set.

jwks_fetched_atstring | nullrequired

For a key set only: when the provider's keys were last fetched. Null when the secret is not a key set.

Format: date-time

jwks_urlstring | nullrequired

For a key set only: the address the provider's public keys are fetched from. Null for a shared secret or a single public key.

kidstringrequired

The value a token's kid header names this secret by; it equals the secret's id (starting with isk_). Empty for a key set, whose tokens carry the provider's key ids.

last_used_atstring | nullrequired

When a token was last checked with this secret. Null when it has never been used.

Format: date-time

namestringrequired

The name the team gave the secret.

objectstringrequired

The kind of record this is, the same for every record of its kind, such as article.

retires_atstring | nullrequired

When a retiring secret stops working. Null unless status is retiring.

Format: date-time

revoked_atstring | nullrequired

When the secret was revoked. Null unless status is revoked.

Format: date-time

secretstring

The shared secret itself, shown only in this one answer; store it now. Absent for a public key or key set.

sourcestringrequired

What the secret verifies tokens with: shared_secret, public_key or jwks (a provider's key set).

statusstringrequired

Where the secret stands: active, retiring (still works until retires_at) or revoked.

metaobjectrequired
Show child attributes
env_varstringrequired

The environment variable your server should keep the secret in: DIMMI_IDENTITY_SECRET.

kid_env_varstringrequired

The environment variable your server should keep the secret's kid in: DIMMI_IDENTITY_KID.

secret_shown_oncebooleanrequired

True when this answer carries a shared secret that will never be shown again; false when there was none to show.

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.