Pinata Docs
Search
⌃K

Update File Info/Unsubmarine

/content/:id
This endpoint can be used to update information about a Submarined file, and it can be used to move the file to the public IPFS network.
Note: The Submarine API currently does not provide progress updates when unsubmarining files, and the process can take a very long time

Updating Submarined File

put
https://managed.mypinata.cloud
/api/v1/content/:id
Parameters
Path
id*
ID of the file (not CID)
Header
x-api-key*
SUBMARINE KEY
Body
pinToIPFS
Set to true if you want to move the file to the public IPFS network
name
Updated name for the file
Responses
200: OK
cURL
Node.js
Python
Go
curl --location --request PUT 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab' \
--header 'x-api-key: SUBMARINE KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "New Name",
"pinToIPFS": true
}'
var axios = require('axios');
var data = JSON.stringify({
"name": "New Name",
"pinToIPFS": true
});
var config = {
method: 'put',
url: 'https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab',
headers: {
'x-api-key': 'SUBMARINE KEY',
'Content-Type': 'application/json'
},
data : data
};
const res = await axios(config);
console.log(res.data);
import requests
import json
url = "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab"
payload = json.dumps({
"name": "New Name",
"pinToIPFS": True
})
headers = {
'x-api-key': 'SUBMARINE KEY',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://managed.mypinata.cloud/api/v1/content/95c904a0-4d61-4598-a4c8-fb5f0793c7ab"
method := "PUT"
payload := strings.NewReader(`{
"name": "New Name",
"pinToIPFS": true
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("x-api-key", "SUBMARINE KEY")
req.Header.Add("Content-Type", "application/json")
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))
}