API reference · Your application

Revoke an application key

POST/v1/keys/{keyId}/revoke

POST /v1/keys/{keyId}/revoke permanently stops any key belonging to your own application, including the key signing this request.

PermissionNone
AuthenticationSigned change
Anis’s answerSigned
Staff-set limits it counts towardAll requests
.NET SDKclient.Access.RevokeKeyAsync(keyId, reason)
  • 200 signed answer: {"keyId":"<uuid>","status":"revoked","revokedAt":"<RFC3339>"}. An already-revoked key returns its current state. A retired key returns key_not_revocable (409); an unknown key or a key of another application returns the same resource_not_found (404).
  • Revoking your current key requires a new invitation and enrolment before you can sign again. Your technical contact and support@anis.ly receive an email.

Parameters

NameInTypeNotes
keyIdrequiredpathUUIDA UUID, lower-case with hyphens.

Request

Signed with your key, with a one-time nonce and a digest of the body.

Headers: Signature-Input, Signature, Content-Digest, Nonce, X-Anis-Date. The SDKs set all of them for you.

Body: {"reason":"Suspected compromise"} — required text, trimmed, 1 to 500 characters. Sign the body digest with a fresh nonce; no Idempotency-Key or scope is required for an admitted request.

Responses

StatusMeaningBody
200Success.KeyRevoked
400Refused: the signed request is badly built.Problem
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
409Refused: conflicts with the current state.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

Every answer of this call is signed by Anis — success and every refusal. Require the signature and verify it before you act on the answer; an answer without one is a failure, never an answer (how).

Refusals

Every refusal of this call is a signed problem. Branch on its code; each links to what it means and what to do.

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Malformed signed requestmalformed_signed_request400
Source address not allowedsource_ip_not_allowed403
Rate limitedrate_limited429
Replay detectedreplay_detected409
Validation failedvalidation_failed422
Not foundresource_not_found404
Key not revocablekey_not_revocable409
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500

Types

KeyRevoked

FieldTypeNotes
keyIdalways presentUUIDThe id of the revoked key belonging to your application.
statusalways presentstringAlways revoked. The key never works again; signing again requires a new enrolment. Values: revoked
revokedAtalways presentstring (date-time)When the key was revoked, as an RFC3339 timestamp.