> ## 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 membership

> Update a membership's metadata or other mutable properties.

Required permissions:
 - `member:manage`
 - `member:email:read`
 - `member:basic:read`



## OpenAPI

````yaml /openapi/api-v1-stable.json patch /memberships/{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:
  /memberships/{id}:
    patch:
      tags:
        - Memberships
      summary: Update membership
      description: |-
        Update a membership's metadata or other mutable properties.

        Required permissions:
         - `member:manage`
         - `member:email:read`
         - `member:basic:read`
      operationId: updateMembership
      parameters:
        - description: The unique identifier of the membership to update.
          in: path
          name: id
          required: true
          schema:
            example: mem_xxxxxxxxxxxxxx
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Parameters for UpdateMembershipV2
              properties:
                metadata:
                  additionalProperties: true
                  description: >-
                    A JSON object of key-value pairs to store on the membership.
                    Replaces any existing metadata.
                  type:
                    - object
                    - 'null'
              required: []
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Membership'
          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:
            - member:manage
            - member:email:read
            - member:basic:read
components:
  schemas:
    Membership:
      description: >-
        A membership represents an active relationship between a user and a
        product. It tracks the user's access, billing status, and renewal
        schedule.
      properties:
        cancel_at_period_end:
          description: >-
            Whether this membership is set to cancel at the end of the current
            billing cycle. Only applies to memberships with a recurring plan.
          type: boolean
        cancel_option:
          description: >-
            The category selected for why the member canceled (e.g.
            too_expensive, switching, missing_features).
          oneOf:
            - $ref: '#/components/schemas/CancelOptions'
            - type: 'null'
        canceled_at:
          description: >-
            The time the customer initiated cancellation of this membership. As
            a Unix timestamp. Null if the membership has not been canceled.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type:
            - string
            - 'null'
        cancellation_reason:
          description: >-
            Free-text explanation provided by the customer when canceling. Null
            if the customer did not provide a reason.
          example: I found a better alternative.
          type:
            - string
            - 'null'
        checkout_configuration_id:
          description: >-
            The ID of the checkout session/configuration that produced this
            membership, if any. Use this to map memberships back to the checkout
            configuration that created them.
          type:
            - string
            - 'null'
        company:
          description: The company this membership belongs to.
          properties:
            id:
              description: The unique identifier for the company.
              example: biz_xxxxxxxxxxxxxx
              type: string
            title:
              description: The display name of the company shown to customers.
              example: Pickaxe
              type: string
          required:
            - id
            - title
          type: object
        created_at:
          description: The datetime the membership was created.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type: string
        currency:
          description: >-
            The three-letter ISO currency code for this membership's billing.
            Null if the membership is free.
          oneOf:
            - $ref: '#/components/schemas/Currencies'
            - type: 'null'
        custom_field_responses:
          description: >-
            The customer's responses to custom checkout questions configured on
            the product at the time of purchase.
          items:
            description: The response from a custom field on checkout
            properties:
              answer:
                description: The response a user gave to the specific question or field.
                type: string
              id:
                description: The unique identifier for the custom field response.
                example: cfrp_xxxxxxxxxxxxx
                type: string
              question:
                description: The question asked by the custom field
                type: string
            required:
              - id
              - question
              - answer
            type: object
          type: array
        id:
          description: The unique identifier for the membership.
          example: mem_xxxxxxxxxxxxxx
          type: string
        joined_at:
          description: >-
            The time the user first joined the company associated with this
            membership. As a Unix timestamp. Null if the member record does not
            exist.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type:
            - string
            - 'null'
        license_key:
          description: >-
            The software license key associated with this membership. Only
            present if the product includes a Whop Software Licensing
            experience. Null otherwise.
          example: A1B2C3-D4E5F6-G7H8I9
          type:
            - string
            - 'null'
        manage_url:
          description: >-
            The URL where the customer can view and manage this membership,
            including cancellation and plan changes. Null if no member record
            exists.
          example: https://whop.com/billing/manage/mem_abc123
          type:
            - string
            - 'null'
        member:
          description: >-
            The member record linking the user to the company for this
            membership. Null if the member record has not been created yet.
          properties:
            id:
              description: The unique identifier for the member.
              example: mber_xxxxxxxxxxxxx
              type: string
          required:
            - id
          type:
            - object
            - 'null'
        metadata:
          additionalProperties: true
          description: >-
            Custom key-value pairs for the membership (commonly used for
            software licensing, e.g., HWID). Max 50 keys, 100 chars per key, 500
            chars per string value.
          type:
            - object
            - 'null'
        payment_collection_paused:
          description: >-
            Whether recurring payment collection for this membership is
            temporarily paused by the company.
          type: boolean
        plan:
          description: The plan the customer purchased to create this membership.
          properties:
            id:
              description: The unique identifier for the plan.
              example: plan_xxxxxxxxxxxxx
              type: string
            metadata:
              additionalProperties: true
              description: >-
                Custom key-value pairs stored on the plan. Included in webhook
                payloads for payment and membership events. Max 50 keys, 100
                chars per key, 500 chars per string value.
              type:
                - object
                - 'null'
          required:
            - id
            - metadata
          type: object
        product:
          description: The product this membership grants access to.
          properties:
            id:
              description: The unique identifier for the product.
              example: prod_xxxxxxxxxxxxx
              type: string
            metadata:
              additionalProperties: true
              description: >-
                Custom key-value pairs stored on the product and included in
                payment and membership webhook payloads. Max 50 keys, 100
                characters per key, 500 characters per string value.
              type:
                - object
                - 'null'
            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
            - metadata
          type: object
        promo_code:
          description: >-
            The promotional code currently applied to this membership's billing.
            Null if no promo code is active.
          properties:
            id:
              description: The unique identifier for the promo code.
              example: promo_xxxxxxxxxxxx
              type: string
          required:
            - id
          type:
            - object
            - 'null'
        renewal_period_end:
          description: >-
            The end of the current billing period for this recurring membership.
            As a Unix timestamp. Null if the membership is not recurring.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type:
            - string
            - 'null'
        renewal_period_start:
          description: >-
            The start of the current billing period for this recurring
            membership. As a Unix timestamp. Null if the membership is not
            recurring.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/MembershipStatus'
          description: >-
            The current lifecycle status of the membership (e.g., active,
            trialing, past_due, canceled, expired, completed).
        updated_at:
          description: The datetime the membership was last updated.
          example: '2023-12-01T05:00:00.401Z'
          format: date-time
          type: string
        user:
          description: >-
            The user who owns this membership. Null if the user account has been
            deleted.
          properties:
            email:
              description: >-
                The user's email address. Requires the member:email:read
                permission to access. Null if not authorized.
              example: john.doe@example.com
              type:
                - string
                - 'null'
            id:
              description: The unique identifier for the user.
              example: user_xxxxxxxxxxxxx
              type: string
            name:
              description: The user's display name shown on their public profile.
              example: John Doe
              type:
                - string
                - 'null'
            username:
              description: The user's unique username shown on their public profile.
              example: johndoe42
              type: string
          required:
            - id
            - username
            - name
            - email
          type:
            - object
            - 'null'
      required:
        - id
        - status
        - created_at
        - joined_at
        - updated_at
        - manage_url
        - member
        - user
        - renewal_period_start
        - renewal_period_end
        - cancel_at_period_end
        - cancel_option
        - cancellation_reason
        - canceled_at
        - currency
        - company
        - plan
        - promo_code
        - product
        - license_key
        - metadata
        - payment_collection_paused
        - checkout_configuration_id
        - custom_field_responses
      type: object
    CancelOptions:
      description: >-
        The different reasons a user can choose for why they are canceling their
        membership.
      enum:
        - too_expensive
        - switching
        - missing_features
        - technical_issues
        - bad_experience
        - other
        - testing
      type: string
    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
    MembershipStatus:
      description: The status of a membership
      enum:
        - trialing
        - active
        - past_due
        - completed
        - canceled
        - expired
        - unresolved
        - drafted
        - canceling
      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

````