Pinata Docs
Search…
⌃K

Remove Files (Unpin)

/pinning/unpin
The process of removing files from IPFS is called unpinning. When you unpin something from an IPFS storage node, it is marked for garbage collection. When garbage collection runs, the content is permanently deleted from the storage node.

Unpinning a File

delete
https://api.pinata.cloud
/pinning/unpin/:CID
cURL
Node.js
Python
Go
curl --location --request DELETE 'https://api.pinata.cloud/pinning/unpin/CID' \
--header 'Authorization: Bearer PINATA JWT'
var axios = require('axios');
var config = {
method: 'delete',
url: 'https://api.pinata.cloud/pinning/unpin/CID',
headers: {
'Authorization': 'Bearer PINATA JWT'
}
};
const res = await axios(config);
console.log(res.data);va
import requests
url = "https://api.pinata.cloud/pinning/unpin/CID"
payload={}
headers = {
'Authorization': 'Bearer PINATA JWT'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.pinata.cloud/pinning/unpin/CID"
method := "DELETE"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer PINATA JWT")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}