Pinata Docs
Search
⌃K

Delete Submarine File

/content/:id
Submarined files are currently in a separate database than your other files, so deleting files must be done with the managed API endpoint.

Delete File

delete
https://managed.mypinata.cloud/api/v1
/content/:id
Parameters
Path
*
ID of the file (not the CID)
Header
x-api-key*
YOUR SUBMARINE KEY
Responses
200: OK
cURL
Node.JS
Python
Go
curl --location --request DELETE 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab' \
--header 'x-api-key: SUBMARINE KEY'
var axios = require('axios');
var config = {
method: 'delete',
url: 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab',
headers: {
'x-api-key': 'SUBMARINE KEY'
}
};
const res = await axios(config);
console.log(res.data);
import requests
url = "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab"
headers = {
'x-api-key': 'SUBMARINE KEY'
}
response = requests.request("DELETE", url, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab"
method := "DELETE"
)
client := &http.Client {
}
req, err := http.NewRequest(method, url)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-api-key", "SUBMARINE KEY")
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))
}