POST
/
api
/
users
/
metadatas
import SnagSolutions from '@snagsolutions/sdk';

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

async function main() {
  const metadata = await client.users.metadatas.create();

  console.log(metadata.id);
}

main();
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "websiteId": "123e4567-e89b-12d3-a456-426614174001",
  "organizationId": "123e4567-e89b-12d3-a456-426614174002",
  "walletGroupIdentifier": "wallet-group-id",
  "userGroupId": "user-group-id",
  "userGroup": {
    "id": "123e4567-e89b-12d3-a456-426614174002",
    "externalIdentifier": "user-group-external-id"
  },
  "user": {
    "id": "123e4567-e89b-12d3-a456-426614174002",
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678"
  },
  "createdAt": "2023-10-01T12:34:56Z"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
Body

Schema for a create user metadata schema

userId
string
walletAddress
string
stardustProfileIdentifier
string | null
isBlocked
boolean
stardustWalletIdentifier
string | null
epicAccountIdentifier
string | null
discordUser
string | null
discordUserId
string | null
twitterUser
string | null
twitterUserFollowersCount
number | null
twitterUserId
string | null
emailAddress
string | null
walletGroupIdentifier
string | null
userGroupId
string
telegramUserId
string | null
telegramUsername
string | null
displayName
string | null
externalLoyaltyScore
string | null
logoUrl
string | null
userGroupExternalIdentifier
string | null
externalIdentifier
string | null
Maximum length: 255
websiteId
string
organizationId
string

Response

200
application/json
200

Schema for a user metadata

id
string
required

Unique identifier for the user metadata

Example:

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

websiteId
string
required

Unique identifier for the website

Example:

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

organizationId
string
required

Unique identifier for the organization

Example:

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

walletGroupIdentifier
string | null
required

Identifier for the user wallet group set via api

Example:

"wallet-group-id"

userGroupId
string | null
required

Identifier for the user group set via api

Example:

"user-group-id"

userGroup
object
required
user
object
required
createdAt
string
required

Timestamp when the wallet was created

Example:

"2023-10-01T12:34:56Z"