Pinata Docs
Search…
Unpin

Endpoint

/pinning/unpin

Description

This endpoint allows the sender to unpin content they previously uploaded to Pinata's IPFS nodes.

Type

DELETE

Headers

pinata_api_key: (put your personal pinata api key here)
pinata_secret_api_key: (put your personal pinata secret api key here)

OR

Authorization: Bearer (put your pinata JWT here)

Request Parameters

1
hashToUnpin: (string) - The hash of the content you wish to have Pinata unpin from its nodes.
Copied!

Response

If the operation is successful, you will receive back an "OK" REST 200 status.

Postman Example

JavaScript With Axios Example

In the javascript example below, we pass in our API keys from elsewhere (hopefully in a secure way).
We also pass in the pin we wish to remove from Pinata and set it as the value for the "hashToUnpin" key in our request URL.
1
const axios = require('axios');
2
3
export const removePinFromIPFS = (pinataApiKey, pinataSecretApiKey, hashToUnpin) => {
4
const url = `https://api.pinata.cloud/pinning/unpin/${hashToUnpin}`;
5
return axios
6
.delete(url, {
7
headers: {
8
pinata_api_key: pinataApiKey,
9
pinata_secret_api_key: pinataSecretApiKey
10
}
11
})
12
.then(function (response) {
13
//handle response here
14
})
15
.catch(function (error) {
16
//handle error here
17
});
18
};
Copied!

We want your feedback!

Have a suggestion? Have a complaint? Confused about something in the documentation? Just want to say hi?
We want to make Pinata the best product available. That involves listening to our users and addressing their needs.
Send us an email at [email protected] and we'll see how we can help.
Last modified 3mo ago