Refresh collection metadata
curl --request POST \
--url https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata \
--header 'Content-Type: application/json' \
--header 'x-immutable-api-key: <api-key>' \
--data '
{
"collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
}
}
'import requests
url = "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata"
payload = { "collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
} }
headers = {
"x-immutable-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-immutable-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection_metadata: {
name: 'Gigantic Lizards',
symbol: 'GLZ',
description: 'This is the Gigantic Lizards collection',
image: 'https://some-url',
external_link: 'https://some-url',
contract_uri: 'https://some-url',
base_uri: 'https://some-url'
}
})
};
fetch('https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection_metadata' => [
'name' => 'Gigantic Lizards',
'symbol' => 'GLZ',
'description' => 'This is the Gigantic Lizards collection',
'image' => 'https://some-url',
'external_link' => 'https://some-url',
'contract_uri' => 'https://some-url',
'base_uri' => 'https://some-url'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-immutable-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata"
payload := strings.NewReader("{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-immutable-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata")
.header("x-immutable-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-immutable-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}"
response = http.request(request)
puts response.read_body{
"contract_address": "<string>",
"chain": {
"id": "eip155:13372",
"name": "imtbl-zkevm-testnet"
},
"collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "VALIDATION_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "UNAUTHORISED_REQUEST",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "AUTHENTICATION_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "RESOURCE_NOT_FOUND",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "INTERNAL_SERVER_ERROR",
"details": {}
}collections
Refresh collection metadata
Refresh collection metadata
POST
/
v1
/
chains
/
{chain_name}
/
collections
/
{contract_address}
/
refresh-metadata
Refresh collection metadata
curl --request POST \
--url https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata \
--header 'Content-Type: application/json' \
--header 'x-immutable-api-key: <api-key>' \
--data '
{
"collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
}
}
'import requests
url = "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata"
payload = { "collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
} }
headers = {
"x-immutable-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-immutable-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
collection_metadata: {
name: 'Gigantic Lizards',
symbol: 'GLZ',
description: 'This is the Gigantic Lizards collection',
image: 'https://some-url',
external_link: 'https://some-url',
contract_uri: 'https://some-url',
base_uri: 'https://some-url'
}
})
};
fetch('https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'collection_metadata' => [
'name' => 'Gigantic Lizards',
'symbol' => 'GLZ',
'description' => 'This is the Gigantic Lizards collection',
'image' => 'https://some-url',
'external_link' => 'https://some-url',
'contract_uri' => 'https://some-url',
'base_uri' => 'https://some-url'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-immutable-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata"
payload := strings.NewReader("{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-immutable-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata")
.header("x-immutable-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-immutable-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collection_metadata\": {\n \"name\": \"Gigantic Lizards\",\n \"symbol\": \"GLZ\",\n \"description\": \"This is the Gigantic Lizards collection\",\n \"image\": \"https://some-url\",\n \"external_link\": \"https://some-url\",\n \"contract_uri\": \"https://some-url\",\n \"base_uri\": \"https://some-url\"\n }\n}"
response = http.request(request)
puts response.read_body{
"contract_address": "<string>",
"chain": {
"id": "eip155:13372",
"name": "imtbl-zkevm-testnet"
},
"collection_metadata": {
"name": "Gigantic Lizards",
"symbol": "GLZ",
"description": "This is the Gigantic Lizards collection",
"image": "https://some-url",
"external_link": "https://some-url",
"contract_uri": "https://some-url",
"base_uri": "https://some-url"
}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "VALIDATION_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "UNAUTHORISED_REQUEST",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "AUTHENTICATION_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "RESOURCE_NOT_FOUND",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "INTERNAL_SERVER_ERROR",
"details": {}
}Authorizations
ImmutableApiKeyBearerAuthWithClientBearerAuth
Path Parameters
The address contract
The name of chain
Example:
"imtbl-zkevm-testnet"
Body
application/json
The request body
Show child attributes
Show child attributes
Was this page helpful?
⌘I