import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const website = await client.websites.create({ name: 'My New Website' });
console.log(website.id);
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Website",
"termsSignedAt": "2023-10-01T12:00:00Z",
"collections": [
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"name": "Art Collection",
"imageUrl": "https://example.com/image.png",
"royaltyFee": 5,
"royaltyFeeAddress": "0xabc123..."
}
],
"_count": {
"mintingContractAssets": 42
}
}
Creates a new website
import SnagSolutions from '@snagsolutions/sdk';
const client = new SnagSolutions({
apiKey: 'My API Key',
});
const website = await client.websites.create({ name: 'My New Website' });
console.log(website.id);
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My Website",
"termsSignedAt": "2023-10-01T12:00:00Z",
"collections": [
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"name": "Art Collection",
"imageUrl": "https://example.com/image.png",
"royaltyFee": 5,
"royaltyFeeAddress": "0xabc123..."
}
],
"_count": {
"mintingContractAssets": 42
}
}
Body
Schema for creating a new website
200
Schema representing a website
Was this page helpful?