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

# Get invite code for current user

> Get the current user's invite code, creating one if needed.



## OpenAPI

````yaml /openapi.json get /api/v1/user/invite_code
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
  - url: https://api.hevn.finance
    description: Production
security: []
paths:
  /api/v1/user/invite_code:
    get:
      tags:
        - User
      summary: Get invite code for current user
      description: Get the current user's invite code, creating one if needed.
      operationId: get_invite_code_api_v1_user_invite_code_get
      parameters:
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InviteCodeResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    InviteCodeResponse:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        totalInvited:
          type: integer
          title: Totalinvited
          default: 0
        bonuses:
          $ref: '#/components/schemas/InviteBonuses'
      type: object
      required:
        - bonuses
      title: InviteCodeResponse
      description: Response for invite code.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InviteBonuses:
      properties:
        kyb:
          $ref: '#/components/schemas/InviteBonus'
        volume:
          $ref: '#/components/schemas/InviteVolumeBonus'
      type: object
      required:
        - kyb
        - volume
      title: InviteBonuses
      description: Bonus configuration for the referral program.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    InviteBonus:
      properties:
        amount:
          type: string
          title: Amount
        currency:
          type: string
          title: Currency
          default: USD
      type: object
      required:
        - amount
      title: InviteBonus
      description: A single referral bonus tier.
    InviteVolumeBonus:
      properties:
        amount:
          type: string
          title: Amount
        currency:
          type: string
          title: Currency
          default: USD
        threshold:
          type: string
          title: Threshold
      type: object
      required:
        - amount
        - threshold
      title: InviteVolumeBonus
      description: Volume-based bonus tier with a threshold.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      x-default: Bearer <token>

````