Get User's Referral Codes

Retrieves all referral codes owned by a specific user with pagination and usage details.

When to Use This Endpoint

  • Displaying a user's referral codes in their profile/dashboard
  • Showing code usage statistics and who used each code
  • Building a "My Referral Codes" management interface
  • Tracking which codes are most effective
  • Exporting referral code data for analytics

When NOT to Use This Endpoint

  • Looking up a specific code by code value (use GET /v1/referral_codes/{code})
  • Checking if a user can use a code (use GET /v1/referral_codes/status)
  • Generating new codes (use POST /v1/referral_codes)

Important Constraints

  • Required Scope: referral_codes:read
  • Pagination: Default page size is 25, results include usage history
  • Usage Details: Each code includes used_by array showing who used it
  • Ordering: Codes returned in creation order (newest first)

Response Details

Each code includes:

  • code: The referral code string
  • created_at: When the code was created
  • used_by: Array of users who used this code (with timestamps)
  • max_uses: Maximum allowed uses (null = unlimited)
  • current_uses: Current usage count

Common Errors

  • 400 Bad Request: Invalid user identifier format
  • 401 Unauthorized: Missing or invalid API key
  • 403 Forbidden: API key lacks referral_codes:read scope
  • 404 Not Found: User has no referral codes

Related Endpoints

  • POST /v1/referral_codes - Generate new referral codes
  • GET /v1/referral_codes/{code} - Get specific code details
  • PATCH /v1/referral_codes/{code} - Update code settings
  • GET /v1/referral_codes/status - Check referral status

Required API Key Scope: referral_codes:read

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The identifier of the user who owns the referral codes

string
enum
required

The type of identifier being used

Allowed:
integer
Defaults to 1

Page number for pagination

integer
Defaults to 25

Number of results per page

Responses

400

Bad Request - Invalid identifier

401

Unauthorized - Missing or invalid API key, or insufficient scope

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json