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

# Validate Referral Code

> Validate a referral code



## OpenAPI

````yaml post /referrals/validate-code
openapi: 3.0.0
info:
  title: Flock API
  description: API Documentation for Flock
  version: '1.0'
  contact: {}
servers:
  - url: https://api-dev.withflock.com
security: []
tags: []
paths:
  /referrals/validate-code:
    post:
      tags:
        - Referral
      description: Validate a referral code
      operationId: ReferralController_validateReferral
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateReferralDTO'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateReferralResponseDTO'
      security:
        - accessKey: []
components:
  schemas:
    ValidateReferralDTO:
      type: object
      properties:
        referralCode:
          type: string
      required:
        - referralCode
    ValidateReferralResponseDTO:
      type: object
      properties:
        isValid:
          type: boolean
        referredBy:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/ReferredByDTO'
      required:
        - isValid
        - referredBy
    ReferredByDTO:
      type: object
      properties:
        id:
          type: string
        externalUserId:
          type: string
        email:
          type: string
        name:
          type: string
      required:
        - id
        - externalUserId
        - email
        - name
  securitySchemes:
    accessKey:
      type: apiKey
      in: header
      name: Authorization

````