curl --request PATCH \
--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
{
"reuploadLinkedFiles": true,
"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"
}
]
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1"
}
}
EOFimport requests
url = "https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload = {
"reuploadLinkedFiles": True,
"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"
}
]
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1"
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reuploadLinkedFiles: true,
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'}]
},
licenseConfig: {mintingFee: 100, licenseTermsId: '1'}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reuploadLinkedFiles' => true,
'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'
]
]
],
'licenseConfig' => [
'mintingFee' => 100,
'licenseTermsId' => '1'
]
]),
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 \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("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 \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\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::Patch.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\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
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1",
"disabled": false
}
}Update IP Asset
Update an existing IP Asset
API scope required: nfts.update
curl --request PATCH \
--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
{
"reuploadLinkedFiles": true,
"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"
}
]
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1"
}
}
EOFimport requests
url = "https://staging.crossmint.com/api/v1/ip/collections/{collectionId}/ipassets/{customerFacingId}"
payload = {
"reuploadLinkedFiles": True,
"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"
}
]
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1"
}
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reuploadLinkedFiles: true,
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'}]
},
licenseConfig: {mintingFee: 100, licenseTermsId: '1'}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'reuploadLinkedFiles' => true,
'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'
]
]
],
'licenseConfig' => [
'mintingFee' => 100,
'licenseTermsId' => '1'
]
]),
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 \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("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 \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\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::Patch.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reuploadLinkedFiles\": true,\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 \"licenseConfig\": {\n \"mintingFee\": 100,\n \"licenseTermsId\": \"1\"\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
},
"licenseConfig": {
"mintingFee": 100,
"licenseTermsId": "1",
"disabled": false
}
}Headers
API key required for authentication
Body
Input schema for updating an existing IP asset on Story Protocol
Controls whether external files (like images) in the metadata should be reuploaded to decentralized storage (IPFS) (true) or referenced with their original URLs (false). Default is True.
true
New 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" }
]
}
Edit license config for the IP asset
Show child attributes
Show child attributes
{ "mintingFee": 100, "licenseTermsId": "1" }
Response
IP Asset updated
Response schema for updating an existing IP asset on Story Protocol
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
}
License configuration for the IP asset
Show child attributes
Show child attributes
{
"mintingFee": 100,
"licenseTermsId": "1",
"disabled": false
}
Was this page helpful?

