Skip to main content
POST
Pins a file to IPFS and returns the URI to reference it by. Use it for the icon on Import Token and for the documents on Update Profile, when you do not host those files yourself. The request is multipart/form-data with a single field named file.

Accepted files

PNG, JPEG, WebP, GIF, PDF and JSON. The type is determined from the file’s own bytes, not from its name or from the content type you send. Anything else is refused with UNSUPPORTED_FILE_TYPE. Documents must be 1022 KB or smaller. Images are re-encoded before pinning, so they are held to a budget rather than a hard limit and a larger source image is usually fine. The transport itself caps any single upload at 10 MB. For a document over the limit, host it yourself and give the https URL with a sha256 content hash instead. The refusal says so.

Response Fields

object
Pinned content is public and permanent for as long as it is pinned. Anyone with the CID can read it. Never upload anything holding personal data, and treat a mistaken upload as published rather than as deletable.

Error Codes