Skip to main content
POST
/
files
Upload a File
curl --request POST \
  --url https://uploads.pinata.cloud/v3/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form network=private \
  --form file='@example-file' \
  --form 'name=<string>' \
  --form 'group_id=<string>' \
  --form 'keyvalues={}' \
  --form car=true
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "cid": "<string>",
    "created_at": "<string>",
    "size": 123,
    "number_of_files": 123,
    "mime_type": "<string>",
    "user_id": "<string>",
    "group_id": "<string>",
    "is_duplicate": true
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.pinata.cloud/llms.txt

Use this file to discover all available pages before exploring further.

The V3 Upload endpoint currently does not support folder uploads. Please use the legacy pinFileToIPFS endpoint

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
network
enum<string>
default:private
required

Determine if the file should be uploaded to either the public or private IPFS network. If not designated it will default to private.

Available options:
public,
private
file
file
required

File object you want to upload

name
string

Add a custom name for the file

group_id
string

ID of the group you would like to upload

keyvalues
object

Add additional key value metadata to files upon upload

car
boolean

Upload a file as a raw CAR file (only supported for public network)

Response

200 - application/json

Successful response

data
object