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

# Resolve referral code

> Checks whether a referral code exists. The code is trimmed and lower-cased first. Answers `200`: `{ valid: true, code }` with the current code of its owner (a retired code resolves to the code its owner uses now), or `{ valid: false, reason }` where `reason` is `invalid` (not a well-formed code) or `not_found` (no account holds it). Limited to 60 lookups a minute per IP address; past that it answers `429 rate_limited` with `retryAfterMs`.



## OpenAPI

````yaml openapi/openapi.json GET /referrals/{code}
openapi: 3.1.0
info:
  title: BRDG API
  version: 1.0.0
  description: >-
    Quote, build, submit and track cross-chain transfers across every venue BRDG
    aggregates.
servers:
  - url: https://api.brdg.now/v1
security: []
paths:
  /referrals/{code}:
    get:
      tags:
        - referrals
      summary: Resolve referral code
      description: >-
        Checks whether a referral code exists. The code is trimmed and
        lower-cased first. Answers `200`: `{ valid: true, code }` with the
        current code of its owner (a retired code resolves to the code its owner
        uses now), or `{ valid: false, reason }` where `reason` is `invalid`
        (not a well-formed code) or `not_found` (no account holds it). Limited
        to 60 lookups a minute per IP address; past that it answers `429
        rate_limited` with `retryAfterMs`.
      parameters:
        - schema:
            type: string
          required: true
          name: code
          in: path
          description: The referral code, as in `brdg.now/ref/<code>`.
      responses:
        '200':
          description: Whether the code resolves
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      valid:
                        type: boolean
                        enum:
                          - true
                      code:
                        type: string
                    required:
                      - valid
                      - code
                  - type: object
                    properties:
                      valid:
                        type: boolean
                        enum:
                          - false
                      reason:
                        type: string
                        enum:
                          - invalid
                          - not_found
                    required:
                      - valid
                      - reason
              example:
                valid: true
                code: alice
        '429':
          description: Rate limited; retry after `retryAfterMs`
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.