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, ornewKeywas blank or not present. -
Conflicting parameters
–sourceKidnames a key other than the one the token's header names, or neither names one. For a token addressed to or signed by several keys,sourceKidorrecipientKidis absent or names no recipient or signer of the token, ornewKidnames an entry the operation keeps. Thedetailnames the member and no key. -
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. -
Malformed JWE/JWS header
– A detached JWE/JWS was missing required header elements (e.g.protected,iv,tag, orkid). -
A
decryptionKidthat names none of the recipients of a PKCS#7 conversion
– You submitted anEnvelopedDataorSignedAndEnvelopedDatastructure toPOST /api/v3/migration/convert-pkcs7-to-joseor its streaming twin with adecryptionKidwhose certificate matches none of the file's recipients.decryptionKidis optional — when it is absent, the first recipient in encoded order whose tenant key admits decryption and encryption decrypts — but when it is present it must name one of them. This isinvalid-input, notinvalid-pkcs7: the file is a perfectly valid PKCS#7 structure — the request is what is inconsistent. RunPOST /api/v3/migration/analyze-pkcs7to list the recipients, then omitdecryptionKidor supply a matching one. -
An X25519 or X448 public key of low order
– An ephemeral key in a JWE recipient'sepk, or a public key you import (a JSON key, a composite component, or a PKCS#12 certificate or key entry), whose u-coordinate is 0, 1 or a point of small order. Such a key yields no usable shared secret (RFC 7748 §6.1), so it is refused on the crypto routes, both planes, and on key import. -
A composite algorithm pairing the catalogue does not know
– Creating, rotating to or importing a composite key whose pairing is not a catalogue entry. This is not a policy decision, so it carries noalgorithmorrefusedBymember, whatever the tenant's algorithm policy. An algorithm the catalogue knows but the algorithm policy in force does not admit is a different type, Algorithm Not Admitted. -
A PKCS#7
serializationoutsideAUTO,COMPACTandJSON
– The value is exact case;json,Compactor any other JOSE serialization name is refused, namingserialization, before the file is decoded or read. -
A member a PKCS#7 request body does not define
– Every PKCS#7 body — analyze and convert, compact and streaming (metadatapart), at its root and insidealgorithmPolicy— refuses a member it does not define, with adetailnaming the member and never its value:Unsupported member 'validateCertificates' in the request body.Members the requests do not define —validateCertificates,validateTimestamp,algorithmPolicy.contentEncryptionUpgrade, anddecryptionKidon analyze — are refused this way. -
A certificate that does not match the PKCS#7 recipient
– ThedecryptionKidresolves to a key whose certificate is not the one the message was encrypted to. An unresolvabledecryptionKidis a404instead; this400means it resolved and did not match. -
A licence import body that is not one JSON object
– OnPOST /api/v3/admin/platform/license/import, the body was not a JSON object (an array, a scalar, trailing content, or not JSON at all):The request body must be a JSON object: the signed license artifact.The Admin API refuses it before the licence server is called, and no audit event is written. A JSON object that is not a valid licence artifact reaches the licence server and is refused there as License Artifact Invalid. -
A usage-statement period or
supersedesthat is not well-formed
– OnPOST /api/v3/admin/usage/statements, the calendar month or thestatementIda correction supersedes was malformed. No statement is issued and no upstream call is made. A well-formed request the licence server will not answer — a month that is not yet final, or a second original for a month already stated — is a409instead, and names the correction path. -
A usage-telemetry range, grain or page that is not well-formed
– OnGET /api/v3/admin/usage/telemetry,GET /api/v3/admin/platform/usage/telemetryandPOST /api/v3/admin/usage/exports:fromortoabsent, a range whosefromis later than itsto, agrainother thandayormonth, or on the two reads apageoutside0..366or asizeoutside1..200. No upstream call is made and no export job is created. Unlike the licence server's own usage read above, an inverted range here is this type, not Invalid Date Range, which these three operations reserve for a span beyond the grain's cap. -
A page request outside a paginated Admin API list's bounds
– On the ten paginated entity lists of the Admin API (keys, actors, applications, capability grants, constraint policies, exchange contexts, credentials, internal crypto use cases, cross-tenant pending activations and Cryptographic Exchanges): asizeabove the list's cap (200; 50 onGET /api/v3/admin/exchanges), asizebelow 1 or a negativepagewhere the list binds them itself, or a sort field outside the list's allow-list. Nothing is read. A sort refusal names the allow-list indetail—Sort field is not in the allow-list. Allowed: createdAt, name, status— and never repeats the field you sent. Each list's allow-list is published on its400response in the API reference.
Response Example
{
"type": "https://docs.ankatech.co/errors/invalid-input",
"title": "Invalid Input",
"status": 400,
"detail": "Field 'algorithm' is required and must be one of the catalog values.",
"instance": "/api/v3/admin/tenants/2f1c9d84-6b2e-4d3a-9f57-0a1b2c3d4e5f/keys",
"timestamp": 1751500800,
"extensions": {
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}
Content-Type: application/problem+json — the response follows RFC 9457 Problem Details.
The example above is an Admin API body, where the correlation identity is extensions.requestId; the Core API and the PQC Handshake API instead emit a top-level correlationId. Read the member your service emits — see Error Index & Overview.
The title is the answering service's: the Audit API answers every invalid-input refusal with the title Bad Request, on every plane. Two refusals carry a fixed detail: a body the PQC Handshake API cannot read as JSON (The request body is missing or is not a valid JSON document.) and an OpenAPI document key the API documentation hub does not know (The requested OpenAPI document key is not recognized.).
detail is always a single human-readable sentence. It is never a nested JSON document, even when the rejection originated in an internal upstream service: see S2S Relay Envelope for how a relayed rejection is composed.
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. - Resolve conflicting parameters: send
sourceKidonly when it equals the header'skid, when the header names none, or to name the ONE entry replaced in a token with several; sendrecipientKidto name the recipient that decrypts a JWE addressed to several keys. - 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 Developer Hub Reference.