Mint NFTs
curl --request POST \
--url https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests \
--header 'Content-Type: application/json' \
--header 'x-immutable-api-key: <api-key>' \
--data '
{
"assets": [
{
"reference_id": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0",
"owner_address": "0xc344c05eef8876e517072f879dae8905aa2b956b",
"token_id": "1",
"amount": "1",
"metadata": {
"name": "Sword",
"description": "2022-08-16T17:43:26.991388Z",
"image": "https://some-url",
"external_url": "https://some-url",
"animation_url": "https://some-url",
"youtube_url": "https://some-url",
"attributes": [
{
"trait_type": "Aqua Power",
"value": "Happy",
"display_type": "number"
}
]
}
}
]
}
'import requests
url = "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests"
payload = { "assets": [
{
"reference_id": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0",
"owner_address": "0xc344c05eef8876e517072f879dae8905aa2b956b",
"token_id": "1",
"amount": "1",
"metadata": {
"name": "Sword",
"description": "2022-08-16T17:43:26.991388Z",
"image": "https://some-url",
"external_url": "https://some-url",
"animation_url": "https://some-url",
"youtube_url": "https://some-url",
"attributes": [
{
"trait_type": "Aqua Power",
"value": "Happy",
"display_type": "number"
}
]
}
}
] }
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({
assets: [
{
reference_id: '67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0',
owner_address: '0xc344c05eef8876e517072f879dae8905aa2b956b',
token_id: '1',
amount: '1',
metadata: {
name: 'Sword',
description: '2022-08-16T17:43:26.991388Z',
image: 'https://some-url',
external_url: 'https://some-url',
animation_url: 'https://some-url',
youtube_url: 'https://some-url',
attributes: [{trait_type: 'Aqua Power', value: 'Happy', display_type: 'number'}]
}
}
]
})
};
fetch('https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests', 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}/nfts/mint-requests",
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([
'assets' => [
[
'reference_id' => '67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0',
'owner_address' => '0xc344c05eef8876e517072f879dae8905aa2b956b',
'token_id' => '1',
'amount' => '1',
'metadata' => [
'name' => 'Sword',
'description' => '2022-08-16T17:43:26.991388Z',
'image' => 'https://some-url',
'external_url' => 'https://some-url',
'animation_url' => 'https://some-url',
'youtube_url' => 'https://some-url',
'attributes' => [
[
'trait_type' => 'Aqua Power',
'value' => 'Happy',
'display_type' => 'number'
]
]
]
]
]
]),
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}/nfts/mint-requests"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\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}/nfts/mint-requests")
.header("x-immutable-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests")
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 \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"imx_mint_requests_limit": "<string>",
"imx_mint_requests_limit_reset": "<string>",
"imx_remaining_mint_requests": "<string>",
"imx_mint_requests_retry_after": "<string>"
}{
"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": "CONFLICT_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "TOO_MANY_REQUESTS_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "INTERNAL_SERVER_ERROR",
"details": {}
}nfts
Mint NFTs
Create a mint request to mint a set of NFTs for a given collection
POST
/
v1
/
chains
/
{chain_name}
/
collections
/
{contract_address}
/
nfts
/
mint-requests
Mint NFTs
curl --request POST \
--url https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests \
--header 'Content-Type: application/json' \
--header 'x-immutable-api-key: <api-key>' \
--data '
{
"assets": [
{
"reference_id": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0",
"owner_address": "0xc344c05eef8876e517072f879dae8905aa2b956b",
"token_id": "1",
"amount": "1",
"metadata": {
"name": "Sword",
"description": "2022-08-16T17:43:26.991388Z",
"image": "https://some-url",
"external_url": "https://some-url",
"animation_url": "https://some-url",
"youtube_url": "https://some-url",
"attributes": [
{
"trait_type": "Aqua Power",
"value": "Happy",
"display_type": "number"
}
]
}
}
]
}
'import requests
url = "https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests"
payload = { "assets": [
{
"reference_id": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0",
"owner_address": "0xc344c05eef8876e517072f879dae8905aa2b956b",
"token_id": "1",
"amount": "1",
"metadata": {
"name": "Sword",
"description": "2022-08-16T17:43:26.991388Z",
"image": "https://some-url",
"external_url": "https://some-url",
"animation_url": "https://some-url",
"youtube_url": "https://some-url",
"attributes": [
{
"trait_type": "Aqua Power",
"value": "Happy",
"display_type": "number"
}
]
}
}
] }
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({
assets: [
{
reference_id: '67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0',
owner_address: '0xc344c05eef8876e517072f879dae8905aa2b956b',
token_id: '1',
amount: '1',
metadata: {
name: 'Sword',
description: '2022-08-16T17:43:26.991388Z',
image: 'https://some-url',
external_url: 'https://some-url',
animation_url: 'https://some-url',
youtube_url: 'https://some-url',
attributes: [{trait_type: 'Aqua Power', value: 'Happy', display_type: 'number'}]
}
}
]
})
};
fetch('https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests', 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}/nfts/mint-requests",
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([
'assets' => [
[
'reference_id' => '67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0',
'owner_address' => '0xc344c05eef8876e517072f879dae8905aa2b956b',
'token_id' => '1',
'amount' => '1',
'metadata' => [
'name' => 'Sword',
'description' => '2022-08-16T17:43:26.991388Z',
'image' => 'https://some-url',
'external_url' => 'https://some-url',
'animation_url' => 'https://some-url',
'youtube_url' => 'https://some-url',
'attributes' => [
[
'trait_type' => 'Aqua Power',
'value' => 'Happy',
'display_type' => 'number'
]
]
]
]
]
]),
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}/nfts/mint-requests"
payload := strings.NewReader("{\n \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\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}/nfts/mint-requests")
.header("x-immutable-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.immutable.com/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests")
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 \"assets\": [\n {\n \"reference_id\": \"67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0\",\n \"owner_address\": \"0xc344c05eef8876e517072f879dae8905aa2b956b\",\n \"token_id\": \"1\",\n \"amount\": \"1\",\n \"metadata\": {\n \"name\": \"Sword\",\n \"description\": \"2022-08-16T17:43:26.991388Z\",\n \"image\": \"https://some-url\",\n \"external_url\": \"https://some-url\",\n \"animation_url\": \"https://some-url\",\n \"youtube_url\": \"https://some-url\",\n \"attributes\": [\n {\n \"trait_type\": \"Aqua Power\",\n \"value\": \"Happy\",\n \"display_type\": \"number\"\n }\n ]\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"imx_mint_requests_limit": "<string>",
"imx_mint_requests_limit_reset": "<string>",
"imx_remaining_mint_requests": "<string>",
"imx_mint_requests_retry_after": "<string>"
}{
"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": "CONFLICT_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "TOO_MANY_REQUESTS_ERROR",
"details": {}
}{
"message": "all fields must be provided",
"link": "https://docs.x.immutable.com/reference/#/",
"trace_id": "e47634b79a5cd6894ddc9639ec4aad26",
"code": "INTERNAL_SERVER_ERROR",
"details": {}
}Authorizations
Path Parameters
The address of contract
The name of chain
Example:
"imtbl-zkevm-testnet"
Body
application/json
Create Mint Request Body
List of nft to be minted
Required array length:
1 - 100 elementsShow child attributes
Show child attributes
Was this page helpful?
⌘I