> ## 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.

# Connect a user to User Group

> This endpoint allows you to connect a user to a user group



## OpenAPI

````yaml /api-reference/openapi.documented.json post /api/users/connect
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/users/connect:
    post:
      tags:
        - Identity
      summary: Connect a user to User Group
      description: This endpoint allows you to connect a user to a user group
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                websiteId:
                  type: string
                  format: uuid
                  title: Website ID
                  description: The ID of the website
                  example: 123e4567-e89b-12d3-a456-426614174000
                organizationId:
                  type: string
                  format: uuid
                  title: Organization ID
                  description: The ID of the organization
                  example: 123e4567-e89b-12d3-a456-426614174001
                walletType:
                  type: string
                  enum:
                    - evm
                    - solana
                    - imx
                    - sui
                    - ton
                    - cosmos
                    - ultra
                    - agw
                    - flow_cadence
                    - substrate
                walletAddress:
                  type: string
                  title: Wallet Address
                  description: The wallet address of the user
                  example: '0x1234567890abcdef1234567890abcdef12345678'
                verificationData:
                  type: object
                  properties:
                    message:
                      type: string
                    signature:
                      type: string
                    tonVerification:
                      type: object
                      properties:
                        proof:
                          type: object
                          properties:
                            timestamp:
                              type: number
                            domain:
                              type: object
                              properties:
                                lengthBytes:
                                  type: number
                                value:
                                  type: string
                              required:
                                - lengthBytes
                                - value
                            payload:
                              type: string
                            signature:
                              type: string
                            state_init:
                              type: string
                          required:
                            - timestamp
                            - domain
                            - payload
                            - signature
                        account:
                          type: object
                          properties:
                            address:
                              type: string
                            chain:
                              type: string
                              enum:
                                - '-239'
                                - '-3'
                            publicKey:
                              type: string
                            walletStateInit:
                              type: string
                          required:
                            - address
                            - chain
                            - publicKey
                      required:
                        - proof
                        - account
                    accessToken:
                      type: string
                    dynamicAuthToken:
                      type: string
                    verifiedLocally:
                      type: boolean
                  title: Verification Data
                  description: The verification data of the user walletAddress
                userId:
                  type: string
                  format: uuid
                  title: User ID
                  description: The ID of the user to whome this wallet is being connected
                  example: 123e4567-e89b-12d3-a456-426614174001
                confirmDisconnect:
                  type: boolean
                  title: Confirm Disconnect
                  description: Whether to confirm the disconnect
                  example: true
              required:
                - websiteId
                - organizationId
                - walletType
                - walletAddress
              title: Connect User Schema
              description: Schema for a connect user schema
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  walletAddress:
                    type: string
                    title: Wallet Address
                    description: The wallet address of the user
                  id:
                    type: string
                    format: uuid
                    title: User ID
                    description: The ID of the user
                    example: 123e4567-e89b-12d3-a456-426614174000
                  createdAt:
                    type: string
                    format: date-time
                    title: Created At
                    description: Timestamp when the user was created
                    example: '2023-10-01T12:34:56Z'
                  updatedAt:
                    type: string
                    format: date-time
                    title: Updated At
                    description: Timestamp when the user was last updated
                    example: '2023-10-05T15:30:00Z'
                required:
                  - walletAddress
                  - id
                  - createdAt
                  - updatedAt
                title: Connect Users Response
                description: Schema for a connect users response
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Not a valid request
                      - User not found
                      - You cannot connect same wallet address
                      - signatue is not valid
                  error:
                    type: string
                    enum:
                      - MAXIMUM_ACCOUNT_LINKED
                required:
                  - message
                  - error
        '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
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    title: Message
                    description: Error message
                    example: Not found
                required:
                  - message
                title: Not Found Response
                description: Schema for not found response
        '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

````