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

# Update override

> Updates an existing affiliate override.

Required permissions:
 - `affiliate:update`



## OpenAPI

````yaml /openapi/api-v1-stable.json patch /affiliates/{id}/overrides/{override_id}
openapi: 3.1.0
info:
  description: >-
    The Whop REST API. Please see
    https://docs.whop.com/developer/api/getting-started for more details.
  termsOfService: https://whop.com/tos-developer-api/
  title: Whop API
  version: 1.0.0
  x-api-version-date: '2026-08-21'
servers:
  - description: Production Whop API
    url: https://api.whop.com/api/v1
  - description: Sandbox Whop API
    url: https://sandbox-api.whop.com/api/v1
security: []
tags:
  - description: Products
    name: Products
  - description: Payments
    name: Payments
  - description: Refunds
    name: Refunds
  - description: Disputes
    name: Disputes
  - description: Dispute alerts
    name: Dispute alerts
  - description: Resolution center cases
    name: Resolution center cases
  - description: Checkout configurations
    name: Checkout configurations
  - description: Setup intents
    name: Setup intents
  - description: Payment methods
    name: Payment methods
  - description: Invoices
    name: Invoices
  - description: Promo codes
    name: Promo codes
  - description: Card transactions
    name: Card transactions
  - description: Ledger accounts
    name: Ledger accounts
  - description: Withdrawals
    name: Withdrawals
  - description: Payout methods
    name: Payout methods
  - description: Verifications
    name: Verifications
  - description: Identity profiles
    name: Identity profiles
  - description: Payout accounts
    name: Payout accounts
  - description: Topups
    name: Topups
  - description: Companies
    name: Companies
  - description: Authorized users
    name: Authorized users
  - description: Fee markups
    name: Fee markups
  - description: Members
    name: Members
  - description: Memberships
    name: Memberships
  - description: Leads
    name: Leads
  - description: Entries
    name: Entries
  - description: Shipments
    name: Shipments
  - description: Reviews
    name: Reviews
  - description: Company token transactions
    name: Company token transactions
  - description: Affiliates
    name: Affiliates
  - description: Experiences
    name: Experiences
  - description: Forums
    name: Forums
  - description: Forum posts
    name: Forum posts
  - description: Chat channels
    name: Chat channels
  - description: Support channels
    name: Support channels
  - description: Messages
    name: Messages
  - description: Reactions
    name: Reactions
  - description: Dm members
    name: Dm members
  - description: Dm channels
    name: Dm channels
  - description: Notifications
    name: Notifications
  - description: Courses
    name: Courses
  - description: Course chapters
    name: Course chapters
  - description: Course lessons
    name: Course lessons
  - description: Course students
    name: Course students
  - description: Course lesson interactions
    name: Course lesson interactions
  - description: Apps
    name: Apps
  - description: Webhooks
    name: Webhooks
  - description: App builds
    name: App builds
  - description: Access tokens
    name: Access tokens
  - description: Account links
    name: Account links
  - description: Files
    name: Files
  - description: Ai chats
    name: Ai chats
  - description: Bounties
    name: Bounties
  - description: Stats
    name: Stats
  - description: Conversions
    name: Conversions
  - description: Ad reports
    name: Ad reports
paths:
  /affiliates/{id}/overrides/{override_id}:
    patch:
      tags:
        - Affiliates
      summary: Update override
      description: |-
        Updates an existing affiliate override.

        Required permissions:
         - `affiliate:update`
      operationId: updateOverrideAffiliate
      parameters:
        - description: The affiliate ID.
          in: path
          name: id
          required: true
          schema:
            example: aff_xxxxxxxxxxxxxx
            type: string
        - description: The override ID.
          in: path
          name: override_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Parameters for UpdateAffiliateOverride
              properties:
                applies_to_payments:
                  description: >-
                    Whether commission applies to first payment or all payments
                    (standard only).
                  oneOf:
                    - $ref: '#/components/schemas/AffiliateAppliesToPayments'
                    - type: 'null'
                commission_type:
                  description: The commission type (percentage or flat_fee).
                  oneOf:
                    - $ref: '#/components/schemas/AffiliatePayoutTypes'
                    - type: 'null'
                commission_value:
                  description: >-
                    The commission value (percentage 1-100 or flat fee in
                    dollars).
                  example: 6.9
                  type:
                    - number
                    - 'null'
                revenue_basis:
                  description: The revenue calculation basis (rev-share only).
                  oneOf:
                    - $ref: '#/components/schemas/AffiliateRevenueBases'
                    - type: 'null'
              required: []
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: >-
                  A commission configuration for an affiliate, defining payout
                  terms for a specific plan or revenue share
                properties:
                  applies_to_payments:
                    description: >-
                      Whether the commission applies to the first payment only
                      or all payments (standard overrides only).
                    oneOf:
                      - $ref: '#/components/schemas/AffiliateAppliesToPayments'
                      - type: 'null'
                  applies_to_products:
                    description: >-
                      Whether this rev-share override applies to a single
                      product or all products (rev-share only).
                    oneOf:
                      - $ref: '#/components/schemas/AffiliateAppliesToProducts'
                      - type: 'null'
                  checkout_direct_link:
                    description: >-
                      The checkout direct link for referrals (standard overrides
                      only).
                    type:
                      - string
                      - 'null'
                  commission_type:
                    $ref: '#/components/schemas/AffiliatePayoutTypes'
                    description: The type of commission (percentage or flat_fee).
                  commission_value:
                    description: >-
                      The commission amount. A percentage (1-100) when
                      commission_type is percentage, or a dollar amount when
                      flat_fee.
                    example: 6.9
                    type: number
                  id:
                    description: The unique identifier for the affiliate override.
                    example: affov_xxxxxxxxxxxx
                    type: string
                  override_type:
                    $ref: '#/components/schemas/AffiliateOverrideRoles'
                    description: The type of override (standard or rev_share).
                  plan_id:
                    description: The plan ID (for standard overrides).
                    example: plan_xxxxxxxxxxxxx
                    type:
                      - string
                      - 'null'
                  product_direct_link:
                    description: >-
                      The product page direct link for referrals (standard
                      overrides only).
                    type:
                      - string
                      - 'null'
                  product_id:
                    description: The product ID (for rev-share overrides).
                    type:
                      - string
                      - 'null'
                  revenue_basis:
                    description: The revenue calculation basis (pre_fees or post_fees).
                    oneOf:
                      - $ref: '#/components/schemas/AffiliateRevenueBases'
                      - type: 'null'
                  total_referral_earnings_usd:
                    description: >-
                      The total earnings paid to this affiliate for referrals to
                      this specific plan, in USD.
                    example: 6.9
                    type: number
                required:
                  - id
                  - override_type
                  - commission_type
                  - commission_value
                  - applies_to_payments
                  - plan_id
                  - product_id
                  - applies_to_products
                  - revenue_basis
                  - product_direct_link
                  - checkout_direct_link
                  - total_referral_earnings_usd
                type: object
          description: A successful response
        '400':
          content:
            application/json:
              example:
                error:
                  code: parameter_missing
                  message: 'Missing required parameter: amount.'
                  param: amount
                  type: invalid_request_error
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Bad request
        '401':
          content:
            application/json:
              example:
                error:
                  message: Invalid or missing API key
                  type: unauthorized
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Unauthorized
        '403':
          content:
            application/json:
              example:
                error:
                  message: You do not have permission to access this resource
                  type: forbidden
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Forbidden
        '404':
          content:
            application/json:
              example:
                error:
                  message: Resource not found
                  type: not_found
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Not found
        '422':
          content:
            application/json:
              example:
                error: null
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Verification required
        '429':
          content:
            application/json:
              example:
                error: null
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Too many requests
        '500':
          content:
            application/json:
              example:
                error:
                  message: An unexpected error occurred
                  type: internal_server_error
              schema:
                properties:
                  error:
                    properties:
                      code:
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                        type:
                          - string
                          - 'null'
                      message:
                        type: string
                      param:
                        description: The parameter that caused the error, if applicable
                        type:
                          - string
                          - 'null'
                      type:
                        type: string
                    required:
                      - type
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Internal server error
      security:
        - bearerAuth:
            - affiliate:update
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Whop from '@whop/sdk';


            const client = new Whop({
              apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
            });


            const override = await
            client.affiliates.overrides.update('override_id', {
              id: 'aff_xxxxxxxxxxxxxx',
            });


            console.log(override.id);
components:
  schemas:
    AffiliateAppliesToPayments:
      description: >-
        Whether the affiliate commission applies to the first payment or all
        payments
      enum:
        - first_payment
        - all_payments
      type: string
    AffiliatePayoutTypes:
      description: The types of payouts an affiliate can have
      enum:
        - percentage
        - flat_fee
      type: string
    AffiliateRevenueBases:
      description: The calculation method for affiliate rev-share percentages
      enum:
        - pre_fees
        - post_fees
      type: string
    AffiliateAppliesToProducts:
      description: Whether a rev-share override applies to a single product or all products
      enum:
        - single_product
        - all_products
      type: string
    AffiliateOverrideRoles:
      description: The role of an affiliate override (standard or rev_share)
      enum:
        - standard
        - rev_share
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        An Account API key, account-scoped JWT, App API key, or user OAuth
        token. Prepend the key or token with `Bearer`, for example `Bearer
        ***************************`.
      scheme: bearer
      type: http

````