curl --request PUT \
--url https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data @- <<EOF
{
"owner": "email:creator@example.com:story-testnet",
"reuploadLinkedFiles": true,
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"sendNotification": true,
"locale": "en-US",
"licenseTerms": [
{
"type": "non-commercial-social-remixing"
}
]
}
EOFimport requests
url = "https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload = {
"owner": "email:creator@example.com:story-testnet",
"reuploadLinkedFiles": True,
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"sendNotification": True,
"locale": "en-US",
"licenseTerms": [{ "type": "non-commercial-social-remixing" }]
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: 'email:creator@example.com:story-testnet',
reuploadLinkedFiles: true,
nftMetadata: {
name: 'Art #123',
description: 'A unique story NFT',
image: 'https://example.com/nft/123.png'
},
ipAssetMetadata: {
title: 'Harry Potter and the Philosopher\'s Stone',
createdAt: '1997-06-26T00:00:00',
ipType: 'literature',
creators: [
{
name: 'JK Rowling',
email: 'JKRowling@example.com',
crossmintUserLocator: 'email:JKRowling@example.com:story',
description: 'Author',
contributionPercent: 80,
socialMedia: [{platform: 'Wikipedia', url: 'https://en.wikipedia.org/wiki/J._K._Rowling'}]
},
{
name: 'Thomas Taylor',
address: '0x1234567890123456789012345678901234567890',
description: 'Illustrator',
contributionPercent: 15
},
{
name: 'Bloomsbury Publishing',
email: 'BloomsburyPublishing@example.com',
address: '0x1234567890123456789012345678901234567890',
description: 'Publisher',
contributionPercent: 5,
socialMedia: [{platform: 'Website', url: 'https://www.bloomsbury.com/'}]
}
],
media: [
{name: 'ePub', url: 'link_to_epub', mimeType: 'application/epub+zip'},
{
name: 'Book Summary PDF',
url: 'link_to_book_summary_pdf',
mimeType: 'application/pdf'
}
],
attributes: [{key: 'ISBN', value: '978-0-7475-3269-0'}, {key: 'Genre', value: 'Fantasy'}]
},
sendNotification: true,
locale: 'en-US',
licenseTerms: [{type: 'non-commercial-social-remixing'}]
})
};
fetch('https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}', 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://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'owner' => 'email:creator@example.com:story-testnet',
'reuploadLinkedFiles' => true,
'nftMetadata' => [
'name' => 'Art #123',
'description' => 'A unique story NFT',
'image' => 'https://example.com/nft/123.png'
],
'ipAssetMetadata' => [
'title' => 'Harry Potter and the Philosopher\'s Stone',
'createdAt' => '1997-06-26T00:00:00',
'ipType' => 'literature',
'creators' => [
[
'name' => 'JK Rowling',
'email' => 'JKRowling@example.com',
'crossmintUserLocator' => 'email:JKRowling@example.com:story',
'description' => 'Author',
'contributionPercent' => 80,
'socialMedia' => [
[
'platform' => 'Wikipedia',
'url' => 'https://en.wikipedia.org/wiki/J._K._Rowling'
]
]
],
[
'name' => 'Thomas Taylor',
'address' => '0x1234567890123456789012345678901234567890',
'description' => 'Illustrator',
'contributionPercent' => 15
],
[
'name' => 'Bloomsbury Publishing',
'email' => 'BloomsburyPublishing@example.com',
'address' => '0x1234567890123456789012345678901234567890',
'description' => 'Publisher',
'contributionPercent' => 5,
'socialMedia' => [
[
'platform' => 'Website',
'url' => 'https://www.bloomsbury.com/'
]
]
]
],
'media' => [
[
'name' => 'ePub',
'url' => 'link_to_epub',
'mimeType' => 'application/epub+zip'
],
[
'name' => 'Book Summary PDF',
'url' => 'link_to_book_summary_pdf',
'mimeType' => 'application/pdf'
]
],
'attributes' => [
[
'key' => 'ISBN',
'value' => '978-0-7475-3269-0'
],
[
'key' => 'Genre',
'value' => 'Fantasy'
]
]
],
'sendNotification' => true,
'locale' => 'en-US',
'licenseTerms' => [
[
'type' => 'non-commercial-social-remixing'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-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://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload := strings.NewReader("{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<x-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.put("https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"actionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"onChain": {
"status": "success",
"chain": "story-testnet",
"contractAddress": "0x123",
"ipAssetId": "0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280",
"tokenId": "1",
"txId": "0x123",
"explorerLink": "https://portal.story.foundation/assets/0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280",
"owner": "0x123"
},
"licenseTerms": [
{
"type": "non-commercial-social-remixing",
"licenseTermsId": 1
}
],
"derivData": {
"parentIpIds": [
"0x123"
],
"licenseTermsIds": [
1
],
"maxMintingFee": 0,
"maxRevenueShare": 100,
"maxRts": 10000000
}
}Create IP Asset (Idempotent)
Create a new IP Asset with a pre-computed id, or get an existing one if the id already exists
API scope required: nfts.create
curl --request PUT \
--url https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data @- <<EOF
{
"owner": "email:creator@example.com:story-testnet",
"reuploadLinkedFiles": true,
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"sendNotification": true,
"locale": "en-US",
"licenseTerms": [
{
"type": "non-commercial-social-remixing"
}
]
}
EOFimport requests
url = "https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload = {
"owner": "email:creator@example.com:story-testnet",
"reuploadLinkedFiles": True,
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"sendNotification": True,
"locale": "en-US",
"licenseTerms": [{ "type": "non-commercial-social-remixing" }]
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
owner: 'email:creator@example.com:story-testnet',
reuploadLinkedFiles: true,
nftMetadata: {
name: 'Art #123',
description: 'A unique story NFT',
image: 'https://example.com/nft/123.png'
},
ipAssetMetadata: {
title: 'Harry Potter and the Philosopher\'s Stone',
createdAt: '1997-06-26T00:00:00',
ipType: 'literature',
creators: [
{
name: 'JK Rowling',
email: 'JKRowling@example.com',
crossmintUserLocator: 'email:JKRowling@example.com:story',
description: 'Author',
contributionPercent: 80,
socialMedia: [{platform: 'Wikipedia', url: 'https://en.wikipedia.org/wiki/J._K._Rowling'}]
},
{
name: 'Thomas Taylor',
address: '0x1234567890123456789012345678901234567890',
description: 'Illustrator',
contributionPercent: 15
},
{
name: 'Bloomsbury Publishing',
email: 'BloomsburyPublishing@example.com',
address: '0x1234567890123456789012345678901234567890',
description: 'Publisher',
contributionPercent: 5,
socialMedia: [{platform: 'Website', url: 'https://www.bloomsbury.com/'}]
}
],
media: [
{name: 'ePub', url: 'link_to_epub', mimeType: 'application/epub+zip'},
{
name: 'Book Summary PDF',
url: 'link_to_book_summary_pdf',
mimeType: 'application/pdf'
}
],
attributes: [{key: 'ISBN', value: '978-0-7475-3269-0'}, {key: 'Genre', value: 'Fantasy'}]
},
sendNotification: true,
locale: 'en-US',
licenseTerms: [{type: 'non-commercial-social-remixing'}]
})
};
fetch('https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}', 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://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'owner' => 'email:creator@example.com:story-testnet',
'reuploadLinkedFiles' => true,
'nftMetadata' => [
'name' => 'Art #123',
'description' => 'A unique story NFT',
'image' => 'https://example.com/nft/123.png'
],
'ipAssetMetadata' => [
'title' => 'Harry Potter and the Philosopher\'s Stone',
'createdAt' => '1997-06-26T00:00:00',
'ipType' => 'literature',
'creators' => [
[
'name' => 'JK Rowling',
'email' => 'JKRowling@example.com',
'crossmintUserLocator' => 'email:JKRowling@example.com:story',
'description' => 'Author',
'contributionPercent' => 80,
'socialMedia' => [
[
'platform' => 'Wikipedia',
'url' => 'https://en.wikipedia.org/wiki/J._K._Rowling'
]
]
],
[
'name' => 'Thomas Taylor',
'address' => '0x1234567890123456789012345678901234567890',
'description' => 'Illustrator',
'contributionPercent' => 15
],
[
'name' => 'Bloomsbury Publishing',
'email' => 'BloomsburyPublishing@example.com',
'address' => '0x1234567890123456789012345678901234567890',
'description' => 'Publisher',
'contributionPercent' => 5,
'socialMedia' => [
[
'platform' => 'Website',
'url' => 'https://www.bloomsbury.com/'
]
]
]
],
'media' => [
[
'name' => 'ePub',
'url' => 'link_to_epub',
'mimeType' => 'application/epub+zip'
],
[
'name' => 'Book Summary PDF',
'url' => 'link_to_book_summary_pdf',
'mimeType' => 'application/pdf'
]
],
'attributes' => [
[
'key' => 'ISBN',
'value' => '978-0-7475-3269-0'
],
[
'key' => 'Genre',
'value' => 'Fantasy'
]
]
],
'sendNotification' => true,
'locale' => 'en-US',
'licenseTerms' => [
[
'type' => 'non-commercial-social-remixing'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-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://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload := strings.NewReader("{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<x-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.put("https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"owner\": \"email:creator@example.com:story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"nftMetadata\": {\n \"name\": \"Art #123\",\n \"description\": \"A unique story NFT\",\n \"image\": \"https://example.com/nft/123.png\"\n },\n \"ipAssetMetadata\": {\n \"title\": \"Harry Potter and the Philosopher's Stone\",\n \"createdAt\": \"1997-06-26T00:00:00\",\n \"ipType\": \"literature\",\n \"creators\": [\n {\n \"name\": \"JK Rowling\",\n \"email\": \"JKRowling@example.com\",\n \"crossmintUserLocator\": \"email:JKRowling@example.com:story\",\n \"description\": \"Author\",\n \"contributionPercent\": 80,\n \"socialMedia\": [\n {\n \"platform\": \"Wikipedia\",\n \"url\": \"https://en.wikipedia.org/wiki/J._K._Rowling\"\n }\n ]\n },\n {\n \"name\": \"Thomas Taylor\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Illustrator\",\n \"contributionPercent\": 15\n },\n {\n \"name\": \"Bloomsbury Publishing\",\n \"email\": \"BloomsburyPublishing@example.com\",\n \"address\": \"0x1234567890123456789012345678901234567890\",\n \"description\": \"Publisher\",\n \"contributionPercent\": 5,\n \"socialMedia\": [\n {\n \"platform\": \"Website\",\n \"url\": \"https://www.bloomsbury.com/\"\n }\n ]\n }\n ],\n \"media\": [\n {\n \"name\": \"ePub\",\n \"url\": \"link_to_epub\",\n \"mimeType\": \"application/epub+zip\"\n },\n {\n \"name\": \"Book Summary PDF\",\n \"url\": \"link_to_book_summary_pdf\",\n \"mimeType\": \"application/pdf\"\n }\n ],\n \"attributes\": [\n {\n \"key\": \"ISBN\",\n \"value\": \"978-0-7475-3269-0\"\n },\n {\n \"key\": \"Genre\",\n \"value\": \"Fantasy\"\n }\n ]\n },\n \"sendNotification\": true,\n \"locale\": \"en-US\",\n \"licenseTerms\": [\n {\n \"type\": \"non-commercial-social-remixing\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"actionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"nftMetadata": {
"name": "Art #123",
"description": "A unique story NFT",
"image": "https://example.com/nft/123.png"
},
"ipAssetMetadata": {
"title": "Harry Potter and the Philosopher's Stone",
"createdAt": "1997-06-26T00:00:00",
"ipType": "literature",
"creators": [
{
"name": "JK Rowling",
"email": "JKRowling@example.com",
"crossmintUserLocator": "email:JKRowling@example.com:story",
"description": "Author",
"contributionPercent": 80,
"socialMedia": [
{
"platform": "Wikipedia",
"url": "https://en.wikipedia.org/wiki/J._K._Rowling"
}
]
},
{
"name": "Thomas Taylor",
"address": "0x1234567890123456789012345678901234567890",
"description": "Illustrator",
"contributionPercent": 15
},
{
"name": "Bloomsbury Publishing",
"email": "BloomsburyPublishing@example.com",
"address": "0x1234567890123456789012345678901234567890",
"description": "Publisher",
"contributionPercent": 5,
"socialMedia": [
{
"platform": "Website",
"url": "https://www.bloomsbury.com/"
}
]
}
],
"media": [
{
"name": "ePub",
"url": "link_to_epub",
"mimeType": "application/epub+zip"
},
{
"name": "Book Summary PDF",
"url": "link_to_book_summary_pdf",
"mimeType": "application/pdf"
}
],
"attributes": [
{
"key": "ISBN",
"value": "978-0-7475-3269-0"
},
{
"key": "Genre",
"value": "Fantasy"
}
]
},
"onChain": {
"status": "success",
"chain": "story-testnet",
"contractAddress": "0x123",
"ipAssetId": "0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280",
"tokenId": "1",
"txId": "0x123",
"explorerLink": "https://portal.story.foundation/assets/0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280",
"owner": "0x123"
},
"licenseTerms": [
{
"type": "non-commercial-social-remixing",
"licenseTermsId": 1
}
],
"derivData": {
"parentIpIds": [
"0x123"
],
"licenseTermsIds": [
1
],
"maxMintingFee": 0,
"maxRevenueShare": 100,
"maxRts": 10000000
}
}Headers
API key required for authentication
Body
Input schema for creating a new IP asset on Story Protocol
The owner (main creator) of the IP asset: Allowed formats:
<chain>:<address> or
email:<email_address>:<chain> or
userId:<userId>:<chain> or
twitter:<twitter_handle>:<chain>
[ "email:creator@example.com:story-testnet", "twitter:creator:story", "userId:123:story-testnet", "0x742d35Cc6634C0532925a3b844Bc454e4438f44e:story" ]
Metadata for the NFT representation of this IP asset
Show child attributes
Show child attributes
{ "name": "Art #123", "description": "A unique story NFT", "image": "https://example.com/nft/123.png" }
Metadata containing information about the IP asset itself
Show child attributes
Show child attributes
{ "title": "Harry Potter and the Philosopher's Stone", "createdAt": "1997-06-26T00:00:00", "ipType": "literature", "creators": [ { "name": "JK Rowling", "email": "JKRowling@example.com", "crossmintUserLocator": "email:JKRowling@example.com:story", "description": "Author", "contributionPercent": 80, "socialMedia": [ { "platform": "Wikipedia", "url": "https://en.wikipedia.org/wiki/J._K._Rowling" } ] }, { "name": "Thomas Taylor", "address": "0x1234567890123456789012345678901234567890", "description": "Illustrator", "contributionPercent": 15 }, { "name": "Bloomsbury Publishing", "email": "BloomsburyPublishing@example.com", "address": "0x1234567890123456789012345678901234567890", "description": "Publisher", "contributionPercent": 5, "socialMedia": [ { "platform": "Website", "url": "https://www.bloomsbury.com/" } ] } ], "media": [ { "name": "ePub", "url": "link_to_epub", "mimeType": "application/epub+zip" }, { "name": "Book Summary PDF", "url": "link_to_book_summary_pdf", "mimeType": "application/pdf" } ], "attributes": [ { "key": "ISBN", "value": "978-0-7475-3269-0" }, { "key": "Genre", "value": "Fantasy" } ] }
Controls whether external files (like images) in the NFT metadata should be reuploaded to decentralized storage (IPFS) (true) or referenced with their original URLs (false). Default is True.
true
Optional licensing parameters for the IP asset
License parameters
- Non-commercial Social Remixing License Terms
- Commercial Use License Terms
- Commercial Remix License Terms
Show child attributes
Show child attributes
{ "type": "non-commercial-social-remixing" }
[ { "type": "non-commercial-social-remixing" } ]
Data for the parent IP asset and license terms (for derivative IP assets only)
Show child attributes
Show child attributes
[ { "parentIpIds": ["0x123"], "licenseTermsIds": [1] } ]
Whether to send a notification to the custodial wallet address, or the recipient if it was minted to an email address.
The locale for the recipient's notification.
en-US, es-ES, fr-FR, it-IT, ko-KR, pt-PT, ja-JP, zh-CN, zh-TW, de-DE, ru-RU, tr-TR, uk-UA, th-TH, vi-VN, Klingon Response
IP Asset created
IPAsset response DTO
The id of the IPAsset
"d290f1ee-6c54-4b01-90e6-d701748f0851"
The action id for the IPAsset creation
"d290f1ee-6c54-4b01-90e6-d701748f0851"
Metadata for the NFT representation of this IP asset
Show child attributes
Show child attributes
{ "name": "Art #123", "description": "A unique story NFT", "image": "https://example.com/nft/123.png" }
Metadata containing information about the IP asset itself
Show child attributes
Show child attributes
{ "title": "Harry Potter and the Philosopher's Stone", "createdAt": "1997-06-26T00:00:00", "ipType": "literature", "creators": [ { "name": "JK Rowling", "email": "JKRowling@example.com", "crossmintUserLocator": "email:JKRowling@example.com:story", "description": "Author", "contributionPercent": 80, "socialMedia": [ { "platform": "Wikipedia", "url": "https://en.wikipedia.org/wiki/J._K._Rowling" } ] }, { "name": "Thomas Taylor", "address": "0x1234567890123456789012345678901234567890", "description": "Illustrator", "contributionPercent": 15 }, { "name": "Bloomsbury Publishing", "email": "BloomsburyPublishing@example.com", "address": "0x1234567890123456789012345678901234567890", "description": "Publisher", "contributionPercent": 5, "socialMedia": [ { "platform": "Website", "url": "https://www.bloomsbury.com/" } ] } ], "media": [ { "name": "ePub", "url": "link_to_epub", "mimeType": "application/epub+zip" }, { "name": "Book Summary PDF", "url": "link_to_book_summary_pdf", "mimeType": "application/pdf" } ], "attributes": [ { "key": "ISBN", "value": "978-0-7475-3269-0" }, { "key": "Genre", "value": "Fantasy" } ] }
- Option 1
- Option 2
Show child attributes
Show child attributes
Licensing parameters for the IP asset, NOTE: For detailed and updated license terms, refer to the 'Get IP Asset License' endpoint
License parameters
- Non-commercial Social Remixing License Terms
- Commercial Use License Terms
- Commercial Remix License Terms
Show child attributes
Show child attributes
{ "type": "non-commercial-social-remixing" }
[ { "type": "non-commercial-social-remixing" } ]
Data for the parent IP asset and license terms (for derivative IP assets only)
Show child attributes
Show child attributes
{ "parentIpIds": ["0x123"], "licenseTermsIds": [1], "maxMintingFee": 0, "maxRevenueShare": 100, "maxRts": 10000000 }
Was this page helpful?

