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 likekid
,kty
,alg
, ornewKey
was blank or not present. - Conflicting parameters
– Both header.kid
andsourceKidOverride
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
, orkid
).
How to Resolve
- Inspect the response detail: it will pinpoint exactly which field or constraint failed.
- Supply all required fields: make sure
kid
,kty
,alg
, etc. are non-empty strings. - Remove conflicting parameters: choose either header
.kid
orsourceKidOverride
, not both. - Validate Base64: ensure any Base64-encoded input (keys, JWE headers, PKCS#12) is correctly padded and valid.
- Check JWE/JWS structure: confirm your JSON Web Encryption/Signature includes all required fields (
protected
,iv
,tag
,kid
). - Use correct key types & operations: refer to the API reference for allowed combinations (
encrypt
,decrypt
,sign
,verify
). - Re-submit your request.
For full schema definitions, examples, and interactive testing, see the API Reference.