Skip to main content
POST
/
api
/
websites
Create website
curl --request POST \
  --url https://admin.snagsolutions.io/api/websites \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "My New Website",
  "organizationId": "123e4567-e89b-12d3-a456-426614174001",
  "twitterUsername": "@mywebsite",
  "discordUrl": "https://discord.gg/mywebsite",
  "telegramUrl": "https://t.me/mywebsite",
  "instagramUsername": "@mywebsite",
  "homeUrl": "https://www.mywebsite.com"
}
'
{
  "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..."
    }
  ],
  "onchainTokens": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174003",
      "address": "0x1234567890123456789012345678901234567890",
      "chainId": "1",
      "relayerId": "relayer-123",
      "currencyId": "123e4567-e89b-12d3-a456-426614174004",
      "createdAt": "2023-10-01T12:00:00Z",
      "updatedAt": "2023-10-01T12:00:00Z",
      "syncedAt": "2023-10-01T12:00:00Z",
      "deletedAt": "2023-10-01T12:00:00Z",
      "organizationId": "123e4567-e89b-12d3-a456-426614174005",
      "websiteId": "123e4567-e89b-12d3-a456-426614174006"
    }
  ],
  "_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 string 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

onchainTokens
OnchainToken · object[]
required

Onchain tokens associated with the website

_count
object
required

Counts of related entities