curl --request PATCH \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload = {
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
}
}
headers = {
"X-API-KEY": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
supplyLimit: 123,
payments: {price: '<string>', recipientAddress: '<string>', currency: '<string>'}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/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/2022-06-09/collections/{collectionId}",
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([
'supplyLimit' => 123,
'payments' => [
'price' => '<string>',
'recipientAddress' => '<string>',
'currency' => '<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://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload := strings.NewReader("{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"actionId": "e9abb61c-9371-447e-af1a-86fb5c073754",
"action": "collections.update",
"status": "pending",
"data": {
"chain": "arbitrum",
"collection": {
"id": "42c43e55-f92d-4b25-bc99-d8309b6e1f38",
"contractAddress": "0x45ba91BCa91fA0D384022d3C279866811795FcF7"
},
"changes": "supplyLimit"
},
"startedAt": "2023-12-30T00:06:56.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/collections/<collectionId>",
"subscription": {
"enabled": true
}
}{
"error": true,
"message": "Invalid arguments or empty parameter <missing parameter>."
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}Update Collection
Update the sales details of a collection
API scope required: collections.update
curl --request PATCH \
--url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
}
}
'import requests
url = "https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload = {
"supplyLimit": 123,
"payments": {
"price": "<string>",
"recipientAddress": "<string>",
"currency": "<string>"
}
}
headers = {
"X-API-KEY": "<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': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
supplyLimit: 123,
payments: {price: '<string>', recipientAddress: '<string>', currency: '<string>'}
})
};
fetch('https://staging.crossmint.com/api/2022-06-09/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/2022-06-09/collections/{collectionId}",
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([
'supplyLimit' => 123,
'payments' => [
'price' => '<string>',
'recipientAddress' => '<string>',
'currency' => '<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://staging.crossmint.com/api/2022-06-09/collections/{collectionId}"
payload := strings.NewReader("{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"supplyLimit\": 123,\n \"payments\": {\n \"price\": \"<string>\",\n \"recipientAddress\": \"<string>\",\n \"currency\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"actionId": "e9abb61c-9371-447e-af1a-86fb5c073754",
"action": "collections.update",
"status": "pending",
"data": {
"chain": "arbitrum",
"collection": {
"id": "42c43e55-f92d-4b25-bc99-d8309b6e1f38",
"contractAddress": "0x45ba91BCa91fA0D384022d3C279866811795FcF7"
},
"changes": "supplyLimit"
},
"startedAt": "2023-12-30T00:06:56.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/collections/<collectionId>",
"subscription": {
"enabled": true
}
}{
"error": true,
"message": "Invalid arguments or empty parameter <missing parameter>."
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "Please try again in a few minutes. If the issue still persists, contact Crossmint support."
}Authorizations
Obtained in the Crossmint developer console
Path Parameters
This is the identifier for the collection related to the request. Every project has default collections: default-solana and default-polygon.
The create-collection API will result in collections with UUID formatted collectionId.
Example: 9c82ef99-617f-497d-9abb-fd355291681b
The create-collection-idempotent API allows you to specify an arbitrary identifier during the initial request.
Example: your-custom-identifier
Body
Response
A JSON object containing transactionId and status
"e9abb61c-9371-447e-af1a-86fb5c073754"
"collections.update"
"pending"
Show child attributes
Show child attributes
"2023-12-30T00:06:56.000Z"
"https://staging.crossmint.com/api/2022-06-09/collections/<collectionId>"
Show child attributes
Show child attributes
Was this page helpful?

