POST
/
api
/
website_user_roles
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 response = await client.websites.websiteUserRoles.assign({
    websiteId: '123e4567-e89b-12d3-a456-426614174000',
    websiteUserRoles: [
      { roleType: 'WEBSITE_ADMIN', walletAddress: '0x1234567890abcdef1234567890abcdef12345678' },
    ],
  });

  console.log(response.data);
}

main();
{
  "data": "<any>"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
Body

Query parameters for getWebsiteUserRoles

websiteId
string
required

UUID of the website

Example:

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

websiteUserRoles
object[]
required

Array of website user roles

Example:
[
  {
    "walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "roleType": "WEBSITE_ADMIN"
  }
]

Response

200
application/json
200

Schema for postWebsiteUserRoles response

data
any | null