---
title: "Pin by CID"
method: POST
path: "/files/public/pin_by_cid"
---

# Pin by CID

`POST /files/public/pin_by_cid`

`org:files:write`

## Request body

- object
  - `cid` string, required — CID of the file you want to pin
  - `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
  - `host_nodes` string[] — An optional array of host node IDs, use `ipfs id` in Kubo to get these

## Response `200`

OK

- object
  - `data` object
    - `id` string
    - `name` string
    - `cid` string
    - `keyvalues` object
    - `group_id` string
    - `status` string
    - `date_queued` string
    - `hose_nodes` string[]

---

[API](https://skmtc.net/pinata/apis/pinata-v3-api.md) · [All operations](https://skmtc.net/pinata/apis/pinata-v3-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pinata/pinata-v3-api/revisions/734684efd9c4/schema)
