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

# Send a test referral

> Records one test signup or test sale, like "Send a test referral" in the dashboard, so you can check your setup without real traffic. It always goes to your workspace's test affiliate and is marked as test data, so it never reaches payouts, risk checks, alerts, emails or reports. A test sale earns a test commission. Limited to 30 an hour per workspace. Deleting test referrals is done in the dashboard. Requires `write` scope.



## OpenAPI

````yaml /openapi.yaml post /v1/test-referrals
openapi: 3.1.0
info:
  title: Affixo API
  version: 1.0.0
  description: |
    The Affixo REST API for affiliate program management and server-to-server
    conversion tracking.

    All requests authenticate with a workspace key (`sa_live_…`) as a Bearer
    token. Scopes: `read` / `write` / `track` / `*`.
servers:
  - url: https://go.affixo.dev
    description: Production
security: []
tags:
  - name: Affiliates
    description: Manage affiliates (workspace key)
  - name: Campaigns
    description: Create and configure campaigns + commission rules (workspace key)
  - name: Links
    description: Manage referral links (workspace key)
  - name: Risk
    description: AI risk assessments for fraud triage (workspace key)
  - name: Commissions
    description: Approve, deny, and manage commissions (workspace key)
  - name: Conversions
    description: Re-attribute and manage conversions (workspace key)
  - name: Webhooks
    description: Manage webhook endpoint subscriptions (workspace key)
  - name: Reports
    description: Aggregated reporting data (workspace key)
  - name: Resources
    description: Read campaigns, commissions, conversions, payouts (workspace key)
  - name: Referrals
    description: >-
      Move a referred customer to another affiliate, and send test referrals
      (workspace key)
  - name: Tracking
    description: >-
      Server-to-server click & conversion tracking (workspace key, scope
      "track")
  - name: Products
    description: >-
      Your Stripe product catalog and which products earn commission (workspace
      key)
paths:
  /v1/test-referrals:
    post:
      tags:
        - Referrals
      summary: Send a test referral
      description: >-
        Records one test signup or test sale, like "Send a test referral" in the
        dashboard, so you can check your setup without real traffic. It always
        goes to your workspace's test affiliate and is marked as test data, so
        it never reaches payouts, risk checks, alerts, emails or reports. A test
        sale earns a test commission. Limited to 30 an hour per workspace.
        Deleting test referrals is done in the dashboard. Requires `write`
        scope.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - sale
                    - lead
                  default: sale
                amount:
                  type: number
                  minimum: 1
                  maximum: 100000
                  default: 42
                  description: Test sale amount in major units.
                currency:
                  type: string
                  description: Three-letter code. Defaults to your workspace currency.
      responses:
        '201':
          description: The test referral
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: test_referral
                  data:
                    type: object
                    properties:
                      conversion:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          type:
                            type: string
                          status:
                            type: string
                          amount:
                            type:
                              - number
                              - 'null'
                          currency:
                            type: string
                          customer_name:
                            type: string
                          customer_email:
                            type: string
                          ts:
                            type: string
                            format: date-time
                      affiliate:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                            example: Affixo sample (test)
                      commission:
                        type:
                          - object
                          - 'null'
                        properties:
                          id:
                            type: string
                            format: uuid
                          amount:
                            type: number
                          currency:
                            type: string
                          status:
                            type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/DashboardLocked'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '429':
          $ref: '#/components/responses/RateLimited'
      security:
        - WorkspaceKey: []
components:
  responses:
    BadRequest:
      description: Invalid or missing parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_json
    Unauthorized:
      description: Missing or invalid bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    DashboardLocked:
      description: >-
        Your plan's dashboard and management access is locked until you upgrade.
        Tracking keeps working.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: plan_restricted
    InsufficientScope:
      description: The key lacks the required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: insufficient_scope
            need: write
    RateLimited:
      description: Too many requests of this kind for your workspace. Try again later.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: rate_limited
              message:
                type: string
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        need:
          type: string
          description: Present on insufficient_scope.
        detail:
          type: string
  securitySchemes:
    WorkspaceKey:
      type: http
      scheme: bearer
      description: 'Workspace API key, e.g. `sa_live_…`. Scopes: read / write / track / *.'

````

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