Skip to main content

pin_add

/api/v0/pin/add

Pin objects to local storage.

REQUEST

curl "https://ipfs.infura.io:5001/api/v0/pin/add?arg=<ipfs-path>&recursive=true&progress=<value>" \
-X POST \
-u "<API_KEY>:<API_KEY_SECRET>"

REQUEST PARAMS

  • arg [Required] - Path to object(s) to be pinned.
  • recursive [Optional] - Recursively pin the object linked to by the specified object(s). The default is true.
  • progress [Optional] - Show progress.

RESPONSE

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

BODY

{
"Pins": ["QmSTkR1kkqMuGEeBS49dxVJjgHRMH6cUYa7D3tcHDQ3ea3"]
}

RESULT FIELDS

  • Pins - An array of Pin hashes.