Skip to content

Conflict

URI: https://docs.ankatech.co/errors/conflict
HTTP Status: 409 Conflict

When you see this

The server understood your request but cannot complete it because it would conflict with the current state of the target resource.

Common Causes

  • Duplicate kid
    You tried to import or register a key under an ID that already exists in the keystore.

  • Algorithm or material mismatch
    You attempted to generate or import a key under an existing kid, but the requested algorithm or public-key material doesn’t match the stored entry.

  • Logically-deleted key recreation
    You tried to recreate a key whose ID was marked DELETED_LOGICAL; logically-deleted keys cannot be recreated under the same ID.

  • Invalid key lifecycle state
    You attempted an operation on a key that’s in the wrong state (for example, revoking a key that’s already revoked).

  • Disallowed operation
    You used a key for an operation it doesn’t support (e.g. encrypting with a signature-only key, signing with an encryption-only key).

How to Resolve

  1. Inspect the response detail to see which conflict occurred.
  2. For duplicate or mismatched keys
    • Choose a new, unique kid, or
    • Use the same algorithm and public-key material as the existing entry.
  3. For logically-deleted keys
    • Select a different kid, or
    • Permanently remove the old entry before reusing the ID.
  4. For invalid lifecycle states
    • Check the key’s status via
      [GET /api/key-management/keys/{kid}](../../api_reference/overview/)
    • Only perform operations allowed in that state (see Key Lifecycle in the API Reference).
  5. For disallowed operations
    • Ensure the key’s type and algorithm support the operation you’re requesting (encrypt, decrypt, sign, verify).

For full details on key-management rules and operations, see the API Reference.