> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snagsolutions.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Assign roles to users for a website

> Assign roles to users for a specific website



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/website_user_roles
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/website_user_roles:
    post:
      tags:
        - Website
      summary: Assign roles to users for a website
      description: Assign roles to users for a specific website
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                websiteId:
                  type: string
                  format: uuid
                  title: Website ID
                  description: UUID of the website
                  example: 123e4567-e89b-12d3-a456-426614174000
                websiteUserRoles:
                  type: array
                  items:
                    type: object
                    properties:
                      walletAddress:
                        type: string
                        title: Wallet Address
                        description: Wallet address of the user
                        example: '0x1234567890abcdef1234567890abcdef12345678'
                      roleType:
                        type: string
                        enum:
                          - WEBSITE_SUPER_ADMIN
                          - WEBSITE_ADMIN
                          - WEBSITE_MODERATOR
                          - WEBSITE_API_KEY
                          - STRATUS_API_KEY
                          - WEBSITE_READ_ONLY_API_KEY
                          - ORGANIZATION_API_KEY
                        title: Role Type
                        description: Role type of the user
                        example: WEBSITE_SUPER_ADMIN
                      deletedAt:
                        type: string
                        title: Deleted At
                        description: Deletion date of the user role
                        example: '2022-01-01T00:00:00.000Z'
                    required:
                      - walletAddress
                      - roleType
                  title: Website User Roles
                  description: Array of website user roles
                  example:
                    - walletAddress: '0x1234567890abcdef1234567890abcdef12345678'
                      roleType: WEBSITE_SUPER_ADMIN
              required:
                - websiteId
                - websiteUserRoles
              title: Get Website User Roles Query
              description: Query parameters for getWebsiteUserRoles
              example:
                websiteId: 123e4567-e89b-12d3-a456-426614174000
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    nullable: true
                title: Post Website User Roles Response
                description: Schema for postWebsiteUserRoles response
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Request body is invalid
                required:
                  - message
                title: Bad Request Response
                description: Schema for bad request response
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Forbidden, Could not validate api key
                required:
                  - message
                title: Forbidden Response
                description: Schema for forbidden response
                example: Forbidden, Could not validate api key
        '500':
          description: '500'
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    title: Success
                    description: Indicates operation success
                    example: false
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Internal server error
                  debugInfo:
                    type: string
                    title: Debug Info
                    description: Optional debug information
                    example: Stack trace or additional error details
                required:
                  - success
                  - message
                title: Internal Server Error Response
                description: Schema for internal server error response
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````