Skip to content

Key Operation Incompatible

URI: https://docs.ankatech.co/errors/key-operation-incompatible
HTTP Status: 400 Bad Request

When you see this

The operation you requested is incompatible with the key's type or algorithm — for example asking a signing key to perform encryption.

Common Causes

  • Requesting encrypt on a signature-only key, or sign on an encryption-only key.
  • Pairing an operation with an algorithm that does not support it.
  • A mismatch between the requested operation and the key's declared purpose.

Response Example

{
  "type": "https://docs.ankatech.co/errors/key-operation-incompatible",
  "title": "Key Operation Incompatible",
  "status": 400,
  "detail": "Operation 'ENCRYPT' is incompatible with key 'my-mldsa-key' (purpose SIGN_VERIFY).",
  "instance": "/api/v3/admin/keys/my-mldsa-key/operations",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": 1730000000
}

Content-Type: application/problem+json — the response follows RFC 7807 Problem Details.

How to Resolve

  1. Choose an operation that matches the key's purpose and algorithm.
  2. Use a different key whose purpose supports the operation you need.
  3. Review the key's metadata (GET the key) to confirm its supported operations, then re-submit.

For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.