> ## 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 promo code

> Update whether a promo code can be used at checkout.

Required permissions:
 - `promo_code:update`
 - `access_pass:basic:read`



## OpenAPI

````yaml /openapi/api-v1-stable.json patch /promo_codes/{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-07-08-1
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:
  /promo_codes/{id}:
    patch:
      tags:
        - Promo codes
      summary: Update promo code
      description: |-
        Update whether a promo code can be used at checkout.

        Required permissions:
         - `promo_code:update`
         - `access_pass:basic:read`
      operationId: updatePromoCode
      parameters:
        - description: The unique identifier of the promo code to update.
          in: path
          name: id
          required: true
          schema:
            example: promo_xxxxxxxxxxxx
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Parameters for UpdatePromoCode
              properties:
                status:
                  $ref: '#/components/schemas/PromoCodeUpdateStatus'
                  description: The status to apply to the promo code.
              required:
                - status
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoCode'
          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:
            - promo_code:update
            - access_pass:basic:read
components:
  schemas:
    PromoCodeUpdateStatus:
      description: Statuses that can be applied to promo codes through update operations.
      enum:
        - active
        - inactive
      type: string
    PromoCode:
      description: >-
        A promo code applies a discount to a plan during checkout. Promo codes
        can be percentage-based or fixed-amount, and can have usage limits and
        expiration dates.
      properties:
        amount_off:
          description: >-
            The discount amount. Interpretation depends on promo_type: if
            'percentage', this is the percentage (e.g., 20 means 20% off); if
            'flat_amount', this is dollars off (e.g., 10.00 means $10.00 off).
          example: 6.9
          type: number
        churned_users_only:
          description: >-
            Restricts promo use to only users who have churned from the company
            before.
          type: boolean
        code:
          description: The specific code used to apply the promo at checkout.
          type:
            - string
            - 'null'
        company:
          description: The company for the promo code.
          properties:
            id:
              description: The unique identifier for the company.
              example: biz_xxxxxxxxxxxxxx
              type: string
            title:
              description: The written name of the company.
              type: string
          required:
            - id
            - title
          type: object
        created_at:
          description: The datetime the promo code was created.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type: string
        currency:
          $ref: '#/components/schemas/Currencies'
          description: The monetary currency of the promo code.
        duration:
          description: The duration of the promo.
          oneOf:
            - $ref: '#/components/schemas/PromoDurations'
            - type: 'null'
        existing_memberships_only:
          description: >-
            Restricts promo use to only be applied to already purchased
            memberships.
          type: boolean
        expires_at:
          description: The date/time of when the promo expires.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type:
            - string
            - 'null'
        id:
          description: The unique identifier for the promo code.
          example: promo_xxxxxxxxxxxx
          type: string
        new_users_only:
          description: >-
            Restricts promo use to only users who have never purchased from the
            company before.
          type: boolean
        one_per_customer:
          description: Restricts promo use to only be applied once per customer.
          type: boolean
        product:
          description: The product this promo code applies to
          properties:
            id:
              description: The unique identifier for the product.
              example: prod_xxxxxxxxxxxxx
              type: string
            title:
              description: >-
                The display name of the product shown to customers on the
                product page and in search results.
              example: Pickaxe Analytics
              type: string
          required:
            - id
            - title
          type:
            - object
            - 'null'
        promo_duration_months:
          description: The number of months the promo is applied for.
          example: 42
          type:
            - integer
            - 'null'
        promo_type:
          $ref: '#/components/schemas/PromoTypes'
          description: The type (% or flat amount) of the promo.
        status:
          $ref: '#/components/schemas/PromoCodeStatus'
          description: Indicates if the promo code is live or disabled.
        stock:
          description: The quantity limit on the number of uses.
          example: 42
          type: integer
        unlimited_stock:
          description: Whether or not the promo code has unlimited stock.
          type: boolean
        uses:
          description: The amount of times the promo codes has been used.
          example: 42
          type: integer
      required:
        - id
        - amount_off
        - currency
        - churned_users_only
        - code
        - created_at
        - existing_memberships_only
        - duration
        - expires_at
        - new_users_only
        - promo_duration_months
        - one_per_customer
        - product
        - promo_type
        - status
        - stock
        - unlimited_stock
        - uses
        - company
      type: object
    Currencies:
      description: The available currencies on the platform
      enum:
        - usd
        - sgd
        - inr
        - aud
        - brl
        - cad
        - dkk
        - eur
        - nok
        - gbp
        - sek
        - chf
        - hkd
        - huf
        - jpy
        - mxn
        - myr
        - pln
        - czk
        - nzd
        - aed
        - eth
        - ape
        - cop
        - ron
        - thb
        - bgn
        - idr
        - dop
        - php
        - try
        - krw
        - twd
        - vnd
        - pkr
        - clp
        - uyu
        - ars
        - zar
        - dzd
        - tnd
        - mad
        - kes
        - kwd
        - jod
        - all
        - xcd
        - amd
        - bsd
        - bhd
        - bob
        - bam
        - khr
        - crc
        - xof
        - egp
        - etb
        - gmd
        - ghs
        - gtq
        - gyd
        - ils
        - jmd
        - mop
        - mga
        - mur
        - mdl
        - mnt
        - nad
        - ngn
        - mkd
        - omr
        - pyg
        - pen
        - qar
        - rwf
        - sar
        - rsd
        - lkr
        - tzs
        - ttd
        - uzs
        - rub
        - btc
        - cny
        - usdt
        - kzt
        - awg
        - whop_usd
        - xau
      type: string
    PromoDurations:
      description: The duration setting for the promo code
      enum:
        - forever
        - once
        - repeating
      type: string
    PromoTypes:
      description: The type of promo code used to discount a plan
      enum:
        - percentage
        - flat_amount
      type: string
    PromoCodeStatus:
      description: Statuses for promo codes
      enum:
        - active
        - inactive
        - archived
      type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: auth-scheme
      description: >-
        A company API key, company scoped JWT, app API key, or user OAuth token.
        You must prepend your key/token with the word 'Bearer', which will look
        like `Bearer ***************************`
      scheme: bearer
      type: http

````