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

> This endpoint allows you to get referrals



## OpenAPI

````yaml /api-reference/openapi.documented.json get /api/referral/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/referral/users:
    get:
      tags:
        - Referrals
      summary: Get referrals
      description: This endpoint allows you to get referrals
      parameters:
        - name: organizationId
          in: query
          schema:
            type: string
            format: uuid
        - name: websiteId
          in: query
          schema:
            type: string
            format: uuid
        - name: walletAddress
          in: query
          schema:
            oneOf:
              - type: string
              - type: array
                items:
                  type: string
                minItems: 1
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - name: startingAfter
          in: query
          schema:
            type: string
            format: uuid
        - name: loyaltyRuleId
          in: query
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        referralCode:
                          type: object
                          properties:
                            id:
                              type: string
                            referralCode:
                              type: string
                            loyaltyRuleId:
                              type: string
                              format: uuid
                            createdAt:
                              type: string
                              format: date-time
                            updatedAt:
                              type: string
                              format: date-time
                            deletedAt:
                              type: string
                              format: date-time
                              nullable: true
                            userId:
                              type: string
                          required:
                            - id
                            - referralCode
                            - createdAt
                            - updatedAt
                            - deletedAt
                            - userId
                        user:
                          type: object
                          properties:
                            id:
                              type: string
                            walletAddress:
                              type: string
                          required:
                            - id
                            - walletAddress
                        eligible:
                          type: boolean
                          nullable: true
                        id:
                          type: string
                        tier1Amount:
                          type: number
                          description: >-
                            This will only return data for earnings after
                            2025-04-24
                        tier2Amount:
                          type: number
                          description: >-
                            This will only return data for earnings after
                            2025-04-24
                        amount:
                          type: number
                          description: >-
                            This will only return data for earnings after
                            2025-04-24
                      required:
                        - referralCode
                        - user
                        - id
                        - tier1Amount
                        - tier2Amount
                        - amount
                  hasNextPage:
                    type: boolean
                required:
                  - data
                  - hasNextPage
        '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
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````