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
encrypton a signature-only key, orsignon 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
- Choose an operation that matches the key's purpose and algorithm.
- Use a different key whose purpose supports the operation you need.
- Review the key's metadata (
GETthe key) to confirm its supported operations, then re-submit.
For full schema definitions, examples, and interactive testing, see the Developer Hub Reference.