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

# Activate referral with user-funded transaction

> Activates a trader with a valid referral code by validating a user-funded transaction, signing it with the referral activation onboarder, and submitting it. The trader authority or another non-Phoenix payer must pay fees and trader-account rent.



## OpenAPI

````yaml /openapi/phoenix-public-api.json post /v1/referral/activate-tx
openapi: 3.1.0
info:
  title: Phoenix Eternal API
  description: >-
    RESTful API for accessing Phoenix Eternal perpetual trading data. Provides
    real-time orderbook levels, asset information, and market metadata.
  termsOfService: https://www.phoenix.trade/terms-of-service
  contact:
    name: Phoenix Development Team
    url: https://github.com/Ellipsis-Labs/phoenix
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://perp-api.phoenix.trade
    description: Phoenix Eternal Perp API
security: []
tags:
  - name: Auth
    description: Wallet and session authentication.
  - name: Exchange
    description: Exchange, market, candle, and no-referral register-instruction workflows.
  - name: Invite
    description: Invite validation, referral activation, and wallet allowlist checks.
  - name: Notifications
    description: Trader notification reads and acknowledgement helpers.
  - name: Trader
    description: Trader state, account history, and transaction builders.
externalDocs:
  url: https://docs.phoenix.trade
  description: Phoenix developer documentation
paths:
  /v1/referral/activate-tx:
    post:
      tags:
        - Invite
      summary: Activate referral with user-funded transaction
      description: >-
        Activates a trader with a valid referral code by validating a
        user-funded transaction, signing it with the referral activation
        onboarder, and submitting it. The trader authority or another
        non-Phoenix payer must pay fees and trader-account rent.
      operationId: post.v1.referral.activate_tx
      requestBody:
        description: JSON request payload for `post.v1.referral.activate_tx`.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateReferralTxRequest'
            example:
              recent_blockhash: string
              referral_code: string
              trader_authority: string
              transaction: string
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivateReferralTxResponse'
components:
  schemas:
    ActivateReferralTxRequest:
      type: object
      required:
        - referral_code
        - trader_authority
        - recent_blockhash
        - transaction
      properties:
        recent_blockhash:
          type: string
        referral_code:
          type: string
        trader_authority:
          type: string
        trader_pda_index:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        trader_subaccount_index:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        transaction:
          type: string
    ActivateReferralTxResponse:
      type: object
      required:
        - trader_pda
        - referral_code
        - status
      properties:
        referral_code:
          type: string
        signature:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/ActivateReferralTxStatus'
        trader_pda:
          type: string
    ActivateReferralTxStatus:
      type: string
      enum:
        - activated
        - submitted
        - already_activated

````