POST
/
api
/
websites
import SnagSolutions from '@snagsolutions/sdk';

const client = new SnagSolutions({
  apiKey: process.env['X_API_KEY'], // This is the default and can be omitted
});

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
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Body

Schema for creating a new website

Response

200
application/json

200

Schema representing a website