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

# Get users for a badge

> This endpoint allows you to fetch users for a specific badge.



## OpenAPI

````yaml /api-reference/openapi.documented.json get /api/loyalty/badge_users
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/loyalty/badge_users:
    get:
      tags:
        - Badge
      summary: Get users for a badge
      description: This endpoint allows you to fetch users for a specific badge.
      parameters:
        - name: loyaltyBadgeId
          in: query
          description: UUID of the loyalty badge (converted to lowercase)
          required: true
          schema:
            type: string
            format: uuid
            title: Loyalty Badge ID
            example: 123e4567-e89b-12d3-a456-426614174222
        - name: organizationId
          in: query
          description: UUID of the organization (optional, converted to lowercase)
          schema:
            type: string
            format: uuid
            title: Organization ID
            example: 123e4567-e89b-12d3-a456-426614174222
        - name: websiteId
          in: query
          description: UUID of the website (optional, converted to lowercase)
          schema:
            type: string
            format: uuid
            title: Website ID
            example: 123e4567-e89b-12d3-a456-426614174111
        - name: walletAddress
          in: query
          description: Wallet Address of the user, or array of wallet addresses.
          schema:
            type: string
            title: Wallet Address
            example: '0x1234567890abcdef1234567890abcdef12345678'
        - name: status
          in: query
          description: Status of the badge
          schema:
            type: string
            enum:
              - active
              - inactive
              - revoked
            title: Status
            example: active
        - name: startingAfter
          in: query
          description: UUID of the badge to start after (converted to lowercase)
          schema:
            type: string
            format: uuid
            title: Starting After
            example: 123e4567-e89b-12d3-a456-426614174333
        - name: limit
          in: query
          description: Number of badges to fetch
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            title: Limit
            example: 10
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    title: User Badge ID
                    description: UUID of the user badge (converted to lowercase)
                    example: a96edeb7-c10f-4e63-9acf-85e277665587
                  userId:
                    type: string
                    format: uuid
                    title: User ID
                    description: UUID of the user (converted to lowercase)
                    example: 9b0351c3-71ab-4a45-a36a-f7b35ccd276b
                  loyaltyBadgeId:
                    type: string
                    format: uuid
                    title: Badge ID
                    description: UUID of the badge (converted to lowercase)
                    example: 749b1bb0-a607-4010-888b-8321905606b9
                  websiteId:
                    type: string
                    format: uuid
                    title: Website ID
                    description: UUID of the website (converted to lowercase)
                    example: 42218351-3c75-46af-8453-5ae04b9ad7bb
                  organizationId:
                    type: string
                    format: uuid
                    title: Organization ID
                    description: UUID of the organization (converted to lowercase)
                    example: 548b0619-f4b3-4ef6-8dd9-77dfa9260eb2
                  createdAt:
                    type: string
                    format: date-time
                    title: Created At
                    description: The date and time the user badge was created
                    example: '2025-09-11T13:45:40.123Z'
                  updatedAt:
                    type: string
                    format: date-time
                    title: Updated At
                    description: The date and time the user badge was updated
                    example: '2025-09-11T13:45:40.123Z'
                  deletedAt:
                    type: string
                    format: date-time
                    nullable: true
                    title: Deleted At
                    description: The date and time the user badge was deleted
                    example: null
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                      - revoked
                    title: Status
                    description: The status of the badge
                    example: active
                  progress:
                    type: array
                    items:
                      nullable: true
                    title: Progress
                    description: Array of progress for the badge
                    example: []
                  dismissedInUi:
                    type: boolean
                    title: Dismissed In UI
                    description: Whether the user has dismissed the badge in the UI
                    example: false
                  user:
                    type: object
                    properties:
                      walletAddress:
                        type: string
                        title: Wallet Address
                        description: Wallet address of the user
                        example: '0x1234567890abcdef1234567890abcdef12345678'
                    required:
                      - walletAddress
                    nullable: true
                    title: User
                    description: User associated with the user badge
                required:
                  - id
                  - userId
                  - loyaltyBadgeId
                  - websiteId
                  - organizationId
                  - createdAt
                  - updatedAt
                  - deletedAt
                  - status
                  - progress
                title: Get Badge Users Success Response
                description: Response returned upon successful fetching of the badge users.
        '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

````