---
title: "Pin an object"
method: POST
path: "/ipfs/pin/add/{IPFS_path}"
tags: ["IPFS » Pins"]
---

# Pin an object

`POST /ipfs/pin/add/{IPFS_path}`

Pinning is necessary to avoid regular garbage collection (deletion) of IPFS objects. Non-pinned objects are regularly being removed without prior notice. Pinned objects are counted in your user storage quota.

**Note:** If the object was pinned to Filecoin (using `filecoin=true`), it cannot be removed or unpinned due to Filecoin's immutable and persistent storage guarantees. Please ensure careful consideration when pinning objects to Filecoin, as the action is irreversible.

## Path parameters

- `IPFS_path` string, required — Path to the IPFS object

## Query parameters

- `filecoin` boolean

## Response `200`

Returns pinned object

- object
  - `ipfs_hash` string, required — IPFS hash of the pinned object
  - `state` 'queued' | 'pinned' | 'unpinned' | 'failed' | 'gc', required — State of the pin action
  - `filecoin` boolean, required — Whether filecoin was used to pin the resource.

## Other responses

- `400` — Bad request
- `403` — Authentication secret is missing or invalid
- `404` — Component not found
- `418` — IP has been auto-banned for extensive sending of requests after usage limit has been reached
- `425` — Pin queue is currently full, not accepting new txs straight away
- `429` — Usage limit reached
- `500` — Internal Server Error

---

[API](https://skmtc.net/txpipe/apis/blockfrost-io-api-documentation.md) · [All operations](https://skmtc.net/txpipe/apis/blockfrost-io-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/txpipe/blockfrost-io-api-documentation/revisions/4a2f67b16876/schema)
