Skip to content

Invalid Input

URI: https://docs.ankatech.co/errors/invalid-input
HTTP Status: 400 Bad Request

When you see this

You sent a syntactically valid HTTP request, but one or more required fields are missing, empty, malformed, or conflicting. The server cannot proceed until you correct your payload.

Common Causes

  • Missing mandatory JSON properties
    – A required field like kid, kty, alg, or newKey was blank or not present.
  • Conflicting parameters
    – Both header .kid and sourceKidOverride were provided, or neither was supplied.
  • Malformed Base64 payload
    – A field expected to be Base64 (e.g. publicKey, p12FileBase64) failed to decode.
  • Invalid JSON structure
    – Your request body wasn’t well-formed or was missing the expected object schema.
  • Unsupported key-type/operation combination
    – You tried to “re-sign” or “re-encrypt” with symmetric vs. asymmetric keys mismatched.
  • Malformed JWE/JWS header
    – A detached JWE/JWS was missing required header elements (e.g. protected, iv, tag, or kid).

How to Resolve

  1. Inspect the response detail: it will pinpoint exactly which field or constraint failed.
  2. Supply all required fields: make sure kid, kty, alg, etc. are non-empty strings.
  3. Remove conflicting parameters: choose either header .kid or sourceKidOverride, not both.
  4. Validate Base64: ensure any Base64-encoded input (keys, JWE headers, PKCS#12) is correctly padded and valid.
  5. Check JWE/JWS structure: confirm your JSON Web Encryption/Signature includes all required fields (protected, iv, tag, kid).
  6. Use correct key types & operations: refer to the API reference for allowed combinations (encrypt, decrypt, sign, verify).
  7. Re-submit your request.

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