curl --request POST \
--url https://staging.crossmint.com/api/v1/ip/collections \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"chain": "story-testnet",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"reuploadLinkedFiles": true,
"supplyLimit": 100
}
'import requests
url = "https://staging.crossmint.com/api/v1/ip/collections"
payload = {
"chain": "story-testnet",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"reuploadLinkedFiles": True,
"supplyLimit": 100
}
headers = {
"X-API-KEY": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'story-testnet',
metadata: {
description: 'My Collection Description',
image: 'https://example.com/image.png',
name: 'My Collection',
symbol: 'MYCOL'
},
reuploadLinkedFiles: true,
supplyLimit: 100
})
};
fetch('https://staging.crossmint.com/api/v1/ip/collections', 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",
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([
'chain' => 'story-testnet',
'metadata' => [
'description' => 'My Collection Description',
'image' => 'https://example.com/image.png',
'name' => 'My Collection',
'symbol' => 'MYCOL'
],
'reuploadLinkedFiles' => true,
'supplyLimit' => 100
]),
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"
payload := strings.NewReader("{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}")
req, _ := http.NewRequest("POST", 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.post("https://staging.crossmint.com/api/v1/ip/collections")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1/ip/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}"
response = http.request(request)
puts response.read_body{
"actionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"onChain": {
"chain": "story-testnet",
"contractAddress": "0x123",
"explorerLink": "https://portal.story.foundation/collections/0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280"
}
}Create IP Collection
Create a new collection with a pre-computed id, or get an existing one if the id already exists
API scope required: collections.create
curl --request POST \
--url https://staging.crossmint.com/api/v1/ip/collections \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"chain": "story-testnet",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"reuploadLinkedFiles": true,
"supplyLimit": 100
}
'import requests
url = "https://staging.crossmint.com/api/v1/ip/collections"
payload = {
"chain": "story-testnet",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"reuploadLinkedFiles": True,
"supplyLimit": 100
}
headers = {
"X-API-KEY": "<x-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': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'story-testnet',
metadata: {
description: 'My Collection Description',
image: 'https://example.com/image.png',
name: 'My Collection',
symbol: 'MYCOL'
},
reuploadLinkedFiles: true,
supplyLimit: 100
})
};
fetch('https://staging.crossmint.com/api/v1/ip/collections', 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",
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([
'chain' => 'story-testnet',
'metadata' => [
'description' => 'My Collection Description',
'image' => 'https://example.com/image.png',
'name' => 'My Collection',
'symbol' => 'MYCOL'
],
'reuploadLinkedFiles' => true,
'supplyLimit' => 100
]),
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"
payload := strings.NewReader("{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}")
req, _ := http.NewRequest("POST", 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.post("https://staging.crossmint.com/api/v1/ip/collections")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1/ip/collections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain\": \"story-testnet\",\n \"metadata\": {\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\",\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\"\n },\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}"
response = http.request(request)
puts response.read_body{
"actionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"metadata": {
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
},
"onChain": {
"chain": "story-testnet",
"contractAddress": "0x123",
"explorerLink": "https://portal.story.foundation/collections/0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280"
}
}Headers
API key required for authentication
Body
The chain of the collection, either story or story-testnet
"story-testnet"
Story Protocol collection metadata
Show child attributes
Show child attributes
{
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
}
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
The supply limit of the collection
100
Response
Collection created
The action id of the collection
"d290f1ee-6c54-4b01-90e6-d701748f0851"
The id of the collection
"d290f1ee-6c54-4b01-90e6-d701748f0851"
Story Protocol collection metadata response
Show child attributes
Show child attributes
{
"description": "My Collection Description",
"image": "https://example.com/image.png",
"name": "My Collection",
"symbol": "MYCOL"
}
Show child attributes
Show child attributes
Was this page helpful?

