API reference · Your application
Revoke an application key
/v1/keys/{keyId}/revokePOST /v1/keys/{keyId}/revoke permanently stops any key belonging to your own application, including the key signing this request.
client.Access.RevokeKeyAsync(keyId, reason)- 200 signed answer:
{"keyId":"<uuid>","status":"revoked","revokedAt":"<RFC3339>"}. An already-revoked key returns its current state. A retired key returnskey_not_revocable(409); an unknown key or a key of another application returns the sameresource_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
| Name | In | Type | Notes |
|---|---|---|---|
keyIdrequired | path | UUID | A 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
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | KeyRevoked |
| 400 | Refused: the signed request is badly built. | Problem |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 409 | Refused: conflicts with the current state. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No 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.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Malformed signed request | malformed_signed_request | 400 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Replay detected | replay_detected | 409 |
| Validation failed | validation_failed | 422 |
| Not found | resource_not_found | 404 |
| Key not revocable | key_not_revocable | 409 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
Types
KeyRevoked
| Field | Type | Notes |
|---|---|---|
keyIdalways present | UUID | The id of the revoked key belonging to your application. |
statusalways present | string | Always revoked. The key never works again; signing again requires a new enrolment. Values: revoked |
revokedAtalways present | string (date-time) | When the key was revoked, as an RFC3339 timestamp. |