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

# Apply a referral code to the Extended account

> Applies the referral code on Extended. Fails if the account already has a referral code applied.



## OpenAPI

````yaml https://vooi-api-app.fly.dev/swagger/json post /extended/use-referral-code
openapi: 3.1.0
info:
  title: VOOI API
  description: Unified perps API
  version: '1.0'
  contact: {}
servers:
  - url: https://perps-api.vooi.io
security: []
tags: []
paths:
  /extended/use-referral-code:
    post:
      tags:
        - Extended
      summary: Apply a referral code to the Extended account
      description: >-
        Applies the referral code on Extended. Fails if the account already has
        a referral code applied.
      operationId: ExtendedController_useReferralCode
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UseReferralCodeBodyDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UseReferralCodeResponseDto'
        '503':
          description: ExchangeApiError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDTO'
      security:
        - bearer: []
components:
  schemas:
    UseReferralCodeBodyDto:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          description: Referral code to apply to the Extended account
          example: VOOI
      required:
        - code
      title: ExtendedUseReferralCodeBody
    UseReferralCodeResponseDto:
      type: object
      properties:
        status:
          type: string
          description: Referral code application status
          example: ok
          enum:
            - ok
      required:
        - status
      title: ExtendedUseReferralCodeResponse
    ErrorResponseDTO:
      type: object
      properties:
        message:
          type: string
          example: 'Invalid order id: 123'
        statusCode:
          example: 503
          type: number
      required:
        - message
      title: ErrorResponse
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

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