Create a Collection
This endpoint allows you to create a new Collection.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
namestringRequired
Name for you NFT Collection
descriptionstringRequired
Description for your NFT Collection
imagestringRequired
URL pointing to an image for your NFT Collection
Responses
202Success
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
404
Not Found
application/json
post
/v1/collectionsExample
curl -X POST \
--url https://api.underdogprotocol.com/v1/collections \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {token}" \
-d '
{
"name": "Underdog Protocol",
"description": "Underdog Protocol Collection",
"image": "https://underdogprotocol.com/logo-dark.svg"
}'import axios from 'axios';
const createCollection = async () => {
try {
const response = await axios.post('https://api.underdogprotocol.com/v1/collections', {
name: 'Underdog Protocol',
description: 'Underdog Protocol Collection',
image: 'https://underdogprotocol.com/logo-dark.svg'
}, {
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
}
});
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Last updated