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

# Get apiv1userreferral codes



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/user/referral-codes
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.ekiden.fi/
    description: Production
  - url: https://api.cnt.ekiden.fi/
    description: Testnet
  - url: https://api.canton.ekiden.fi/
    description: Staging
security: []
paths:
  /api/v1/user/referral-codes:
    get:
      tags:
        - User
      operationId: list_referral_codes
      responses:
        '200':
          description: List referral codes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListReferralCodesResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - bearer_auth: []
components:
  schemas:
    ListReferralCodesResponse:
      type: object
      required:
        - codes
      properties:
        codes:
          type: array
          items:
            $ref: '#/components/schemas/ReferralCodeInfo'
    ReferralCodeInfo:
      type: object
      required:
        - code_id
        - code
        - is_default
        - created_at
        - clicks
        - binds
        - downline_count
      properties:
        binds:
          type: integer
          format: int64
          description: >-
            Number of users who bound through this specific code
            (`users.bound_via_code_id`).
          minimum: 0
        clicks:
          type: integer
          format: int64
          description: >-
            Number of recorded clicks that resolved to this code
            (`referral_clicks.code_id`).
          minimum: 0
        code:
          type: string
        code_id:
          type: string
        created_at:
          type: integer
          format: int64
        downline_count:
          type: integer
          format: int64
          description: >-
            Total direct downline of this code's owner (`users.referrer_id`).
            Owner-level, so it is

            identical across all of the owner's codes.
          minimum: 0
        is_default:
          type: boolean
        label:
          type:
            - string
            - 'null'
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````