Skip to main content
PUT
/
v1
/
ip
/
collections
/
{collectionId}
Create Collection (Idempotent)
curl --request PUT \
  --url https://staging.crossmint.com/api/v1/ip/collections/{collectionId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <x-api-key>' \
  --data '
{
  "metadata": {
    "name": "My Collection",
    "symbol": "MYCOL",
    "description": "My Collection Description",
    "image": "https://example.com/image.png"
  },
  "chain": "story-testnet",
  "reuploadLinkedFiles": true,
  "supplyLimit": 100
}
'
import requests

url = "https://staging.crossmint.com/api/v1/ip/collections/{collectionId}"

payload = {
"metadata": {
"name": "My Collection",
"symbol": "MYCOL",
"description": "My Collection Description",
"image": "https://example.com/image.png"
},
"chain": "story-testnet",
"reuploadLinkedFiles": True,
"supplyLimit": 100
}
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({
metadata: {
name: 'My Collection',
symbol: 'MYCOL',
description: 'My Collection Description',
image: 'https://example.com/image.png'
},
chain: 'story-testnet',
reuploadLinkedFiles: true,
supplyLimit: 100
})
};

fetch('https://staging.crossmint.com/api/v1/ip/collections/{collectionId}', 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}",
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([
'metadata' => [
'name' => 'My Collection',
'symbol' => 'MYCOL',
'description' => 'My Collection Description',
'image' => 'https://example.com/image.png'
],
'chain' => 'story-testnet',
'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/{collectionId}"

payload := strings.NewReader("{\n \"metadata\": {\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\",\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\"\n },\n \"chain\": \"story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\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}")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\",\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\"\n },\n \"chain\": \"story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://staging.crossmint.com/api/v1/ip/collections/{collectionId}")

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 \"metadata\": {\n \"name\": \"My Collection\",\n \"symbol\": \"MYCOL\",\n \"description\": \"My Collection Description\",\n \"image\": \"https://example.com/image.png\"\n },\n \"chain\": \"story-testnet\",\n \"reuploadLinkedFiles\": true,\n \"supplyLimit\": 100\n}"

response = http.request(request)
puts response.read_body
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "actionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "metadata": {
    "name": "My Collection",
    "symbol": "MYCOL",
    "description": "My Collection Description",
    "image": "https://example.com/image.png"
  },
  "onChain": {
    "chain": "story-testnet",
    "contractAddress": "0x123",
    "explorerLink": "https://portal.story.foundation/collections/0xAC6062FF53fa41e61Fe01B89B83d9dB96b5F9280"
  }
}
This API is still under development. Contact support for early access.

Headers

X-API-KEY
string
required

API key required for authentication

Path Parameters

collectionId
string
required

Body

application/json
metadata
object
required

Story Protocol collection metadata

Example:
{
"name": "My Collection",
"symbol": "MYCOL",
"description": "My Collection Description",
"image": "https://example.com/image.png"
}
chain
string
required

The chain of the collection

Example:

"story-testnet"

reuploadLinkedFiles
boolean
default:true

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.

Example:

true

supplyLimit
number

The supply limit of the collection

Example:

100

Response

200 - application/json

Collection created

id
string
required

The id of the collection

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

actionId
string
required

The action id of the collection

Example:

"d290f1ee-6c54-4b01-90e6-d701748f0851"

metadata
object
required

Story Protocol collection metadata response

Example:
{
"name": "My Collection",
"symbol": "MYCOL",
"description": "My Collection Description",
"image": "https://example.com/image.png"
}
onChain
object
required