POST
/
api
/
websites
JavaScript
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
  }
}

Authorizations

X-API-KEY
string
header
required

Body

application/json

Body

Schema for creating a new website

name
string
required

Name of the website

Example:

"My New Website"

organizationId
string<uuid>

Organization ID for which this website is being created

Minimum length: 1
Example:

"123e4567-e89b-12d3-a456-426614174001"

twitterUsername
string

Twitter username of the website account

Example:

"@mywebsite"

discordUrl
string

Discord URL of the website account

Example:

"https://discord.gg/mywebsite"

telegramUrl
string

Telegram URL of the website account

Example:

"https://t.me/mywebsite"

instagramUsername
string

Instagram username of the website account

Example:

"@mywebsite"

homeUrl
string

Home URL of the official website

Example:

"https://www.mywebsite.com"

Response

200

Schema representing a website

id
string<uuid>
required

Website ID

Example:

"123e4567-e89b-12d3-a456-426614174000"

name
string
required

Website name

Example:

"My Website"

termsSignedAt
string<date-time> | null
required

Date when terms were signed

Example:

"2023-10-01T12:00:00Z"

collections
Collection · object[]
required

Collections associated with the website

_count
object
required

Counts of related entities