Upload

Upload a file and get a public download link via MPP

Munition Upload over MPP: pay 0.005 USDC on Base/Polygon/Arbitrum using a stablecoin-only EIP-3009 charge authorization sent in Authorization: Payment. Returns a presigned PUT URL and a public files.munition.io link for sharing reports, PDFs, images or other files. Send the exact file bytes using the returned uploadHeaders before sharing publicUrl.

post/v1/mpp/uploads

Request

  • Base URL: https://api.munition.io
  • URL: https://api.munition.io/v1/mpp/uploads
  • Auth: none required

Headers

Idempotency-Keystring

Optional stable retry key. If omitted, the server derives it from the Payment credential. Reuse the same request and key on retries.

Request body

filenamestring

Optional original filename used for a readable public URL slug, for example report.pdf or screenshot.png.

mimestring required

MIME type of the file to upload, for example application/pdf, image/png, text/plain, or application/json.

sizeinteger required

File size in bytes. The short-10mb tier accepts one file up to 10 MB.

sha256string required

Lowercase hex-encoded SHA-256 digest of the exact file bytes, used to bind the upload slot to the final file.

sha256Base64string required

Base64-encoded 32-byte SHA-256 digest of the same file bytes, sent as x-amz-checksum-sha256 during the S3 PUT.

tagsstring[]

Stable upload tags for categorization.

tier'short-10mb'

Upload tier. short-10mb costs 0.005 USDC, accepts one file up to 10 MB, and retains the public link for 7 days.

Response

Paid upload slot

idstring required

Munition upload slot id.

uploadUrlstring uri required

Presigned S3 URL where the client uploads file bytes after payment.

uploadMethod'PUT' required

HTTP method to use when uploading bytes to uploadUrl.

uploadHeadersobject required

Required headers for the uploadUrl PUT, including content-type, content-length, checksum, and sha256 metadata.

publicUrlstring uri required

Public non-guessable files.munition.io URL for sharing the uploaded file.

expiresAtstring date-time required

When the public file link expires and the file is deleted.

uploadUrlExpiresAtstring date-time required

When the presigned upload URL expires.

maxSizeinteger required

Maximum allowed file size in bytes for this upload slot.

tagsstring[] required

Stable upload tags for categorization.

Changes

No recorded changes to this operation across all 1 revision of this API.