pin_add

/api/v0/pin/add

Pin objects to local storage.

REQUEST

1
POST https://ipfs.infura.io:5001/api/v0/pin/add?arg=<ipfs-path>&recursive=true&progress=<value>
Copied!

REQUEST PARAMS

  • arg [Required] - Path to object(s) to be pinned.
  • recursive [Optional] - Recursively pin the object linked to by the specified object(s). Default: “true”.
  • progress [Optional] - Show progress.

EXAMPLE

This endpoint expects a file in the body of the request as multipart/form-data.
1
// POST
2
curl -X POST "https://ipfs.infura.io:5001/api/v0/pin/add?arg=/ipfs/QmSTkR1kkqMuGEeBS49dxVJjgHRMH6cUYa7D3tcHDQ3ea3"
Copied!

RESPONSE

On success, the call to this endpoint returns with 200 and the following body:

RESULT FIELDS

  • Pins - An array of Pin hashes

BODY

1
{
2
"Pins": ["QmSTkR1kkqMuGEeBS49dxVJjgHRMH6cUYa7D3tcHDQ3ea3"]
3
}
Copied!
Last modified 3mo ago