Mint an asset
curl --request POST \
--url https://admin.snagsolutions.io/api/minting/contracts/mint \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emailAddress": "<string>",
"walletAddress": "<string>",
"quantity": 1,
"shippingId": "<string>",
"agreedToSendW9": true,
"customInputValue": "<string>"
}
'import requests
url = "https://admin.snagsolutions.io/api/minting/contracts/mint"
payload = {
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emailAddress": "<string>",
"walletAddress": "<string>",
"quantity": 1,
"shippingId": "<string>",
"agreedToSendW9": True,
"customInputValue": "<string>"
}
headers = {
"X-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-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
emailAddress: '<string>',
walletAddress: '<string>',
quantity: 1,
shippingId: '<string>',
agreedToSendW9: true,
customInputValue: '<string>'
})
};
fetch('https://admin.snagsolutions.io/api/minting/contracts/mint', 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://admin.snagsolutions.io/api/minting/contracts/mint",
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([
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'emailAddress' => '<string>',
'walletAddress' => '<string>',
'quantity' => 1,
'shippingId' => '<string>',
'agreedToSendW9' => true,
'customInputValue' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://admin.snagsolutions.io/api/minting/contracts/mint"
payload := strings.NewReader("{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://admin.snagsolutions.io/api/minting/contracts/mint")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/minting/contracts/mint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"mintingContractAssetMintStatusId": "00000000-0000-0000-0000-000000000000"
}{
"message": "Request body is invalid"
}{
"message": "Not found"
}{
"message": "Too many requests"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Minting
Mint an asset
Generates a signature for minting an asset on a given contract
POST
/
api
/
minting
/
contracts
/
mint
Mint an asset
curl --request POST \
--url https://admin.snagsolutions.io/api/minting/contracts/mint \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emailAddress": "<string>",
"walletAddress": "<string>",
"quantity": 1,
"shippingId": "<string>",
"agreedToSendW9": true,
"customInputValue": "<string>"
}
'import requests
url = "https://admin.snagsolutions.io/api/minting/contracts/mint"
payload = {
"assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emailAddress": "<string>",
"walletAddress": "<string>",
"quantity": 1,
"shippingId": "<string>",
"agreedToSendW9": True,
"customInputValue": "<string>"
}
headers = {
"X-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-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assetId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
contractId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
emailAddress: '<string>',
walletAddress: '<string>',
quantity: 1,
shippingId: '<string>',
agreedToSendW9: true,
customInputValue: '<string>'
})
};
fetch('https://admin.snagsolutions.io/api/minting/contracts/mint', 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://admin.snagsolutions.io/api/minting/contracts/mint",
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([
'assetId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'contractId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'emailAddress' => '<string>',
'walletAddress' => '<string>',
'quantity' => 1,
'shippingId' => '<string>',
'agreedToSendW9' => true,
'customInputValue' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-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://admin.snagsolutions.io/api/minting/contracts/mint"
payload := strings.NewReader("{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-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://admin.snagsolutions.io/api/minting/contracts/mint")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://admin.snagsolutions.io/api/minting/contracts/mint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"assetId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"contractId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailAddress\": \"<string>\",\n \"walletAddress\": \"<string>\",\n \"quantity\": 1,\n \"shippingId\": \"<string>\",\n \"agreedToSendW9\": true,\n \"customInputValue\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"mintingContractAssetMintStatusId": "00000000-0000-0000-0000-000000000000"
}{
"message": "Request body is invalid"
}{
"message": "Not found"
}{
"message": "Too many requests"
}{
"success": false,
"message": "Internal server error",
"debugInfo": "Stack trace or additional error details"
}Authorizations
Body
application/json
Body
Minimum string length:
1Available options:
stripe, shipstation, drip, twitter_bearer, epic_games, stardust, twitter_clientsecret, immutable_passport, sequence, google, walletConnect, auth0, privy, thirdweb, steam, discord, google_api, shopify, ultra, github, twilio Response
202
Use the id returned here to fetch the status and signature of the mint from the /api/minting/status/:id endpoint
Was this page helpful?
⌘I