---
title: "Upload content to IPFS"
method: POST
path: "/add"
---

# Upload content to IPFS

`POST /add`

## Request

- Base URL: `https://cdn.kleros.link`
- URL: `https://cdn.kleros.link/add`
- Auth: none declared
- TypeScript: <https://skmtc.dev/kleros/apis/kleros-ipfs-gateway/docs/add/post.ts> (a function with typed inputs; its response is checked against the schema)

Upload a file to IPFS via the Kleros gateway. Returns the IPFS CID of the uploaded content. Use this to upload dispute templates, evidence files, policy documents, and Curate item attachments before referencing them on-chain.

## Request body `multipart/form-data`

- object
  - `data` string, binary, required: The file content to upload. For JSON objects (templates, evidence), encode as UTF-8 string.

## Response `200`

File uploaded and pinned successfully

- object
  - `cids` string[]: Array of IPFS CIDs for the uploaded content

## Other responses

- `400`: Bad request — missing or malformed file data
- `413`: File too large

---

[API](https://skmtc.dev/kleros/apis/kleros-ipfs-gateway.md) - [All operations](https://skmtc.dev/kleros/apis/kleros-ipfs-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/kleros/apis/kleros-ipfs-gateway/revisions/5cd8dce08efe?raw)
