PUT
/
files
/
swap
/
{cid}
curl --request PUT \
  --url https://api.pinata.cloud/v3/files/swap/{cid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "swap_cid": "bafkreig4zcnmqa23zff3ye7tuef6wrlq3aimffzm22axfeh3ddmawzlzz4"
}'
{
  "data": {
    "mapped_cid": "bafkreig4zcnmqa23zff3ye7tuef6wrlq3aimffzm22axfeh3ddmawzlzz4",
    "created_at": "2024-09-20T17:09:39.490275Z"
  }
}

Authorizations

Authorization
string
header
required

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

Path Parameters

cid
string
required

The target original CID

Body

application/json
swap_cid
string
required

The CID you want to redirect to

Response

200 - application/json
OK
data
object