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

# GET /api/v1/referrals/code/{code}

> Pre-wallet-connect validation of a referral code. Returns whether the code
exists and is still active (can accept new referrals). No auth needed.

If the code doesn't exist, returns `is_valid: false` (not a 404).



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/referrals/code/{code}
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
paths:
  /api/v1/referrals/code/{code}:
    get:
      tags:
        - Referrals
      summary: GET /api/v1/referrals/code/{code}
      description: >-
        Pre-wallet-connect validation of a referral code. Returns whether the
        code

        exists and is still active (can accept new referrals). No auth needed.


        If the code doesn't exist, returns `is_valid: false` (not a 404).
      operationId: handle_validate_code
      parameters:
        - name: code
          in: path
          description: The referral code to validate
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Code validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferralCodeValidationDto'
        '400':
          description: Invalid code format
        '500':
          description: Internal server error
components:
  schemas:
    ReferralCodeValidationDto:
      type: object
      description: >-
        Response for GET /api/v1/referrals/code/{code} — pre-wallet-connect
        validation
      required:
        - referral_code
        - is_valid
        - is_active
      properties:
        is_active:
          type: boolean
          description: Whether the code can still accept new referrals
        is_valid:
          type: boolean
          description: Whether the code exists
        referral_code:
          type: string
          description: The referral code that was checked
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````