Document uploads

Every endpoint that uploads a document on the Crypto (/crypto/v2) and Wallet (/wallet/v1) APIs works the same way: you request a short-lived pre-signed URL, then PUT the file straight to it. This page covers what is common to all of them: accepted formats, size, file naming, Content-Type, and optional OpenPGP encryption. Each product guide explains which documents to upload and when.


Endpoints that use this flow

Broker as a service has its own document flow, described in Onboarding a company.


How an upload works

Step 1: Request the upload URL

Call the endpoint for the document with the user and the fileName, including its extension. The response returns a pre-signed url.

curl -X POST https://sandbox.manteca.dev/crypto/v2/documentations/uploadUrl \
  -H "md-api-key: $MD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "associatedSubId": "100037043",
      "docType": "FUNDS",
      "fileName": "payslip-2026-10.pdf"
  }'
{ "url": "https://manteca-documentation.s3.amazonaws.com/upload-target" }

Step 2: Upload the file to the signed URL

PUT the raw file binary to the url from Step 1. Do not include the md-api-key header: this request goes straight to storage.

curl -X PUT 'SIGNED_URL_FROM_STEP_1' \
  -H "Content-Type: application/pdf" \
  --data-binary '@/path/to/payslip-2026-10.pdf'
🚧

The signed URL expires in 90 seconds, so upload immediately after requesting it. If it expires, request a new one.

A 200 on the PUT means the file reached storage, not that the document was created. The file is processed asynchronously: the document appears in the user's documentation, and the product's webhooks report its review, once processing finishes.


Accepted formats

DocumentFormats
Any document.pdf, .jpg, .jpeg, .jfif, .png, .webp, .gif, .bmp, .heic, .heif, .tif, .tiff
SelfieAny of the above, plus video: .mp4, .mov, .webm, .3gp
Liveness videoSee the liveness video requirements

HEIC and HEIF photos, the default format of iPhone cameras, are accepted as they are: there is no need to convert them.

A format outside the list is rejected when you request the URL, with 409 INVALID_DOCUMENTATION_FORMAT.


File size

Keep each file under 10 MB. A liveness video has its own limit, listed in its requirements.


File name, extension and Content-Type

  • fileName: send the file's name with its real extension (payslip-2026-10.pdf, front.heic). The extension in fileName is what defines the document's format.
  • extension: optional, accepted only by POST /crypto/v2/documentations/uploadUrl and POST /wallet/v1/documentation-actions/get-upload-url. When you send it, it replaces the extension taken from fileName, and it must include the leading dot: ".pdf", not "pdf". Sending only fileName is enough.
  • Content-Type on the PUT: the file's MIME type, such as application/pdf, image/jpeg or image/heic. For an encrypted file, use application/octet-stream.

One file per upload

Each upload carries exactly one file and becomes its own document, reviewed on its own. When the evidence for a case spans several documents (for example, three payslips as proof of fund origin), we recommend merging them into a single file (one PDF) and uploading that: a file that holds only part of the evidence is reviewed as what it is and can be rejected. Archives such as .zip are not accepted.

Proof of fund origin (FUNDS) documents wait for manual review. When a user has more than 10 FUNDS documents pending review, new upload URL requests for that user return 409 TOO_MANY_PENDING until the compliance team reviews them.


Encrypted uploads (OpenPGP)

Encryption is optional. The signed URL is HTTPS, so a regular upload is already protected in transit. If your policies require encrypting documents at rest before they leave your systems, every endpoint on this page also accepts files encrypted with OpenPGP. The file is decrypted automatically on arrival, and from then on it is processed exactly like a regular upload.

1. Get Manteca's public key

Request Manteca's OpenPGP public key from your integration contact, and encrypt every file to it.

2. Encrypt the file

Encrypt the file to Manteca's key. Both binary and ASCII-armored messages are accepted, and the message does not need to be signed.

gpg --encrypt --recipient <manteca-key-id> --output payslip-2026-10.pdf.pgp payslip-2026-10.pdf

The decrypted content must be one of the accepted formats for that document.

3. Request the upload URL with the encrypted file's name

Keep the original extension and append .pgp (or .gpg) in fileName: payslip-2026-10.pdf.pgp. Don't send extension; if you do, it must be the full ".pdf.pgp".

curl -X POST https://sandbox.manteca.dev/crypto/v2/documentations/uploadUrl \
  -H "md-api-key: $MD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
      "associatedSubId": "100037043",
      "docType": "FUNDS",
      "fileName": "payslip-2026-10.pdf.pgp"
  }'

A bare name such as payslip.pgp is also accepted: the real format is detected after decryption. A video is only accepted this way for a selfie.

4. Upload the encrypted file

PUT the encrypted binary to the signed URL, within its 90 seconds, with Content-Type: application/octet-stream.

curl -X PUT 'SIGNED_URL_FROM_STEP_3' \
  -H "Content-Type: application/octet-stream" \
  --data-binary '@/path/to/payslip-2026-10.pdf.pgp'

If the file can't be decrypted with Manteca's key, or its decrypted content isn't an accepted format, no document is created, even though the PUT returned 200.


Did this page help you?