Errors
Upload Claim Mismatch
The PUT to an upload URL does not match what you declared when you created it. Send exactly the declared bytes and headers, or create a new URL.
What Happened
When you create an upload URL, you declare the file’s media_type, size and sha256. The PUT to upload_url must match those claims. The API refused the PUT because one of them differs:
- The
Content-Typeheader is not themedia_typeyou declared. - The
Content-Lengthis larger than thesizeyou declared. - The
x-amz-content-sha256header is not thesha256you declared.
Nothing is stored when the PUT is refused.
Example response
422 Unprocessable Content (application/problem+json)
{
"type": "https://signatureapi.com/docs/v1/errors/upload-claim-mismatch",
"title": "Upload Claim Mismatch",
"status": 422,
"detail": "Observed content_type does not match the bound claim: expected application/pdf, got text/plain"
}How to Fix
- Send the same
Content-Typeandx-amz-content-sha256values you declared, and PUT exactly the bytes you hashed. - Check that the file did not change between hashing it and sending it, and that the request body is not re-encoded on the way (for example by a client that adds a charset or compresses the body).
- Declare the real size of the file. The body cannot be larger than the declared
size. - If the declared values were wrong, create a new upload URL with the correct ones and PUT again.
Still stuck? Contact support.