{
  "components": {
    "schemas": {
      "AccessLevel": {
        "description": "The access level a given user (or company) has to a product or company.",
        "enum": [
          "no_access",
          "admin",
          "customer"
        ],
        "type": "string"
      },
      "AccessPassOrder": {
        "description": "The ways a relation of AccessPasses can be ordered",
        "enum": [
          "active_memberships_count",
          "created_at",
          "usd_gmv",
          "usd_gmv_30_days"
        ],
        "type": "string"
      },
      "AccessPassTypes": {
        "description": "The different types an product can be. Only use 'regular'. The rest are for internal use",
        "enum": [
          "regular",
          "app",
          "experience_upsell",
          "api_only"
        ],
        "type": "string"
      },
      "AccessToken": {
        "description": "A short-lived access token used to authenticate API requests on behalf of a user.",
        "properties": {
          "expires_at": {
            "description": "The timestamp after which this access token is no longer valid and must be refreshed.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "token": {
            "description": "The signed JWT access token string to include in API request Authorization headers.",
            "type": "string"
          }
        },
        "required": [
          "token",
          "expires_at"
        ],
        "type": "object"
      },
      "AccountLink": {
        "description": "A temporary, time-limited URL that grants a user access to an external account management page.",
        "properties": {
          "expires_at": {
            "description": "The timestamp after which this account link URL is no longer valid.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "The temporary URL to redirect the user to for account access. Expires at the time specified by expires_at.",
            "example": "https://whop.com/payouts/biz_xxxxxxxxx/verify",
            "type": "string"
          }
        },
        "required": [
          "url",
          "expires_at"
        ],
        "type": "object"
      },
      "AccountLinkUseCases": {
        "description": "The different use cases for generating an account link.",
        "enum": [
          "account_onboarding",
          "payouts_portal"
        ],
        "type": "string"
      },
      "AdReport": {
        "description": "An ads performance report. Always returns a summary. The `granularity` field contains a per-bucket time series when the `granularity` arg is set; the `breakdown` field contains per-entity rows when the `breakdown` arg is set.",
        "properties": {
          "breakdown": {
            "description": "Per-entity rows over the date range. `null` when the `breakdown` arg on `adReport` is omitted; otherwise contains one row per ad campaign, ad group, or ad inside the requested scope at the requested level.",
            "items": {
              "description": "Per-entity ad performance row. Returned when the `breakdown` arg on `adReport` is set.",
              "properties": {
                "granularity": {
                  "description": "Per-bucket time series for this entity over the date range, ordered ascending by `bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; otherwise contains rows at the requested grain (`daily` or `hourly`).",
                  "items": {
                    "description": "Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is set by the `ad_report` query's `granularity` argument.",
                    "properties": {
                      "bucket_start": {
                        "description": "The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved in the ad account's reporting timezone — render this in the viewer's local timezone.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": "string"
                      },
                      "clicks": {
                        "description": "Clicks in this bucket.",
                        "example": 42,
                        "type": "integer"
                      },
                      "granularity": {
                        "$ref": "#/components/schemas/Granularities",
                        "description": "The bucket size of this row (`hourly`, `daily`, `weekly`, or `monthly`)."
                      },
                      "impressions": {
                        "description": "Impressions in this bucket.",
                        "example": 42,
                        "type": "integer"
                      },
                      "reach": {
                        "description": "Unique users reached in this bucket. Always `0` for hourly rows (Meta does not return reach at hourly grain).",
                        "example": 42,
                        "type": "integer"
                      },
                      "result_count": {
                        "description": "Count of the primary optimization result in this bucket.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "result_label_key": {
                        "description": "The type of optimization result represented by `resultCount`.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/ResultLabelKeys"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "result_label_override": {
                        "description": "Advertiser-defined label for the result when `resultLabelKey` is `custom`.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "spend": {
                        "description": "Charged spend in this bucket in the requested reporting currency — the amount billed including platform fees, not the platform-side net spend.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "spend_currency": {
                        "$ref": "#/components/schemas/Currencies",
                        "description": "Currency of the `spend` value."
                      },
                      "stat_date": {
                        "description": "The date these stats cover (midnight UTC). For hourly rows, see `statHour` and `bucketStart`.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": "string"
                      },
                      "stat_hour": {
                        "description": "Hour of the day in the ad account's reporting timezone (0-23). `null` for daily rows.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "bucket_start",
                      "stat_date",
                      "stat_hour",
                      "granularity",
                      "spend",
                      "spend_currency",
                      "impressions",
                      "clicks",
                      "reach",
                      "result_count",
                      "result_label_key",
                      "result_label_override"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "id": {
                  "description": "Tag of the entity (ad campaign, ad group, or ad).",
                  "type": "string"
                },
                "level": {
                  "$ref": "#/components/schemas/AdReportBreakdownLevels",
                  "description": "The entity level of this row — matches the `breakdown` arg."
                },
                "name": {
                  "description": "Display name of the entity, when available.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "summary": {
                  "description": "Aggregate totals and rates for this entity over the date range.",
                  "properties": {
                    "click_through_rate": {
                      "description": "Click-through rate (clicks / impressions).",
                      "example": 6.9,
                      "type": "number"
                    },
                    "clicks": {
                      "description": "Total clicks over the date range.",
                      "example": 42,
                      "type": "integer"
                    },
                    "cost_per_click": {
                      "description": "Cost per click in the requested reporting currency.",
                      "example": 6.9,
                      "type": "number"
                    },
                    "cost_per_mille": {
                      "description": "Cost per thousand impressions in the requested reporting currency.",
                      "example": 6.9,
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "cost_per_result": {
                      "description": "Spend divided by `resultCount`. Null when there are no results.",
                      "example": 6.9,
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "frequency": {
                      "description": "Average number of times each reached user saw an ad.",
                      "example": 6.9,
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "impressions": {
                      "description": "Total impressions over the date range.",
                      "example": 42,
                      "type": "integer"
                    },
                    "reach": {
                      "description": "Unique users reached, deduplicated by the external ad platform.",
                      "example": 42,
                      "type": "integer"
                    },
                    "result_count": {
                      "description": "Count of the campaign's primary optimization result (purchases, clicks, etc.) — see `resultLabelKey`.",
                      "example": 42,
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "result_label_key": {
                      "description": "The type of optimization result represented by `resultCount`.",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ResultLabelKeys"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "result_label_override": {
                      "description": "Advertiser-defined label for the result when `resultLabelKey` is `custom`.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "return_on_ad_spend": {
                      "description": "Alias for `purchaseReturnOnAdSpend` — return on ad spend for purchases, as reported by the external ad platform.",
                      "example": 6.9,
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "spend": {
                      "description": "Total spend over the date range in the requested reporting currency.",
                      "example": 6.9,
                      "type": "number"
                    },
                    "spend_currency": {
                      "description": "Currency of the `spend` value. Matches the requested `currency` when set.",
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/Currencies"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "clicks",
                    "impressions",
                    "reach",
                    "spend",
                    "spend_currency",
                    "click_through_rate",
                    "cost_per_click",
                    "cost_per_mille",
                    "frequency",
                    "result_count",
                    "result_label_key",
                    "result_label_override",
                    "cost_per_result",
                    "return_on_ad_spend"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "id",
                "name",
                "level",
                "summary",
                "granularity"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "granularity": {
            "description": "Per-bucket time series over the date range, ordered ascending by `bucketStart`. `null` when the `granularity` arg on `adReport` is omitted; otherwise contains rows at the requested grain (`daily` or `hourly`).",
            "items": {
              "description": "Per-bucket ad performance for an ad campaign, ad group, or ad. Bucket grain is set by the `ad_report` query's `granularity` argument.",
              "properties": {
                "bucket_start": {
                  "description": "The bucket's start time as a real UTC instant. `(statDate, statHour)` resolved in the ad account's reporting timezone — render this in the viewer's local timezone.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "clicks": {
                  "description": "Clicks in this bucket.",
                  "example": 42,
                  "type": "integer"
                },
                "granularity": {
                  "$ref": "#/components/schemas/Granularities",
                  "description": "The bucket size of this row (`hourly`, `daily`, `weekly`, or `monthly`)."
                },
                "impressions": {
                  "description": "Impressions in this bucket.",
                  "example": 42,
                  "type": "integer"
                },
                "reach": {
                  "description": "Unique users reached in this bucket. Always `0` for hourly rows (Meta does not return reach at hourly grain).",
                  "example": 42,
                  "type": "integer"
                },
                "result_count": {
                  "description": "Count of the primary optimization result in this bucket.",
                  "example": 42,
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "result_label_key": {
                  "description": "The type of optimization result represented by `resultCount`.",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ResultLabelKeys"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "result_label_override": {
                  "description": "Advertiser-defined label for the result when `resultLabelKey` is `custom`.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "spend": {
                  "description": "Charged spend in this bucket in the requested reporting currency — the amount billed including platform fees, not the platform-side net spend.",
                  "example": 6.9,
                  "type": "number"
                },
                "spend_currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "Currency of the `spend` value."
                },
                "stat_date": {
                  "description": "The date these stats cover (midnight UTC). For hourly rows, see `statHour` and `bucketStart`.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "stat_hour": {
                  "description": "Hour of the day in the ad account's reporting timezone (0-23). `null` for daily rows.",
                  "example": 42,
                  "type": [
                    "integer",
                    "null"
                  ]
                }
              },
              "required": [
                "bucket_start",
                "stat_date",
                "stat_hour",
                "granularity",
                "spend",
                "spend_currency",
                "impressions",
                "clicks",
                "reach",
                "result_count",
                "result_label_key",
                "result_label_override"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "summary": {
            "description": "Aggregate totals and rates over the date range.",
            "properties": {
              "click_through_rate": {
                "description": "Click-through rate (clicks / impressions).",
                "example": 6.9,
                "type": "number"
              },
              "clicks": {
                "description": "Total clicks over the date range.",
                "example": 42,
                "type": "integer"
              },
              "cost_per_click": {
                "description": "Cost per click in the requested reporting currency.",
                "example": 6.9,
                "type": "number"
              },
              "cost_per_mille": {
                "description": "Cost per thousand impressions in the requested reporting currency.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "cost_per_result": {
                "description": "Spend divided by `resultCount`. Null when there are no results.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "frequency": {
                "description": "Average number of times each reached user saw an ad.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "impressions": {
                "description": "Total impressions over the date range.",
                "example": 42,
                "type": "integer"
              },
              "reach": {
                "description": "Unique users reached, deduplicated by the external ad platform.",
                "example": 42,
                "type": "integer"
              },
              "result_count": {
                "description": "Count of the campaign's primary optimization result (purchases, clicks, etc.) — see `resultLabelKey`.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "result_label_key": {
                "description": "The type of optimization result represented by `resultCount`.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ResultLabelKeys"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "result_label_override": {
                "description": "Advertiser-defined label for the result when `resultLabelKey` is `custom`.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "return_on_ad_spend": {
                "description": "Alias for `purchaseReturnOnAdSpend` — return on ad spend for purchases, as reported by the external ad platform.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "spend": {
                "description": "Total spend over the date range in the requested reporting currency.",
                "example": 6.9,
                "type": "number"
              },
              "spend_currency": {
                "description": "Currency of the `spend` value. Matches the requested `currency` when set.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Currencies"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "clicks",
              "impressions",
              "reach",
              "spend",
              "spend_currency",
              "click_through_rate",
              "cost_per_click",
              "cost_per_mille",
              "frequency",
              "result_count",
              "result_label_key",
              "result_label_override",
              "cost_per_result",
              "return_on_ad_spend"
            ],
            "type": "object"
          }
        },
        "required": [
          "summary",
          "granularity",
          "breakdown"
        ],
        "type": "object"
      },
      "AdReportBreakdownLevels": {
        "description": "Entity level to group an ad report by.",
        "enum": [
          "campaign",
          "ad_group",
          "ad"
        ],
        "type": "string"
      },
      "Affiliate": {
        "description": "An affiliate tracks a user's referral performance and commission earnings for a company, including retention rates, revenue metrics, and payout configurations.",
        "properties": {
          "active_members_count": {
            "description": "The total active members of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "company": {
            "description": "The company attached to this affiliate",
            "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 affiliate was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_retention_rate": {
            "description": "The percentage of referred customers who are still active members",
            "type": "string"
          },
          "customer_retention_rate_ninety_days": {
            "description": "The percentage of referred customers who remained active over the last 90 days",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the affiliate.",
            "example": "aff_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "monthly_recurring_revenue_usd": {
            "description": "The monthly recurring revenue generated by this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "status": {
            "description": "The status of the affiliate",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Status"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_overrides_count": {
            "description": "The total count of all overrides for this affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_referral_earnings_usd": {
            "description": "The total commission earnings paid to this affiliate, formatted as a USD currency string",
            "type": "string"
          },
          "total_referrals_count": {
            "description": "The total referrals of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_revenue_usd": {
            "description": "The total revenue generated from this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the affiliate was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name set on the user's Whop profile. Null if the user has not set a name.",
                "example": "Jane Smith",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The unique username chosen by the user for their Whop profile. Null if the user has not set a username.",
                "example": "janesmith",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "total_referrals_count",
          "total_referral_earnings_usd",
          "total_overrides_count",
          "customer_retention_rate",
          "customer_retention_rate_ninety_days",
          "monthly_recurring_revenue_usd",
          "total_revenue_usd",
          "active_members_count",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AffiliateAppliesToPayments": {
        "description": "Whether the affiliate commission applies to the first payment or all payments",
        "enum": [
          "first_payment",
          "all_payments"
        ],
        "type": "string"
      },
      "AffiliateAppliesToProducts": {
        "description": "Whether a rev-share override applies to a single product or all products",
        "enum": [
          "single_product",
          "all_products"
        ],
        "type": "string"
      },
      "AffiliateListItem": {
        "description": "An affiliate tracks a user's referral performance and commission earnings for a company, including retention rates, revenue metrics, and payout configurations.",
        "properties": {
          "active_members_count": {
            "description": "The total active members of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "company": {
            "description": "The company attached to this affiliate",
            "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 affiliate was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_retention_rate": {
            "description": "The percentage of referred customers who are still active members",
            "type": "string"
          },
          "customer_retention_rate_ninety_days": {
            "description": "The percentage of referred customers who remained active over the last 90 days",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the affiliate.",
            "example": "aff_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "monthly_recurring_revenue_usd": {
            "description": "The monthly recurring revenue generated by this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "status": {
            "description": "The status of the affiliate",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Status"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_overrides_count": {
            "description": "The total count of all overrides for this affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_referral_earnings_usd": {
            "description": "The total commission earnings paid to this affiliate, formatted as a USD currency string",
            "type": "string"
          },
          "total_referrals_count": {
            "description": "The total referrals of the affiliate",
            "example": 42,
            "type": "integer"
          },
          "total_revenue_usd": {
            "description": "The total revenue generated from this affiliate's referrals, formatted as a USD currency string",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the affiliate was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user attached to this affiliate",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name set on the user's Whop profile. Null if the user has not set a name.",
                "example": "Jane Smith",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The unique username chosen by the user for their Whop profile. Null if the user has not set a username.",
                "example": "janesmith",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "updated_at",
          "total_referrals_count",
          "total_referral_earnings_usd",
          "total_overrides_count",
          "customer_retention_rate",
          "customer_retention_rate_ninety_days",
          "monthly_recurring_revenue_usd",
          "total_revenue_usd",
          "active_members_count",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AffiliateOverrideRoles": {
        "description": "The role of an affiliate override (standard or rev_share)",
        "enum": [
          "standard",
          "rev_share"
        ],
        "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"
      },
      "AffiliatesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "cached_total_referrals",
          "cached_total_rewards"
        ],
        "type": "string"
      },
      "AiChat": {
        "description": "An AI-powered chat conversation belonging to a user, with optional scheduled automation.",
        "properties": {
          "blended_token_usage": {
            "description": "The total number of tokens consumed across all messages in this conversation.",
            "example": "123.45",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the ai chat was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the ai chat.",
            "example": "aich_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "message_count": {
            "description": "The total number of messages exchanged in this conversation.",
            "example": 42,
            "type": "integer"
          },
          "notification_preference": {
            "$ref": "#/components/schemas/AiChatNotificationPreferences",
            "description": "The notification preference for this AI chat. `all` delivers AI chat notifications and badges, while `none` mutes them."
          },
          "title": {
            "description": "A short descriptive title for this AI chat conversation. Null if no title has been set.",
            "example": "Weekly Revenue Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the ai chat was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this AI chat conversation.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "notification_preference",
          "message_count",
          "blended_token_usage",
          "created_at",
          "updated_at",
          "last_message_at",
          "user"
        ],
        "type": "object"
      },
      "AiChatListItem": {
        "description": "An AI-powered chat conversation belonging to a user, with optional scheduled automation.",
        "properties": {
          "blended_token_usage": {
            "description": "The total number of tokens consumed across all messages in this conversation.",
            "example": "123.45",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the ai chat was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the ai chat.",
            "example": "aich_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "message_count": {
            "description": "The total number of messages exchanged in this conversation.",
            "example": 42,
            "type": "integer"
          },
          "notification_preference": {
            "$ref": "#/components/schemas/AiChatNotificationPreferences",
            "description": "The notification preference for this AI chat. `all` delivers AI chat notifications and badges, while `none` mutes them."
          },
          "title": {
            "description": "A short descriptive title for this AI chat conversation. Null if no title has been set.",
            "example": "Weekly Revenue Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the ai chat was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who owns this AI chat conversation.",
            "properties": {
              "id": {
                "description": "The unique identifier for the user.",
                "example": "user_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "notification_preference",
          "message_count",
          "blended_token_usage",
          "created_at",
          "updated_at",
          "last_message_at",
          "user"
        ],
        "type": "object"
      },
      "AiChatMessageSourceTypes": {
        "description": "The source of an AI chat message",
        "enum": [
          "manual",
          "suggestion",
          "link"
        ],
        "type": "string"
      },
      "AiChatNotificationPreferences": {
        "description": "The notification preference for an AI chat",
        "enum": [
          "all",
          "none"
        ],
        "type": "string"
      },
      "ApiVersion": {
        "description": "The different API versions",
        "enum": [
          "v1",
          "v2",
          "v5"
        ],
        "type": "string"
      },
      "App": {
        "description": "An app is an integration built on Whop. Apps can serve consumers as experiences within products, or serve companies as business tools.",
        "properties": {
          "api_key": {
            "description": "The API key used to authenticate requests on behalf of this app. Null if no API key has been generated. Requires the 'developer:manage_api_key' permission.",
            "properties": {
              "created_at": {
                "description": "The datetime the private api key was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the private api key.",
                "type": "string"
              },
              "token": {
                "description": "This is the API key used to authenticate requests",
                "type": "string"
              }
            },
            "required": [
              "id",
              "token",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "app_type": {
            "$ref": "#/components/schemas/AppTypes",
            "description": "The target audience classification for this app (e.g., 'b2b_app', 'b2c_app', 'company_app', 'component')."
          },
          "base_url": {
            "description": "The production base URL where the app is hosted. Null if no base URL is configured.",
            "example": "https://myapp.example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company that owns and publishes this app.",
            "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"
          },
          "creator": {
            "description": "The user who created and owns the company that published this app.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          },
          "dashboard_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "A written description of what this app does, displayed on the app store listing page. Null if no description has been set.",
            "example": "A comprehensive analytics dashboard for tracking revenue, members, and growth metrics.",
            "type": [
              "string",
              "null"
            ]
          },
          "discover_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "domain_id": {
            "description": "The unique subdomain identifier for this app's proxied URL on the Whop platform. Forms the URL pattern https://{domain_id}.apps.whop.com.",
            "example": "ab1c2d3e4f5g6h7i8j9k",
            "type": "string"
          },
          "experience_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "hosted_url": {
            "description": "The full canonical URL where this app's hosted web build is served. Null if the app has not claimed a route.",
            "example": "https://myapp.whop.app",
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the app.",
            "example": "app_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "name": {
            "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
            "example": "Courses",
            "type": "string"
          },
          "openapi_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "description": "The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.",
            "type": [
              "string",
              "null"
            ]
          },
          "production_web_build": {
            "description": "The approved app build currently served to users on web. Null if no production build is deployed for web.",
            "properties": {
              "checksum": {
                "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
                "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
                "type": "string"
              },
              "file_url": {
                "description": "A URL to download the app build as a .zip archive.",
                "example": "https://cdn.whop.com/builds/abc123.zip",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the app build.",
                "example": "apbu_xxxxxxxxxxxxx",
                "type": "string"
              },
              "source_url": {
                "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
                "example": "https://cdn.whop.com/builds/abc123-source.zip",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/AppBuildStatuses",
                "description": "The current review status of this build."
              }
            },
            "required": [
              "id",
              "file_url",
              "source_url",
              "checksum",
              "status"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "redirect_uris": {
            "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "requested_permissions": {
            "description": "The list of permissions this app requests when installed, including both required and optional permissions with justifications.",
            "items": {
              "description": "A permission that the app requests from the admin of a company during the oauth flow.",
              "properties": {
                "is_required": {
                  "description": "Whether the action is required for the app to function.",
                  "type": "boolean"
                },
                "justification": {
                  "description": "The reason for requesting the action.",
                  "type": "string"
                },
                "permission_action": {
                  "description": "The action that the app will request off of users when a user installs the app.",
                  "properties": {
                    "action": {
                      "description": "The identifier of the action.",
                      "type": "string"
                    },
                    "name": {
                      "description": "The human readable name of the action.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "action",
                    "name"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "permission_action",
                "is_required",
                "justification"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "route": {
            "description": "The unique subdomain route where this app's hosted web builds are served, such as 'myapp' for myapp.whop.app. Null if the app has not claimed a route.",
            "example": "myapp",
            "type": [
              "string",
              "null"
            ]
          },
          "secrets": {
            "additionalProperties": true,
            "description": "The app's secrets as an object of string values. Encrypted at rest and injected into the app's hosted server runtime as environment bindings. Requires the 'developer:update_app' permission.",
            "type": [
              "object",
              "null"
            ]
          },
          "skills_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "stats": {
            "description": "Aggregate usage statistics for this app, including daily, weekly, and monthly active user counts.",
            "properties": {
              "dau": {
                "description": "The number of unique users who have spent time in this app in the last 24 hours. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "mau": {
                "description": "The number of unique users who have spent time in this app in the last 28 days. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "time_spent_last24_hours": {
                "description": "The total time, in seconds, that all users have spent in this app over the last 24 hours. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              },
              "wau": {
                "description": "The number of unique users who have spent time in this app in the last 7 days. Returns 0 if no usage data is available.",
                "example": 42,
                "type": "integer"
              }
            },
            "required": [
              "dau",
              "mau",
              "time_spent_last24_hours",
              "wau"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppStatuses",
            "description": "The current visibility status of this app on the Whop app store. 'live' means publicly discoverable, 'unlisted' means accessible only via direct link, and 'hidden' means not visible anywhere."
          },
          "verified": {
            "description": "Whether this app has been verified by Whop. Verified apps are endorsed by Whop and displayed in the featured apps section of the app store.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "base_url",
          "domain_id",
          "route",
          "hosted_url",
          "verified",
          "app_type",
          "origin",
          "experience_path",
          "discover_path",
          "dashboard_path",
          "skills_path",
          "openapi_path",
          "company",
          "icon",
          "creator",
          "requested_permissions",
          "stats",
          "api_key",
          "production_web_build",
          "redirect_uris",
          "secrets"
        ],
        "type": "object"
      },
      "AppBuild": {
        "description": "A versioned build artifact for a Whop React Native App, submitted for review and deployment to a specific platform.",
        "properties": {
          "checksum": {
            "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
            "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the app build was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "file_url": {
            "description": "A URL to download the app build as a .zip archive.",
            "example": "https://cdn.whop.com/builds/abc123.zip",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the app build.",
            "example": "apbu_xxxxxxxxxxxxx",
            "type": "string"
          },
          "is_production": {
            "description": "Whether this build is the currently active production build for its platform.",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/AppBuildPlatforms",
            "description": "The target platform for this build."
          },
          "review_message": {
            "description": "Feedback from the reviewer explaining why the build was rejected. Null if the build has not been reviewed or was approved.",
            "example": "App crashes on launch. Please fix and resubmit.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
            "example": "https://cdn.whop.com/builds/abc123-source.zip",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppBuildStatuses",
            "description": "The current review status of this build."
          },
          "supported_app_view_types": {
            "description": "The list of view types this build supports, as declared by the developer.",
            "items": {
              "$ref": "#/components/schemas/AppViewTypes"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "platform",
          "file_url",
          "source_url",
          "created_at",
          "status",
          "checksum",
          "supported_app_view_types",
          "review_message",
          "is_production"
        ],
        "type": "object"
      },
      "AppBuildListItem": {
        "description": "A versioned build artifact for a Whop React Native App, submitted for review and deployment to a specific platform.",
        "properties": {
          "checksum": {
            "description": "A SHA-256 hash of the uploaded build file, generated by the client and used to verify file integrity.",
            "example": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
            "type": "string"
          },
          "created_at": {
            "description": "The datetime the app build was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "file_url": {
            "description": "A URL to download the app build as a .zip archive.",
            "example": "https://cdn.whop.com/builds/abc123.zip",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the app build.",
            "example": "apbu_xxxxxxxxxxxxx",
            "type": "string"
          },
          "is_production": {
            "description": "Whether this build is the currently active production build for its platform.",
            "type": "boolean"
          },
          "platform": {
            "$ref": "#/components/schemas/AppBuildPlatforms",
            "description": "The target platform for this build."
          },
          "review_message": {
            "description": "Feedback from the reviewer explaining why the build was rejected. Null if the build has not been reviewed or was approved.",
            "example": "App crashes on launch. Please fix and resubmit.",
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "description": "A URL to download the compressed source code archive that produced this build. Null if the build was uploaded without a source archive.",
            "example": "https://cdn.whop.com/builds/abc123-source.zip",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppBuildStatuses",
            "description": "The current review status of this build."
          },
          "supported_app_view_types": {
            "description": "The list of view types this build supports, as declared by the developer.",
            "items": {
              "$ref": "#/components/schemas/AppViewTypes"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "platform",
          "file_url",
          "source_url",
          "created_at",
          "status",
          "checksum",
          "supported_app_view_types",
          "review_message",
          "is_production"
        ],
        "type": "object"
      },
      "AppBuildPlatforms": {
        "description": "The different platforms an app build can target.",
        "enum": [
          "ios",
          "android",
          "web"
        ],
        "type": "string"
      },
      "AppBuildStatuses": {
        "description": "The different statuses an AppBuild can be in.",
        "enum": [
          "draft",
          "pending",
          "approved",
          "rejected"
        ],
        "type": "string"
      },
      "AppListItem": {
        "description": "An app is an integration built on Whop. Apps can serve consumers as experiences within products, or serve companies as business tools.",
        "properties": {
          "app_type": {
            "$ref": "#/components/schemas/AppTypes",
            "description": "The target audience classification for this app (e.g., 'b2b_app', 'b2c_app', 'company_app', 'component')."
          },
          "base_url": {
            "description": "The production base URL where the app is hosted. Null if no base URL is configured.",
            "example": "https://myapp.example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company that owns and publishes this app.",
            "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"
          },
          "creator": {
            "description": "The user who created and owns the company that published this app.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          },
          "dashboard_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "A written description of what this app does, displayed on the app store listing page. Null if no description has been set.",
            "example": "A comprehensive analytics dashboard for tracking revenue, members, and growth metrics.",
            "type": [
              "string",
              "null"
            ]
          },
          "discover_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "domain_id": {
            "description": "The unique subdomain identifier for this app's proxied URL on the Whop platform. Forms the URL pattern https://{domain_id}.apps.whop.com.",
            "example": "ab1c2d3e4f5g6h7i8j9k",
            "type": "string"
          },
          "experience_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "hosted_url": {
            "description": "The full canonical URL where this app's hosted web build is served. Null if the app has not claimed a route.",
            "example": "https://myapp.whop.app",
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the app.",
            "example": "app_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "name": {
            "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
            "example": "Courses",
            "type": "string"
          },
          "openapi_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "origin": {
            "description": "The full origin URL for this app's proxied domain (e.g., 'https://myapp.apps.whop.com'). Null if no proxy domain is configured.",
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "description": "The unique subdomain route where this app's hosted web builds are served, such as 'myapp' for myapp.whop.app. Null if the app has not claimed a route.",
            "example": "myapp",
            "type": [
              "string",
              "null"
            ]
          },
          "skills_path": {
            "description": "The URL path template for a specific view of this app, appended to the base domain (e.g., '/experiences/[experienceId]'). Null if the specified view type is not configured.",
            "example": "/experiences/[experienceId]",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AppStatuses",
            "description": "The current visibility status of this app on the Whop app store. 'live' means publicly discoverable, 'unlisted' means accessible only via direct link, and 'hidden' means not visible anywhere."
          },
          "verified": {
            "description": "Whether this app has been verified by Whop. Verified apps are endorsed by Whop and displayed in the featured apps section of the app store.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "status",
          "base_url",
          "domain_id",
          "route",
          "hosted_url",
          "verified",
          "app_type",
          "origin",
          "experience_path",
          "discover_path",
          "dashboard_path",
          "skills_path",
          "openapi_path",
          "company",
          "icon",
          "creator"
        ],
        "type": "object"
      },
      "AppOauthClientTypes": {
        "description": "How this app authenticates at the OAuth token endpoint.",
        "enum": [
          "public",
          "confidential"
        ],
        "type": "string"
      },
      "AppOrder": {
        "description": "The order to fetch the apps in for discovery.",
        "enum": [
          "created_at",
          "discoverable_at",
          "total_installs_last_30_days",
          "total_installs_last_7_days",
          "time_spent",
          "time_spent_last_24_hours",
          "daily_active_users",
          "ai_prompt_count",
          "total_ai_cost_usd",
          "total_ai_tokens",
          "last_ai_prompt_at",
          "ai_average_rating"
        ],
        "type": "string"
      },
      "AppStatuses": {
        "description": "The status of an experience interface",
        "enum": [
          "live",
          "unlisted",
          "hidden"
        ],
        "type": "string"
      },
      "AppTypes": {
        "description": "The type of end-user an app is built for",
        "enum": [
          "b2b_app",
          "b2c_app",
          "company_app",
          "component"
        ],
        "type": "string"
      },
      "AppValidScopes": {
        "const": "read_user",
        "description": "These are the scopes an app can request on behalf of a user",
        "type": "string"
      },
      "AppViewTypes": {
        "description": "The different types of an app view",
        "enum": [
          "hub",
          "discover",
          "dash",
          "dashboard",
          "analytics",
          "skills",
          "openapi"
        ],
        "type": "string"
      },
      "AuthorizedUser": {
        "description": "A user who has been granted administrative access to manage a company's dashboard and settings.",
        "properties": {
          "company": {
            "description": "The company this authorized user has access 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"
          },
          "id": {
            "description": "The unique identifier for the authorized user.",
            "example": "ausr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/AuthorizedUserRoles",
            "description": "The permission role assigned to this authorized user within the company."
          },
          "user": {
            "description": "The user account linked to this authorized user record.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "role",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AuthorizedUserListItem": {
        "description": "A user who has been granted administrative access to manage a company's dashboard and settings.",
        "properties": {
          "company": {
            "description": "The company this authorized user has access 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"
          },
          "id": {
            "description": "The unique identifier for the authorized user.",
            "example": "ausr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/AuthorizedUserRoles",
            "description": "The permission role assigned to this authorized user within the company."
          },
          "user": {
            "description": "The user account linked to this authorized user record.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "role",
          "user",
          "company"
        ],
        "type": "object"
      },
      "AuthorizedUserRoles": {
        "description": "Possible roles an authorized user can have",
        "enum": [
          "owner",
          "admin",
          "sales_manager",
          "moderator",
          "advertiser",
          "app_manager",
          "support",
          "manager",
          "custom"
        ],
        "type": "string"
      },
      "BillingReasons": {
        "description": "The reason why a specific payment was billed",
        "enum": [
          "subscription_create",
          "subscription_cycle",
          "subscription_update",
          "one_time",
          "manual",
          "subscription"
        ],
        "type": "string"
      },
      "BountyTypes": {
        "description": "The available bounty implementation types.",
        "enum": [
          "classic",
          "user_funded",
          "workforce"
        ],
        "type": "string"
      },
      "BusinessGoalTypes": {
        "description": "What the poster is trying to accomplish with a workforce bounty. Used for product taxonomy and analytics, separate from the bounty's implementation type.",
        "enum": [
          "clipping",
          "post_engagement",
          "owned_account_growth",
          "ugc_content",
          "local_activation",
          "data_capture",
          "other"
        ],
        "type": "string"
      },
      "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"
      },
      "CardBrands": {
        "description": "Possible card brands that a payment token can have",
        "enum": [
          "mastercard",
          "visa",
          "amex",
          "discover",
          "unionpay",
          "jcb",
          "diners",
          "link",
          "troy",
          "visadankort",
          "visabancontact",
          "china_union_pay",
          "rupay",
          "jcbrupay",
          "elo",
          "maestro",
          "tarjeta_naranja",
          "cirrus",
          "nspk_mir",
          "verve",
          "ebt",
          "private_label",
          "local_brand",
          "uatp",
          "wexcard",
          "uzcard",
          "meeza",
          "hrg_store_card",
          "girocard",
          "fuel_card",
          "dankort",
          "carnet",
          "atm_card",
          "china_union_payuzcard",
          "codensa",
          "cabal",
          "hipercard",
          "jcblankapay",
          "cmi",
          "aura",
          "unknown"
        ],
        "type": "string"
      },
      "CardIssuingTransactionStatus": {
        "description": "The lifecycle status of a card transaction.",
        "enum": [
          "pending",
          "completed",
          "reversed",
          "declined"
        ],
        "type": "string"
      },
      "CardTransaction": {
        "description": "A card transaction record.",
        "properties": {
          "authorization_method": {
            "description": "How the card was presented or authenticated for the purchase.",
            "example": "ecommerce",
            "type": [
              "string",
              "null"
            ]
          },
          "card_id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "cashback_usd_amount": {
            "description": "The cashback reward amount earned on this transaction, in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the card transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The ISO 4217 currency code for the transaction amount.",
            "example": "USD",
            "type": [
              "string",
              "null"
            ]
          },
          "declined_reason": {
            "description": "The issuer-provided reason the transaction was declined.",
            "example": "insufficient_funds",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the card transaction.",
            "type": "string"
          },
          "international": {
            "description": "Whether the transaction was made with a merchant outside the card's home country.",
            "type": "boolean"
          },
          "local_amount": {
            "description": "The transaction amount in the merchant's local currency before conversion.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "memo": {
            "description": "A user-provided note attached to the transaction.",
            "example": "Team dinner",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category": {
            "description": "The enriched or raw category label for the merchant.",
            "example": "Software",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category_code": {
            "description": "The four-digit ISO 18245 merchant category code (MCC).",
            "example": "5734",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_icon_url": {
            "description": "A URL to the enriched merchant logo image.",
            "example": "https://logo.clearbit.com/example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_name": {
            "description": "The enriched or raw name of the merchant where the purchase was made.",
            "example": "Acme Corporation",
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "description": "When the transaction was settled by the card network.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CardIssuingTransactionStatus",
            "description": "The current lifecycle status of the transaction."
          },
          "transaction_type": {
            "description": "The type of transaction.",
            "example": "spend",
            "type": "string"
          },
          "usd_amount": {
            "description": "The transaction amount in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "usd_amount",
          "authorization_method",
          "created_at",
          "card_id",
          "cashback_usd_amount",
          "currency",
          "declined_reason",
          "international",
          "local_amount",
          "memo",
          "merchant_category",
          "merchant_category_code",
          "merchant_icon_url",
          "merchant_name",
          "posted_at",
          "status",
          "transaction_type"
        ],
        "type": "object"
      },
      "CardTransactionListItem": {
        "description": "A card transaction record.",
        "properties": {
          "authorization_method": {
            "description": "How the card was presented or authenticated for the purchase.",
            "example": "ecommerce",
            "type": [
              "string",
              "null"
            ]
          },
          "card_id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "cashback_usd_amount": {
            "description": "The cashback reward amount earned on this transaction, in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the card transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The ISO 4217 currency code for the transaction amount.",
            "example": "USD",
            "type": [
              "string",
              "null"
            ]
          },
          "declined_reason": {
            "description": "The issuer-provided reason the transaction was declined.",
            "example": "insufficient_funds",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the card transaction.",
            "type": "string"
          },
          "international": {
            "description": "Whether the transaction was made with a merchant outside the card's home country.",
            "type": "boolean"
          },
          "local_amount": {
            "description": "The transaction amount in the merchant's local currency before conversion.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "memo": {
            "description": "A user-provided note attached to the transaction.",
            "example": "Team dinner",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category": {
            "description": "The enriched or raw category label for the merchant.",
            "example": "Software",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_category_code": {
            "description": "The four-digit ISO 18245 merchant category code (MCC).",
            "example": "5734",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_icon_url": {
            "description": "A URL to the enriched merchant logo image.",
            "example": "https://logo.clearbit.com/example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "merchant_name": {
            "description": "The enriched or raw name of the merchant where the purchase was made.",
            "example": "Acme Corporation",
            "type": [
              "string",
              "null"
            ]
          },
          "posted_at": {
            "description": "When the transaction was settled by the card network.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/CardIssuingTransactionStatus",
            "description": "The current lifecycle status of the transaction."
          },
          "transaction_type": {
            "description": "The type of transaction.",
            "example": "spend",
            "type": "string"
          },
          "usd_amount": {
            "description": "The transaction amount in USD.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "usd_amount",
          "authorization_method",
          "created_at",
          "card_id",
          "cashback_usd_amount",
          "currency",
          "declined_reason",
          "international",
          "local_amount",
          "memo",
          "merchant_category",
          "merchant_category_code",
          "merchant_icon_url",
          "merchant_name",
          "posted_at",
          "status",
          "transaction_type"
        ],
        "type": "object"
      },
      "ChatChannel": {
        "description": "A real-time chat feed attached to an experience, with configurable moderation and posting permissions.",
        "properties": {
          "ban_media": {
            "description": "Whether media uploads such as images and videos are blocked in this chat.",
            "type": "boolean"
          },
          "ban_urls": {
            "description": "Whether URL links are blocked from being posted in this chat.",
            "type": "boolean"
          },
          "banned_words": {
            "description": "A list of words that are automatically filtered from messages in this chat.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "experience": {
            "description": "The experience this chat feed is attached to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "user_posts_cooldown_seconds": {
            "description": "The minimum number of seconds a user must wait between consecutive messages. Null if no cooldown is enforced.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "who_can_post": {
            "$ref": "#/components/schemas/WhoCanPostTypes",
            "description": "The permission level controlling which users can send messages in this chat."
          },
          "who_can_react": {
            "$ref": "#/components/schemas/WhoCanReactTypes",
            "description": "The permission level controlling which users can add reactions in this chat."
          }
        },
        "required": [
          "id",
          "experience",
          "ban_media",
          "ban_urls",
          "who_can_post",
          "who_can_react",
          "user_posts_cooldown_seconds",
          "banned_words"
        ],
        "type": "object"
      },
      "ChatChannelListItem": {
        "description": "A real-time chat feed attached to an experience, with configurable moderation and posting permissions.",
        "properties": {
          "ban_media": {
            "description": "Whether media uploads such as images and videos are blocked in this chat.",
            "type": "boolean"
          },
          "ban_urls": {
            "description": "Whether URL links are blocked from being posted in this chat.",
            "type": "boolean"
          },
          "banned_words": {
            "description": "A list of words that are automatically filtered from messages in this chat.",
            "items": {
              "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
              "type": "string"
            },
            "type": "array"
          },
          "experience": {
            "description": "The experience this chat feed is attached to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "user_posts_cooldown_seconds": {
            "description": "The minimum number of seconds a user must wait between consecutive messages. Null if no cooldown is enforced.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "who_can_post": {
            "$ref": "#/components/schemas/WhoCanPostTypes",
            "description": "The permission level controlling which users can send messages in this chat."
          },
          "who_can_react": {
            "$ref": "#/components/schemas/WhoCanReactTypes",
            "description": "The permission level controlling which users can add reactions in this chat."
          }
        },
        "required": [
          "id",
          "experience",
          "ban_media",
          "ban_urls",
          "who_can_post",
          "who_can_react",
          "user_posts_cooldown_seconds",
          "banned_words"
        ],
        "type": "object"
      },
      "CheckoutConfiguration": {
        "description": "A checkout configuration is a reusable configuration for a checkout, including the plan, affiliate, and custom metadata. Payments and memberships created from a checkout session inherit its metadata.",
        "properties": {
          "affiliate_code": {
            "description": "The affiliate code to use for the checkout configuration",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The ID of the company to use for the checkout configuration",
            "type": "string"
          },
          "currency": {
            "description": "The currency to use for the configuration when in 'setup' mode. This is used to target which currency specific payment methods are available. If not provided, it will default to 'usd' when in setup mode.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the checkout session.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The metadata to use for the checkout configuration",
            "type": [
              "object",
              "null"
            ]
          },
          "mode": {
            "$ref": "#/components/schemas/CheckoutModes",
            "description": "The mode of the checkout session."
          },
          "payment_method_configuration": {
            "description": "The explicit payment method configuration for the session, if any. This currently only works in 'setup' mode. Use the plan's payment_method_configuration for payment method.",
            "properties": {
              "disabled": {
                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "enabled": {
                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "include_platform_defaults": {
                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                "type": "boolean"
              }
            },
            "required": [
              "enabled",
              "disabled",
              "include_platform_defaults"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan to use for the checkout configuration",
            "properties": {
              "adaptive_pricing_enabled": {
                "description": "Whether the creator has turned on adaptive pricing for this plan. Raw setting — does not check processor compatibility or feature flags.",
                "type": "boolean"
              },
              "billing_period": {
                "description": "Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "expiration_days": {
                "description": "Access duration in days for expiration-based plans, such as 365 for a one-year pass.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "initial_price": {
                "description": "The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99). For one-time plans, this is the full price. For renewal plans, this is charged on top of the first renewal_price.",
                "example": 6.9,
                "type": "number"
              },
              "plan_type": {
                "$ref": "#/components/schemas/PlanTypes",
                "description": "The billing model for this plan: 'renewal' for recurring subscriptions or 'one_time' for single payments."
              },
              "release_method": {
                "$ref": "#/components/schemas/ReleaseMethod",
                "description": "Sales method for this plan: `buy_now` for immediate purchase or `waitlist` for waitlist-based access."
              },
              "renewal_price": {
                "description": "The recurring price charged every billing_period in the plan's base_currency (e.g., 9.99 for $9.99/period). Zero for one-time plans.",
                "example": 6.9,
                "type": "number"
              },
              "three_ds_level": {
                "description": "The 3D Secure behavior for this plan. Null means the plan inherits the account default.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PlanThreeDsLevels"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trial_period_days": {
                "description": "Free trial days before first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility",
                "description": "Controls whether the plan is visible to customers. When set to 'hidden', the plan is only accessible via direct link."
              }
            },
            "required": [
              "id",
              "visibility",
              "plan_type",
              "release_method",
              "currency",
              "billing_period",
              "expiration_days",
              "initial_price",
              "renewal_price",
              "trial_period_days",
              "three_ds_level",
              "adaptive_pricing_enabled"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "purchase_url": {
            "description": "A URL you can send to customers to complete a checkout. It looks like `/checkout/plan_xxxx?session={id}`",
            "type": "string"
          },
          "redirect_url": {
            "description": "The URL to redirect the user to after the checkout configuration is created",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "mode",
          "currency",
          "plan",
          "affiliate_code",
          "metadata",
          "redirect_url",
          "purchase_url",
          "payment_method_configuration"
        ],
        "type": "object"
      },
      "CheckoutConfigurationListItem": {
        "description": "A checkout configuration is a reusable configuration for a checkout, including the plan, affiliate, and custom metadata. Payments and memberships created from a checkout session inherit its metadata.",
        "properties": {
          "affiliate_code": {
            "description": "The affiliate code to use for the checkout configuration",
            "type": [
              "string",
              "null"
            ]
          },
          "company_id": {
            "description": "The ID of the company to use for the checkout configuration",
            "type": "string"
          },
          "currency": {
            "description": "The currency to use for the configuration when in 'setup' mode. This is used to target which currency specific payment methods are available. If not provided, it will default to 'usd' when in setup mode.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the checkout session.",
            "example": "ch_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The metadata to use for the checkout configuration",
            "type": [
              "object",
              "null"
            ]
          },
          "mode": {
            "$ref": "#/components/schemas/CheckoutModes",
            "description": "The mode of the checkout session."
          },
          "payment_method_configuration": {
            "description": "The explicit payment method configuration for the session, if any. This currently only works in 'setup' mode. Use the plan's payment_method_configuration for payment method.",
            "properties": {
              "disabled": {
                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "enabled": {
                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                "items": {
                  "$ref": "#/components/schemas/PaymentMethodTypes"
                },
                "type": "array"
              },
              "include_platform_defaults": {
                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                "type": "boolean"
              }
            },
            "required": [
              "enabled",
              "disabled",
              "include_platform_defaults"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan to use for the checkout configuration",
            "properties": {
              "adaptive_pricing_enabled": {
                "description": "Whether the creator has turned on adaptive pricing for this plan. Raw setting — does not check processor compatibility or feature flags.",
                "type": "boolean"
              },
              "billing_period": {
                "description": "Number of days between recurring charges, such as 30 for monthly or 365 for annual. `null` for one-time plans.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "expiration_days": {
                "description": "Access duration in days for expiration-based plans, such as 365 for a one-year pass.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "initial_price": {
                "description": "The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99). For one-time plans, this is the full price. For renewal plans, this is charged on top of the first renewal_price.",
                "example": 6.9,
                "type": "number"
              },
              "plan_type": {
                "$ref": "#/components/schemas/PlanTypes",
                "description": "The billing model for this plan: 'renewal' for recurring subscriptions or 'one_time' for single payments."
              },
              "release_method": {
                "$ref": "#/components/schemas/ReleaseMethod",
                "description": "Sales method for this plan: `buy_now` for immediate purchase or `waitlist` for waitlist-based access."
              },
              "renewal_price": {
                "description": "The recurring price charged every billing_period in the plan's base_currency (e.g., 9.99 for $9.99/period). Zero for one-time plans.",
                "example": 6.9,
                "type": "number"
              },
              "three_ds_level": {
                "description": "The 3D Secure behavior for this plan. Null means the plan inherits the account default.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PlanThreeDsLevels"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trial_period_days": {
                "description": "Free trial days before first renewal charge. `null` if no trial is configured or the user has already used a trial for this plan.",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "visibility": {
                "$ref": "#/components/schemas/Visibility",
                "description": "Controls whether the plan is visible to customers. When set to 'hidden', the plan is only accessible via direct link."
              }
            },
            "required": [
              "id",
              "visibility",
              "plan_type",
              "release_method",
              "currency",
              "billing_period",
              "expiration_days",
              "initial_price",
              "renewal_price",
              "trial_period_days",
              "three_ds_level",
              "adaptive_pricing_enabled"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "purchase_url": {
            "description": "A URL you can send to customers to complete a checkout. It looks like `/checkout/plan_xxxx?session={id}`",
            "type": "string"
          },
          "redirect_url": {
            "description": "The URL to redirect the user to after the checkout configuration is created",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "mode",
          "currency",
          "plan",
          "affiliate_code",
          "metadata",
          "redirect_url",
          "purchase_url",
          "payment_method_configuration"
        ],
        "type": "object"
      },
      "CheckoutFonts": {
        "description": "The different font families available for checkout pages.",
        "enum": [
          "system",
          "roboto",
          "open_sans"
        ],
        "type": "string"
      },
      "CheckoutModes": {
        "description": "The different modes a checkout can be set to.",
        "enum": [
          "payment",
          "setup"
        ],
        "type": "string"
      },
      "CheckoutShapes": {
        "description": "The different border-radius styles available for checkout pages.",
        "enum": [
          "rounded",
          "pill",
          "rectangular"
        ],
        "type": "string"
      },
      "Company": {
        "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
        "properties": {
          "affiliate_instructions": {
            "description": "Guidelines and instructions provided to affiliates explaining how to promote this company's products.",
            "example": "Share your unique link on social media to earn 20% commission.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the company was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A promotional pitch written by the company creator, displayed to potential customers on the store page.",
            "example": "Learn the fundamentals of data analytics with hands-on projects.",
            "type": [
              "string",
              "null"
            ]
          },
          "featured_affiliate_product": {
            "description": "The product featured for affiliates to promote on this company's affiliate page. Null if none is configured.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product.",
                "example": "prod_xxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of the product shown to customers. Maximum 50 characters.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company.",
            "example": "biz_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "logo": {
            "description": "The company's logo.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "member_count": {
            "description": "The total number of users who currently hold active memberships across all of this company's products.",
            "example": 42,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "A key-value JSON object of custom metadata for this company, managed by the platform that created the account.",
            "type": [
              "object",
              "null"
            ]
          },
          "owner_user": {
            "description": "The user who owns and has full administrative control over this company.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews across all products for this company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
            "example": "pickaxe",
            "type": "string"
          },
          "send_customer_emails": {
            "description": "Whether Whop sends transactional emails (receipts, updates) to customers on behalf of this company.",
            "type": "boolean"
          },
          "social_links": {
            "description": "The list of social media accounts and external links associated with this company.",
            "items": {
              "description": "A social link attached to a resource on the site.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the social link.",
                  "example": "soci_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "url": {
                  "description": "The URL of the social media profile or external link.",
                  "example": "https://x.com/whop",
                  "type": "string"
                },
                "website": {
                  "$ref": "#/components/schemas/SocialLinkWebsites",
                  "description": "The website"
                }
              },
              "required": [
                "id",
                "url",
                "website"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "target_audience": {
            "description": "The target audience for the company. Null if not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the company shown to customers.",
            "example": "Pickaxe",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the company was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "verified",
          "send_customer_emails",
          "created_at",
          "updated_at",
          "member_count",
          "owner_user",
          "route",
          "logo",
          "published_reviews_count",
          "metadata",
          "target_audience",
          "social_links",
          "affiliate_instructions",
          "featured_affiliate_product"
        ],
        "type": "object"
      },
      "CompanyListItem": {
        "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
        "properties": {
          "created_at": {
            "description": "The datetime the company was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A promotional pitch written by the company creator, displayed to potential customers on the store page.",
            "example": "Learn the fundamentals of data analytics with hands-on projects.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company.",
            "example": "biz_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "logo": {
            "description": "The company's logo.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "member_count": {
            "description": "The total number of users who currently hold active memberships across all of this company's products.",
            "example": 42,
            "type": "integer"
          },
          "metadata": {
            "additionalProperties": true,
            "description": "A key-value JSON object of custom metadata for this company, managed by the platform that created the account.",
            "type": [
              "object",
              "null"
            ]
          },
          "owner_user": {
            "description": "The user who owns and has full administrative control over this company.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews across all products for this company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
            "example": "pickaxe",
            "type": "string"
          },
          "send_customer_emails": {
            "description": "Whether Whop sends transactional emails (receipts, updates) to customers on behalf of this company.",
            "type": "boolean"
          },
          "target_audience": {
            "description": "The target audience for the company. Null if not set.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the company shown to customers.",
            "example": "Pickaxe",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the company was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "verified",
          "send_customer_emails",
          "created_at",
          "updated_at",
          "member_count",
          "owner_user",
          "route",
          "logo",
          "published_reviews_count",
          "metadata",
          "target_audience"
        ],
        "type": "object"
      },
      "CompanyTokenTransaction": {
        "description": "A token transaction records a credit or debit to a member's token balance within a company, including transfers between members.",
        "properties": {
          "amount": {
            "description": "The token amount for this transaction. Always a positive value regardless of transaction type.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company whose token balance this transaction affects.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the company token transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "Free-text description explaining the reason for this token transaction. Null if no description was provided.",
            "example": "Reward for completing onboarding",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company token transaction.",
            "type": "string"
          },
          "idempotency_key": {
            "description": "A unique key used to prevent duplicate transactions when retrying API requests. Null if no idempotency key was provided.",
            "example": "txn_reward_usr_123_2024",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_transaction_id": {
            "description": "The ID of the corresponding transaction on the other side of a transfer. Null if this is not a transfer transaction.",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "transaction_type": {
            "$ref": "#/components/schemas/CompanyTokenTransactionTypes",
            "description": "The direction of this token transaction (add, subtract, or transfer)."
          },
          "user": {
            "description": "The user whose token balance was affected by this transaction.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "transaction_type",
          "amount",
          "description",
          "created_at",
          "linked_transaction_id",
          "idempotency_key",
          "user",
          "member",
          "company"
        ],
        "type": "object"
      },
      "CompanyTokenTransactionListItem": {
        "description": "A token transaction records a credit or debit to a member's token balance within a company, including transfers between members.",
        "properties": {
          "amount": {
            "description": "The token amount for this transaction. Always a positive value regardless of transaction type.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company whose token balance this transaction affects.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the company token transaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "Free-text description explaining the reason for this token transaction. Null if no description was provided.",
            "example": "Reward for completing onboarding",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the company token transaction.",
            "type": "string"
          },
          "idempotency_key": {
            "description": "A unique key used to prevent duplicate transactions when retrying API requests. Null if no idempotency key was provided.",
            "example": "txn_reward_usr_123_2024",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_transaction_id": {
            "description": "The ID of the corresponding transaction on the other side of a transfer. Null if this is not a transfer transaction.",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member whose token balance was affected by this transaction.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "transaction_type": {
            "$ref": "#/components/schemas/CompanyTokenTransactionTypes",
            "description": "The direction of this token transaction (add, subtract, or transfer)."
          },
          "user": {
            "description": "The user whose token balance was affected by this transaction.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "transaction_type",
          "amount",
          "description",
          "created_at",
          "linked_transaction_id",
          "idempotency_key",
          "user",
          "member",
          "company"
        ],
        "type": "object"
      },
      "CompanyTokenTransactionTypes": {
        "description": "The type of token transaction",
        "enum": [
          "add",
          "subtract",
          "transfer"
        ],
        "type": "string"
      },
      "Countries": {
        "description": "The available countries on the platform",
        "enum": [
          "us",
          "ca",
          "gb",
          "ab",
          "af",
          "al",
          "dz",
          "as",
          "ad",
          "ao",
          "ai",
          "aq",
          "ag",
          "ar",
          "am",
          "aw",
          "au",
          "at",
          "az",
          "bs",
          "bh",
          "bd",
          "bb",
          "by",
          "be",
          "bz",
          "bj",
          "bm",
          "bt",
          "bo",
          "ba",
          "bw",
          "br",
          "io",
          "vg",
          "bn",
          "bg",
          "bf",
          "bi",
          "kh",
          "cm",
          "cv",
          "ky",
          "cf",
          "td",
          "cl",
          "cn",
          "cx",
          "cc",
          "co",
          "km",
          "cg",
          "ck",
          "cr",
          "ci",
          "hr",
          "cu",
          "cw",
          "cy",
          "cz",
          "cd",
          "dk",
          "dj",
          "dm",
          "do",
          "ec",
          "eg",
          "sv",
          "gq",
          "ee",
          "et",
          "fk",
          "fo",
          "fj",
          "fi",
          "fr",
          "gf",
          "pf",
          "ga",
          "gm",
          "ge",
          "de",
          "gh",
          "gi",
          "gr",
          "gl",
          "gd",
          "gp",
          "gu",
          "gt",
          "gg",
          "gn",
          "gw",
          "gy",
          "ht",
          "hn",
          "hk",
          "hu",
          "is",
          "in",
          "id",
          "iq",
          "ie",
          "im",
          "il",
          "it",
          "jm",
          "sj",
          "jp",
          "je",
          "jo",
          "kz",
          "ke",
          "ki",
          "xk",
          "kw",
          "kg",
          "la",
          "lv",
          "lb",
          "ls",
          "lr",
          "ly",
          "li",
          "lt",
          "lu",
          "mo",
          "mk",
          "mg",
          "mw",
          "my",
          "mv",
          "ml",
          "mt",
          "mh",
          "mq",
          "mr",
          "mu",
          "yt",
          "mx",
          "fm",
          "md",
          "mc",
          "mn",
          "me",
          "ms",
          "ma",
          "mz",
          "mm",
          "na",
          "nr",
          "np",
          "nl",
          "an",
          "nc",
          "nz",
          "ni",
          "ne",
          "ng",
          "nu",
          "mp",
          "no",
          "om",
          "pk",
          "pw",
          "ps",
          "pa",
          "pg",
          "py",
          "pe",
          "ph",
          "pn",
          "pl",
          "pt",
          "pr",
          "qa",
          "re",
          "ro",
          "ru",
          "rw",
          "bl",
          "sh",
          "kn",
          "lc",
          "mf",
          "pm",
          "vc",
          "ws",
          "sm",
          "st",
          "sa",
          "sn",
          "rs",
          "sc",
          "sl",
          "sg",
          "sx",
          "sk",
          "si",
          "sb",
          "so",
          "za",
          "kr",
          "ss",
          "es",
          "lk",
          "sd",
          "sr",
          "sz",
          "se",
          "ch",
          "tw",
          "tj",
          "tz",
          "th",
          "tl",
          "tg",
          "tk",
          "to",
          "tt",
          "tn",
          "tr",
          "tm",
          "tc",
          "tv",
          "vi",
          "ug",
          "ua",
          "ae",
          "um",
          "uy",
          "uz",
          "vu",
          "va",
          "ve",
          "vn",
          "wf",
          "eh",
          "ye",
          "zm",
          "zw",
          "sy"
        ],
        "type": "string"
      },
      "Course": {
        "description": "A structured learning module containing chapters and lessons, belonging to an experience.",
        "properties": {
          "certificate_after_completion_enabled": {
            "description": "Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "chapters": {
            "description": "An ordered list of all chapters in this course, sorted by their display position.",
            "items": {
              "description": "A grouping of related lessons within a course, used to organize content into sections.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the chapter.",
                  "example": "chap_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "lessons": {
                  "description": "An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users.",
                  "items": {
                    "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
                    "properties": {
                      "id": {
                        "description": "The unique identifier for the lesson.",
                        "example": "lesn_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "lesson_type": {
                        "$ref": "#/components/schemas/LessonTypes",
                        "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
                      },
                      "order": {
                        "description": "The sort position of this lesson within its parent chapter, starting from zero.",
                        "example": 42,
                        "type": "integer"
                      },
                      "thumbnail": {
                        "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
                        "properties": {
                          "url": {
                            "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                            "example": "https://media.whop.com/abc123/optimized.jpg",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "url"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                        "example": "Understanding Candlestick Patterns",
                        "type": "string"
                      },
                      "video_asset": {
                        "description": "The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.",
                        "properties": {
                          "duration_seconds": {
                            "description": "The duration of the video in seconds",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "signed_playback_id": {
                            "description": "The signed playback ID of the Mux asset",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "signed_thumbnail_playback_token": {
                            "description": "The signed thumbnail playback token of the Mux asset",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "signed_playback_id",
                          "signed_thumbnail_playback_token",
                          "duration_seconds"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "lesson_type",
                      "title",
                      "order",
                      "video_asset",
                      "thumbnail"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "order": {
                  "description": "The sort position of this chapter within its parent course, starting from zero.",
                  "example": 42,
                  "type": "integer"
                },
                "title": {
                  "description": "The display name of the chapter shown to students. Maximum 150 characters.",
                  "example": "Getting Started",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "order",
                "lessons"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "cover_image": {
            "description": "The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.",
            "example": "https://assets.whop.com/images/course-cover.jpg",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the course was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A brief summary of the course content and objectives. Null if no description has been set.",
            "example": "Learn advanced trading strategies from industry experts.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the course.",
            "example": "cors_xxxxxxxxxxxxx",
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/Languages",
            "description": "The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg."
          },
          "order": {
            "description": "The sort position of this course within its parent experience, as a decimal for flexible ordering.",
            "example": "123.45",
            "type": "string"
          },
          "require_completing_lessons_in_order": {
            "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
            "type": "boolean"
          },
          "tagline": {
            "description": "A short marketing tagline displayed beneath the course title. Null if no tagline has been set.",
            "example": "Master the fundamentals in 30 days",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "optimized_url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "description": "The original source URL of the attachment, such as a direct link to S3. This should never be displayed on the client and should always be passed through an Imgproxy transformer.",
                "example": "https://media.whop.com/abc123/original.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "optimized_url",
              "source_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the course shown to students. Null if no title has been set.",
            "example": "Introduction to Technical Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the course was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/CourseVisibilities",
            "description": "The visibility setting that controls whether this course appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "tagline",
          "cover_image",
          "thumbnail",
          "description",
          "language",
          "certificate_after_completion_enabled",
          "require_completing_lessons_in_order",
          "order",
          "visibility",
          "created_at",
          "updated_at",
          "chapters"
        ],
        "type": "object"
      },
      "CourseChapter": {
        "description": "A grouping of related lessons within a course, used to organize content into sections.",
        "properties": {
          "id": {
            "description": "The unique identifier for the chapter.",
            "example": "chap_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lessons": {
            "description": "An ordered list of lessons in this chapter, sorted by display position. Hidden lessons are excluded for non-admin users.",
            "items": {
              "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the lesson.",
                  "example": "lesn_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "order": {
                  "description": "The sort position of this lesson within its parent chapter, starting from zero.",
                  "example": 42,
                  "type": "integer"
                },
                "title": {
                  "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                  "example": "Understanding Candlestick Patterns",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "title",
                "order"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "order": {
            "description": "The sort position of this chapter within its parent course, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "title": {
            "description": "The display name of the chapter shown to students. Maximum 150 characters.",
            "example": "Getting Started",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lessons"
        ],
        "type": "object"
      },
      "CourseChapterListItem": {
        "description": "A grouping of related lessons within a course, used to organize content into sections.",
        "properties": {
          "id": {
            "description": "The unique identifier for the chapter.",
            "example": "chap_xxxxxxxxxxxxx",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this chapter within its parent course, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "title": {
            "description": "The display name of the chapter shown to students. Maximum 150 characters.",
            "example": "Getting Started",
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "order"
        ],
        "type": "object"
      },
      "CourseLesson": {
        "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
        "properties": {
          "assessment_questions": {
            "description": "The list of questions for quiz or knowledge check lessons. Empty for non-assessment lesson types.",
            "items": {
              "description": "An assessment question in a course quiz or knowledge check",
              "properties": {
                "correct_answer": {
                  "description": "The correct answer for the question. Used for short answer questions. Only visible to admins (users with courses:update permission)",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "description": "The datetime the assessment question was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the assessment question.",
                  "example": "crsaq_xxxxxxxxxxxx",
                  "type": "string"
                },
                "image": {
                  "description": "Optional image attachment for the question",
                  "properties": {
                    "content_type": {
                      "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                      "example": "image/jpeg",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filename": {
                      "description": "The original filename of the uploaded attachment, including its file extension.",
                      "example": "document.pdf",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "url": {
                      "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                      "example": "https://media.whop.com/abc123/optimized.jpg",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "filename",
                    "content_type",
                    "url"
                  ],
                  "type": [
                    "object",
                    "null"
                  ]
                },
                "options": {
                  "description": "The answer options for multiple choice/select questions",
                  "items": {
                    "description": "An answer option for a multiple choice or multiple select assessment question",
                    "properties": {
                      "id": {
                        "description": "The unique identifier for the assessment question option.",
                        "example": "crsaqo_xxxxxxxxxxx",
                        "type": "string"
                      },
                      "is_correct": {
                        "description": "Whether this option is a correct answer. Only visible to admins (users with courses:update permission)",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "option_text": {
                        "description": "The text of the answer option",
                        "type": "string"
                      },
                      "order": {
                        "description": "The order of this option within the question",
                        "example": 42,
                        "type": "integer"
                      }
                    },
                    "required": [
                      "id",
                      "option_text",
                      "is_correct",
                      "order"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "order": {
                  "description": "The order of the question within its lesson",
                  "example": 42,
                  "type": "integer"
                },
                "question_text": {
                  "description": "The text of the question",
                  "type": "string"
                },
                "question_type": {
                  "$ref": "#/components/schemas/CoursesAssessmentQuestionTypes",
                  "description": "The type of the question"
                }
              },
              "required": [
                "id",
                "question_text",
                "question_type",
                "correct_answer",
                "order",
                "created_at",
                "image",
                "options"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "attachments": {
            "description": "All supplementary files attached to this lesson returned as a flat array rather than a paginated connection.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "content": {
            "description": "The Markdown content body of the lesson. Null if the lesson has no text content.",
            "example": "In this lesson, we will cover the basics of technical analysis...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the lesson was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "days_from_course_start_until_unlock": {
            "description": "The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "embed_id": {
            "description": "The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.",
            "example": "dQw4w9WgXcQ",
            "type": [
              "string",
              "null"
            ]
          },
          "embed_type": {
            "description": "The platform type for the embedded video. One of: youtube, loom. Null if the lesson has no embed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EmbedTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the lesson.",
            "example": "lesn_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lesson_type": {
            "$ref": "#/components/schemas/LessonTypes",
            "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
          },
          "main_pdf": {
            "description": "The primary PDF document for PDF-type lessons. Null if this lesson is not a PDF lesson or no PDF has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "order": {
            "description": "The sort position of this lesson within its parent chapter, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the lesson shown to students. Maximum 120 characters.",
            "example": "Understanding Candlestick Patterns",
            "type": "string"
          },
          "video_asset": {
            "description": "The Mux video asset for video-type lessons, used for streaming playback. Null if this lesson has no hosted video.",
            "properties": {
              "asset_id": {
                "description": "The Mux-provided ID of the asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "audio_only": {
                "description": "Whether this asset contains only audio",
                "type": "boolean"
              },
              "created_at": {
                "description": "The datetime the mux asset was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "duration_seconds": {
                "description": "The duration of the video in seconds",
                "example": 42,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "finished_uploading_at": {
                "description": "The time at which the video finished uploading",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the mux asset.",
                "example": "mux_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "playback_id": {
                "description": "The public playback ID of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_playback_id": {
                "description": "The signed playback ID of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_storyboard_playback_token": {
                "description": "The signed storyboard playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_thumbnail_playback_token": {
                "description": "The signed thumbnail playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "signed_video_playback_token": {
                "description": "The signed video playback token of the Mux asset",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MuxAssetStatuses",
                "description": "The status of the Mux asset"
              },
              "updated_at": {
                "description": "The datetime the mux asset was last updated.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              }
            },
            "required": [
              "id",
              "asset_id",
              "playback_id",
              "signed_playback_id",
              "status",
              "audio_only",
              "duration_seconds",
              "signed_video_playback_token",
              "signed_thumbnail_playback_token",
              "signed_storyboard_playback_token",
              "created_at",
              "updated_at",
              "finished_uploading_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/LessonVisibilities",
            "description": "The visibility setting that controls whether this lesson appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lesson_type",
          "visibility",
          "content",
          "days_from_course_start_until_unlock",
          "embed_type",
          "embed_id",
          "created_at",
          "thumbnail",
          "video_asset",
          "main_pdf",
          "assessment_questions",
          "attachments"
        ],
        "type": "object"
      },
      "CourseLessonInteraction": {
        "description": "A record of a user's progress on a specific lesson, tracking whether they have completed it.",
        "properties": {
          "completed": {
            "description": "Whether the user has finished this lesson.",
            "type": "boolean"
          },
          "course": {
            "description": "The course that contains the tracked lesson.",
            "properties": {
              "experience": {
                "description": "The parent experience that this course belongs to.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the experience.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the course.",
                "example": "cors_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the course shown to students. Null if no title has been set.",
                "example": "Introduction to Technical Analysis",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "experience"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the lesson interaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lesson interaction.",
            "example": "crsli_xxxxxxxxxxxx",
            "type": "string"
          },
          "lesson": {
            "description": "The lesson that this progress record belongs to.",
            "properties": {
              "chapter": {
                "description": "The parent chapter that contains this lesson.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the chapter.",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                "example": "Understanding Candlestick Patterns",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "chapter"
            ],
            "type": "object"
          },
          "user": {
            "description": "The user whose progress is being tracked.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed",
          "created_at",
          "lesson",
          "user",
          "course"
        ],
        "type": "object"
      },
      "CourseLessonInteractionListItem": {
        "description": "A record of a user's progress on a specific lesson, tracking whether they have completed it.",
        "properties": {
          "completed": {
            "description": "Whether the user has finished this lesson.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the lesson interaction was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lesson interaction.",
            "example": "crsli_xxxxxxxxxxxx",
            "type": "string"
          },
          "lesson": {
            "description": "The lesson that this progress record belongs to.",
            "properties": {
              "chapter": {
                "description": "The parent chapter that contains this lesson.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the chapter.",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the lesson.",
                "example": "lesn_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                "example": "Understanding Candlestick Patterns",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "chapter"
            ],
            "type": "object"
          },
          "user": {
            "description": "The user whose progress is being tracked.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed",
          "created_at",
          "lesson",
          "user"
        ],
        "type": "object"
      },
      "CourseLessonListItem": {
        "description": "An individual learning unit within a chapter, which can contain text, video, PDF, or assessment content.",
        "properties": {
          "content": {
            "description": "The Markdown content body of the lesson. Null if the lesson has no text content.",
            "example": "In this lesson, we will cover the basics of technical analysis...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the lesson was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "days_from_course_start_until_unlock": {
            "description": "The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "embed_id": {
            "description": "The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.",
            "example": "dQw4w9WgXcQ",
            "type": [
              "string",
              "null"
            ]
          },
          "embed_type": {
            "description": "The platform type for the embedded video. One of: youtube, loom. Null if the lesson has no embed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EmbedTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the lesson.",
            "example": "lesn_xxxxxxxxxxxxx",
            "type": "string"
          },
          "lesson_type": {
            "$ref": "#/components/schemas/LessonTypes",
            "description": "The content format of this lesson. One of: text, video, pdf, multi, quiz, knowledge_check."
          },
          "order": {
            "description": "The sort position of this lesson within its parent chapter, starting from zero.",
            "example": 42,
            "type": "integer"
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on lesson cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the lesson shown to students. Maximum 120 characters.",
            "example": "Understanding Candlestick Patterns",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/LessonVisibilities",
            "description": "The visibility setting that controls whether this lesson appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "order",
          "lesson_type",
          "visibility",
          "content",
          "days_from_course_start_until_unlock",
          "embed_type",
          "embed_id",
          "created_at",
          "thumbnail"
        ],
        "type": "object"
      },
      "CourseListItem": {
        "description": "A structured learning module containing chapters and lessons, belonging to an experience.",
        "properties": {
          "certificate_after_completion_enabled": {
            "description": "Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "cover_image": {
            "description": "The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.",
            "example": "https://assets.whop.com/images/course-cover.jpg",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the course was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "A brief summary of the course content and objectives. Null if no description has been set.",
            "example": "Learn advanced trading strategies from industry experts.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the course.",
            "example": "cors_xxxxxxxxxxxxx",
            "type": "string"
          },
          "language": {
            "$ref": "#/components/schemas/Languages",
            "description": "The spoken language of the video content, used to generate accurate closed captions. One of: en, es, it, pt, de, fr, pl, ru, nl, ca, tr, sv, uk, no, fi, sk, el, cs, hr, da, ro, bg."
          },
          "order": {
            "description": "The sort position of this course within its parent experience, as a decimal for flexible ordering.",
            "example": "123.45",
            "type": "string"
          },
          "require_completing_lessons_in_order": {
            "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
            "type": "boolean"
          },
          "tagline": {
            "description": "A short marketing tagline displayed beneath the course title. Null if no tagline has been set.",
            "example": "Master the fundamentals in 30 days",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnail": {
            "description": "The thumbnail image displayed on course cards and previews. Null if no thumbnail has been uploaded.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "optimized_url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "description": "The original source URL of the attachment, such as a direct link to S3. This should never be displayed on the client and should always be passed through an Imgproxy transformer.",
                "example": "https://media.whop.com/abc123/original.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "optimized_url",
              "source_url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "title": {
            "description": "The display name of the course shown to students. Null if no title has been set.",
            "example": "Introduction to Technical Analysis",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the course was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "visibility": {
            "$ref": "#/components/schemas/CourseVisibilities",
            "description": "The visibility setting that controls whether this course appears to students. One of: visible, hidden."
          }
        },
        "required": [
          "id",
          "title",
          "tagline",
          "cover_image",
          "thumbnail",
          "description",
          "language",
          "certificate_after_completion_enabled",
          "require_completing_lessons_in_order",
          "order",
          "visibility",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "CourseStudent": {
        "description": "An enrollment record for a student in a course, including progress and completion metrics.",
        "properties": {
          "completed_lessons_count": {
            "description": "The total number of lessons this student has marked as completed in the course.",
            "example": 42,
            "type": "integer"
          },
          "completion_rate": {
            "description": "The percentage of available lessons the student has completed, as a value from 0 to 100 rounded to two decimal places.",
            "example": 6.9,
            "type": "number"
          },
          "course": {
            "description": "The course this student is enrolled in.",
            "properties": {
              "experience": {
                "description": "The parent experience that this course belongs to.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the experience.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              "id": {
                "description": "The unique identifier for the course.",
                "example": "cors_xxxxxxxxxxxxx",
                "type": "string"
              },
              "title": {
                "description": "The display name of the course shown to students. Null if no title has been set.",
                "example": "Introduction to Technical Analysis",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "title",
              "experience"
            ],
            "type": "object"
          },
          "first_interaction_at": {
            "description": "The timestamp when the student first interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the course student type.",
            "type": "string"
          },
          "last_interaction_at": {
            "description": "The timestamp when the student most recently interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "total_lessons_count": {
            "description": "The total number of visible lessons available to this student in the course.",
            "example": 42,
            "type": "integer"
          },
          "user": {
            "description": "The user profile of the enrolled student.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed_lessons_count",
          "completion_rate",
          "total_lessons_count",
          "first_interaction_at",
          "last_interaction_at",
          "user",
          "course"
        ],
        "type": "object"
      },
      "CourseStudentListItem": {
        "description": "An enrollment record for a student in a course, including progress and completion metrics.",
        "properties": {
          "completed_lessons_count": {
            "description": "The total number of lessons this student has marked as completed in the course.",
            "example": 42,
            "type": "integer"
          },
          "completion_rate": {
            "description": "The percentage of available lessons the student has completed, as a value from 0 to 100 rounded to two decimal places.",
            "example": 6.9,
            "type": "number"
          },
          "first_interaction_at": {
            "description": "The timestamp when the student first interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the course student type.",
            "type": "string"
          },
          "last_interaction_at": {
            "description": "The timestamp when the student most recently interacted with this course, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "total_lessons_count": {
            "description": "The total number of visible lessons available to this student in the course.",
            "example": 42,
            "type": "integer"
          },
          "user": {
            "description": "The user profile of the enrolled student.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "completed_lessons_count",
          "completion_rate",
          "total_lessons_count",
          "first_interaction_at",
          "last_interaction_at",
          "user"
        ],
        "type": "object"
      },
      "CourseVisibilities": {
        "description": "The available visibilities for a course. Determines how / whether a course is visible to users.",
        "enum": [
          "visible",
          "hidden"
        ],
        "type": "string"
      },
      "CoursesAssessmentQuestionTypes": {
        "description": "The available types for an assessment question",
        "enum": [
          "short_answer",
          "true_false",
          "multiple_choice",
          "multiple_select"
        ],
        "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"
      },
      "CustomCtas": {
        "description": "The different types of custom CTAs that can be selected.",
        "enum": [
          "get_access",
          "join",
          "order_now",
          "shop_now",
          "call_now",
          "donate_now",
          "contact_us",
          "sign_up",
          "subscribe",
          "purchase",
          "get_offer",
          "apply_now",
          "complete_order"
        ],
        "type": "string"
      },
      "CustomFieldTypes": {
        "const": "text",
        "description": "The type of the custom field.",
        "type": "string"
      },
      "Direction": {
        "description": "The direction of the sort.",
        "enum": [
          "asc",
          "desc"
        ],
        "type": "string"
      },
      "Dispute": {
        "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
        "properties": {
          "access_activity_log": {
            "description": "A log of IP-based access activity for the customer on Whop, submitted as evidence in the dispute.",
            "example": "192.168.1.1 - 2024-01-15 12:00:00 UTC",
            "type": [
              "string",
              "null"
            ]
          },
          "amount": {
            "description": "The disputed amount in the specified currency, formatted as a decimal.",
            "example": 6.9,
            "type": "number"
          },
          "billing_address": {
            "description": "The customer's billing address from their payment details, submitted as evidence in the dispute.",
            "example": "123 Main St, New York, NY 10001",
            "type": [
              "string",
              "null"
            ]
          },
          "cancellation_policy_attachment": {
            "description": "The cancellation policy document uploaded as dispute evidence. Null if no cancellation policy has been provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "cancellation_policy_disclosure": {
            "description": "A text disclosure describing the company's cancellation policy, submitted as dispute evidence.",
            "example": "All sales are final. No refunds after 30 days.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company that the dispute was filed against.",
            "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",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the dispute was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the disputed amount."
          },
          "customer_communication_attachment": {
            "description": "Evidence of customer communication or product usage, uploaded as a dispute attachment. Null if not provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "customer_email_address": {
            "description": "The customer's email address from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_name": {
            "description": "The customer's full name from their payment details, included in the evidence packet sent to the payment processor. Editable before submission.",
            "example": "Jane Doe",
            "type": [
              "string",
              "null"
            ]
          },
          "editable": {
            "description": "Whether the dispute evidence can still be edited and submitted.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the dispute.",
            "example": "dspt_xxxxxxxxxxxxx",
            "type": "string"
          },
          "needs_response_by": {
            "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "description": "Additional freeform notes submitted by the company as part of the dispute evidence.",
            "example": "Customer used the product for 3 months before disputing.",
            "type": [
              "string",
              "null"
            ]
          },
          "payment": {
            "description": "The original payment that was disputed.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "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",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with the disputed payment. Null if the dispute is not linked to a specific product.",
            "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"
            ]
          },
          "product_description": {
            "description": "A description of the product or service provided, submitted as dispute evidence.",
            "example": "Monthly subscription to premium analytics dashboard.",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "description": "A human-readable reason for the dispute.",
            "example": "Product Not Received",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_policy_attachment": {
            "description": "The refund policy document uploaded as dispute evidence. Null if no refund policy has been provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "refund_policy_disclosure": {
            "description": "A text disclosure describing the company's refund policy, submitted as dispute evidence.",
            "example": "Refunds available within 14 days of purchase.",
            "type": [
              "string",
              "null"
            ]
          },
          "refund_refusal_explanation": {
            "description": "An explanation from the company for why a refund was refused, submitted as dispute evidence.",
            "example": "The customer exceeded the refund window by 60 days.",
            "type": [
              "string",
              "null"
            ]
          },
          "service_date": {
            "description": "The date when the product or service was delivered to the customer, submitted as dispute evidence.",
            "example": "2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatuses",
            "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
          },
          "uncategorized_attachment": {
            "description": "An additional attachment that does not fit into the standard evidence categories. Null if not provided.",
            "properties": {
              "content_type": {
                "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                "example": "image/jpeg",
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "description": "The original filename of the uploaded attachment, including its file extension.",
                "example": "document.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "filename",
              "content_type",
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "visa_rdr": {
            "description": "Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "editable",
          "created_at",
          "visa_rdr",
          "needs_response_by",
          "reason",
          "plan",
          "product",
          "company",
          "payment",
          "access_activity_log",
          "billing_address",
          "cancellation_policy_disclosure",
          "customer_email_address",
          "customer_name",
          "notes",
          "product_description",
          "refund_policy_disclosure",
          "refund_refusal_explanation",
          "service_date",
          "cancellation_policy_attachment",
          "customer_communication_attachment",
          "refund_policy_attachment",
          "uncategorized_attachment"
        ],
        "type": "object"
      },
      "DisputeAlert": {
        "description": "A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.",
        "properties": {
          "alert_type": {
            "$ref": "#/components/schemas/DisputeAlertTypes",
            "description": "The type of the dispute alert."
          },
          "amount": {
            "description": "The alerted amount in the specified currency.",
            "example": 6.9,
            "type": "number"
          },
          "charge_for_alert": {
            "description": "Whether this alert incurs a charge.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The time the dispute alert was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the alerted amount."
          },
          "dispute": {
            "description": "The dispute associated with the dispute alert.",
            "properties": {
              "amount": {
                "description": "The disputed amount in the specified currency, formatted as a decimal.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the dispute was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for the disputed amount."
              },
              "id": {
                "description": "The unique identifier for the dispute.",
                "example": "dspt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "reason": {
                "description": "A human-readable reason for the dispute.",
                "example": "Product Not Received",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/DisputeStatuses",
                "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
              }
            },
            "required": [
              "id",
              "amount",
              "currency",
              "status",
              "reason",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier of the dispute alert.",
            "example": "dspa_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with the dispute alert.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "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",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "transaction_date": {
            "description": "The date of the original transaction.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "alert_type",
          "amount",
          "currency",
          "created_at",
          "transaction_date",
          "charge_for_alert",
          "payment",
          "dispute"
        ],
        "type": "object"
      },
      "DisputeAlertListItem": {
        "description": "A dispute alert represents an early warning notification from a payment processor about a potential dispute or chargeback.",
        "properties": {
          "alert_type": {
            "$ref": "#/components/schemas/DisputeAlertTypes",
            "description": "The type of the dispute alert."
          },
          "amount": {
            "description": "The alerted amount in the specified currency.",
            "example": 6.9,
            "type": "number"
          },
          "charge_for_alert": {
            "description": "Whether this alert incurs a charge.",
            "type": "boolean"
          },
          "created_at": {
            "description": "The time the dispute alert was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the alerted amount."
          },
          "dispute": {
            "description": "The dispute associated with the dispute alert.",
            "properties": {
              "id": {
                "description": "The unique identifier for the dispute.",
                "example": "dspt_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier of the dispute alert.",
            "example": "dspa_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with the dispute alert.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "transaction_date": {
            "description": "The date of the original transaction.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "alert_type",
          "amount",
          "currency",
          "created_at",
          "transaction_date",
          "charge_for_alert",
          "payment",
          "dispute"
        ],
        "type": "object"
      },
      "DisputeAlertTypes": {
        "description": "The type of dispute alert.",
        "enum": [
          "dispute",
          "dispute_rdr",
          "fraud"
        ],
        "type": "string"
      },
      "DisputeListItem": {
        "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
        "properties": {
          "amount": {
            "description": "The disputed amount in the specified currency, formatted as a decimal.",
            "example": 6.9,
            "type": "number"
          },
          "company": {
            "description": "The company that the dispute was filed against.",
            "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",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the dispute was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the disputed amount."
          },
          "editable": {
            "description": "Whether the dispute evidence can still be edited and submitted.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the dispute.",
            "example": "dspt_xxxxxxxxxxxxx",
            "type": "string"
          },
          "needs_response_by": {
            "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment": {
            "description": "The original payment that was disputed.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "plan": {
            "description": "The plan associated with the disputed payment. Null if the dispute is not linked to a specific plan.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with the disputed payment. Null if the dispute is not linked to a specific product.",
            "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"
            ]
          },
          "reason": {
            "description": "A human-readable reason for the dispute.",
            "example": "Product Not Received",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DisputeStatuses",
            "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
          },
          "visa_rdr": {
            "description": "Whether the dispute was automatically resolved through Visa Rapid Dispute Resolution (RDR).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "editable",
          "created_at",
          "visa_rdr",
          "needs_response_by",
          "reason",
          "plan",
          "product",
          "company",
          "payment"
        ],
        "type": "object"
      },
      "DisputeStatuses": {
        "description": "The possible statuses of a dispute",
        "enum": [
          "warning_needs_response",
          "warning_under_review",
          "warning_closed",
          "needs_response",
          "under_review",
          "won",
          "lost",
          "closed",
          "other"
        ],
        "type": "string"
      },
      "DmChannel": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "created_at": {
            "description": "The time the entity was created (in milliseconds since Unix epoch)",
            "example": "123.45",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "name",
          "last_message_at"
        ],
        "type": "object"
      },
      "DmChannelListItem": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "created_at": {
            "description": "The time the entity was created (in milliseconds since Unix epoch)",
            "example": "123.45",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "name",
          "last_message_at"
        ],
        "type": "object"
      },
      "DmMember": {
        "description": "A user's membership record in a messaging channel, including notification preferences and read state.",
        "properties": {
          "channel_id": {
            "description": "The unique identifier of the messaging channel this membership belongs to.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_viewed_at": {
            "description": "The timestamp when this member last viewed the channel, as a Unix timestamp in milliseconds. Null if the member has never viewed the channel.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "notification_preference": {
            "$ref": "#/components/schemas/DmsFeedMemberNotificationPreferences",
            "description": "The notification level for this channel: all, mentions, or none."
          },
          "status": {
            "$ref": "#/components/schemas/DmsFeedMemberStatuses",
            "description": "The current state of this membership: requested, accepted, hidden, closed, or archived."
          },
          "user_id": {
            "description": "The unique identifier of the user who holds this channel membership.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "channel_id",
          "status",
          "last_viewed_at",
          "notification_preference"
        ],
        "type": "object"
      },
      "DmMemberListItem": {
        "description": "A user's membership record in a messaging channel, including notification preferences and read state.",
        "properties": {
          "channel_id": {
            "description": "The unique identifier of the messaging channel this membership belongs to.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_viewed_at": {
            "description": "The timestamp when this member last viewed the channel, as a Unix timestamp in milliseconds. Null if the member has never viewed the channel.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DmsFeedMemberStatuses",
            "description": "The current state of this membership: requested, accepted, hidden, closed, or archived."
          },
          "user_id": {
            "description": "The unique identifier of the user who holds this channel membership.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "channel_id",
          "status",
          "last_viewed_at"
        ],
        "type": "object"
      },
      "DmsFeedMemberNotificationPreferences": {
        "description": "The notification preferences for a DMs feed member",
        "enum": [
          "all",
          "mentions",
          "none"
        ],
        "type": "string"
      },
      "DmsFeedMemberStatuses": {
        "description": " The statuses of a DMs feed member",
        "enum": [
          "requested",
          "accepted",
          "hidden",
          "closed",
          "archived"
        ],
        "type": "string"
      },
      "DmsPostTypes": {
        "description": "The types of post",
        "enum": [
          "regular",
          "system",
          "automated"
        ],
        "type": "string"
      },
      "EmbedTypes": {
        "description": "The type of embed for a lesson",
        "enum": [
          "youtube",
          "loom"
        ],
        "type": "string"
      },
      "EntriesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at"
        ],
        "type": "string"
      },
      "Entry": {
        "description": "An entry represents a user's signup for a waitlisted plan.",
        "properties": {
          "created_at": {
            "description": "The datetime the entry was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_field_responses": {
            "description": "The list of responses collected from the user when submitting their waitlist entry.",
            "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",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entry.",
            "example": "entry_xxxxxxxxxxxx",
            "type": "string"
          },
          "plan": {
            "description": "The waitlisted plan that this entry is a signup for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with this entry's waitlisted plan. Null if the plan is not tied to a product.",
            "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"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus",
            "description": "The current status of the waitlist entry (e.g., drafted, pending, approved, denied)."
          },
          "user": {
            "description": "The user who submitted this waitlist entry.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "plan",
          "product",
          "status",
          "user",
          "created_at",
          "custom_field_responses"
        ],
        "type": "object"
      },
      "EntryListItem": {
        "description": "An entry represents a user's signup for a waitlisted plan.",
        "properties": {
          "created_at": {
            "description": "The datetime the entry was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entry.",
            "example": "entry_xxxxxxxxxxxx",
            "type": "string"
          },
          "plan": {
            "description": "The waitlisted plan that this entry is a signup for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product associated with this entry's waitlisted plan. Null if the plan is not tied to a product.",
            "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"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/EntryStatus",
            "description": "The current status of the waitlist entry (e.g., drafted, pending, approved, denied)."
          },
          "user": {
            "description": "The user who submitted this waitlist entry.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "plan",
          "product",
          "status",
          "user",
          "created_at"
        ],
        "type": "object"
      },
      "EntryStatus": {
        "description": "The status of an entry to a waitlist.",
        "enum": [
          "drafted",
          "pending",
          "approved",
          "denied",
          "any"
        ],
        "type": "string"
      },
      "Experience": {
        "description": "An experience is a feature or content module within a product, such as a chat, course, or custom app.",
        "properties": {
          "app": {
            "description": "The app that powers this experience, defining its interface and behavior.",
            "properties": {
              "icon": {
                "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
                "properties": {
                  "url": {
                    "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                    "example": "https://media.whop.com/abc123/optimized.jpg",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the app.",
                "example": "app_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
                "example": "Courses",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "icon"
            ],
            "type": "object"
          },
          "company": {
            "description": "The company that owns this experience.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the experience was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the experience.",
            "example": "exp_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "image": {
            "description": "The custom logo image for this experience. Null if no custom logo has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "is_public": {
            "description": "Whether this experience is publicly visible to all users, including those without a membership.",
            "type": "boolean"
          },
          "name": {
            "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
            "example": "Trading Signals Chat",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this experience within its section. Lower values appear first. Null if no position has been set.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "products": {
            "description": "The list of products this experience is attached to, which determines which customers have access. Empty if the experience is only visible to authorized company team members.",
            "items": {
              "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
              "properties": {
                "id": {
                  "description": "The unique identifier for the product.",
                  "example": "prod_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "route": {
                  "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                  "example": "pickaxe-analytics",
                  "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",
                "route",
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "is_public",
          "created_at",
          "app",
          "image",
          "company",
          "products"
        ],
        "type": "object"
      },
      "ExperienceAccessLevels": {
        "description": "The different access levels for experiences (PUBLIC IS NEVER USED ANYMORE).",
        "enum": [
          "public",
          "private"
        ],
        "type": "string"
      },
      "ExperienceListItem": {
        "description": "An experience is a feature or content module within a product, such as a chat, course, or custom app.",
        "properties": {
          "app": {
            "description": "The app that powers this experience, defining its interface and behavior.",
            "properties": {
              "icon": {
                "description": "The icon image for this app, displayed on the app store, product pages, checkout, and as the default icon for experiences using this app.",
                "properties": {
                  "url": {
                    "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                    "example": "https://media.whop.com/abc123/optimized.jpg",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "url"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the app.",
                "example": "app_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this app shown on the app store and in experience navigation. Maximum 30 characters.",
                "example": "Courses",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "icon"
            ],
            "type": "object"
          },
          "company": {
            "description": "The company that owns this experience.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the experience was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the experience.",
            "example": "exp_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "image": {
            "description": "The custom logo image for this experience. Null if no custom logo has been uploaded.",
            "properties": {
              "url": {
                "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                "example": "https://media.whop.com/abc123/optimized.jpg",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "url"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "is_public": {
            "description": "Whether this experience is publicly visible to all users, including those without a membership.",
            "type": "boolean"
          },
          "name": {
            "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
            "example": "Trading Signals Chat",
            "type": "string"
          },
          "order": {
            "description": "The sort position of this experience within its section. Lower values appear first. Null if no position has been set.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "is_public",
          "created_at",
          "app",
          "image",
          "company"
        ],
        "type": "object"
      },
      "FeeMarkup": {
        "description": "A fee markup configuration that defines additional charges applied to transactions for a platform's connected accounts.",
        "properties": {
          "created_at": {
            "description": "The datetime the fee markup was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "fee_type": {
            "$ref": "#/components/schemas/FeeMarkupTypes",
            "description": "The category of fee this markup applies to."
          },
          "fixed_fee_usd": {
            "description": "A flat fee charged per transaction, in USD. Ranges from 0 to 50. Null if no fixed fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the fee markup.",
            "type": "string"
          },
          "notes": {
            "description": "Internal notes about this fee markup, visible only to administrators. Null if no notes have been added.",
            "example": "Approved by finance team on 2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "percentage_fee": {
            "description": "A percentage-based fee charged per transaction. Ranges from 0 to 25. Null if no percentage fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the fee markup was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "fee_type",
          "percentage_fee",
          "fixed_fee_usd",
          "notes",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "FeeMarkupListItem": {
        "description": "A fee markup configuration that defines additional charges applied to transactions for a platform's connected accounts.",
        "properties": {
          "created_at": {
            "description": "The datetime the fee markup was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "fee_type": {
            "$ref": "#/components/schemas/FeeMarkupTypes",
            "description": "The category of fee this markup applies to."
          },
          "fixed_fee_usd": {
            "description": "A flat fee charged per transaction, in USD. Ranges from 0 to 50. Null if no fixed fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the fee markup.",
            "type": "string"
          },
          "notes": {
            "description": "Internal notes about this fee markup, visible only to administrators. Null if no notes have been added.",
            "example": "Approved by finance team on 2024-01-15",
            "type": [
              "string",
              "null"
            ]
          },
          "percentage_fee": {
            "description": "A percentage-based fee charged per transaction. Ranges from 0 to 25. Null if no percentage fee is configured.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the fee markup was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "fee_type",
          "percentage_fee",
          "fixed_fee_usd",
          "notes",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "FeeMarkupTypes": {
        "description": "The types of fee markups that can be configured",
        "enum": [
          "crypto_withdrawal_markup",
          "rtp_withdrawal_markup",
          "next_day_bank_withdrawal_markup",
          "bank_wire_withdrawal_markup",
          "digital_wallet_withdrawal_markup"
        ],
        "type": "string"
      },
      "File": {
        "description": "A file that has been uploaded or is pending upload.",
        "properties": {
          "content_type": {
            "description": "The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg).",
            "example": "image/jpeg",
            "type": [
              "string",
              "null"
            ]
          },
          "filename": {
            "description": "The original filename of the uploaded file, including its file extension.",
            "example": "document.pdf",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the file.",
            "example": "file_xxxxxxxxxxxxx",
            "type": "string"
          },
          "size": {
            "description": "The file size in bytes. Null if the file has not finished uploading.",
            "example": "123.45",
            "type": [
              "string",
              "null"
            ]
          },
          "upload_status": {
            "$ref": "#/components/schemas/UploadStatuses",
            "description": "The current upload status of the file (e.g., pending, ready)."
          },
          "url": {
            "description": "The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading.",
            "type": [
              "string",
              "null"
            ]
          },
          "visibility": {
            "$ref": "#/components/schemas/FileVisibility",
            "description": "Whether the file is publicly accessible or requires authentication."
          }
        },
        "required": [
          "id",
          "upload_status",
          "filename",
          "content_type",
          "size",
          "url",
          "visibility"
        ],
        "type": "object"
      },
      "FileVisibility": {
        "description": "Controls whether an uploaded file is publicly accessible or requires authentication to access.",
        "enum": [
          "public",
          "private"
        ],
        "type": "string"
      },
      "Forum": {
        "description": "A discussion forum where members can create posts, comment, and react, belonging to an experience.",
        "properties": {
          "email_notification_preference": {
            "$ref": "#/components/schemas/ForumEmailNotificationPreferences",
            "description": "The email notification setting that controls which posts trigger email alerts. One of: all_admin_posts, only_weekly_summary, none."
          },
          "experience": {
            "description": "The parent experience that this forum belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "who_can_comment": {
            "$ref": "#/components/schemas/ForumWhoCanCommentTypes",
            "description": "The permission level controlling who can comment on posts. One of: everyone, admins."
          },
          "who_can_post": {
            "$ref": "#/components/schemas/ForumWhoCanPostTypes",
            "description": "The permission level controlling who can create new posts. One of: everyone, admins."
          }
        },
        "required": [
          "id",
          "experience",
          "who_can_post",
          "who_can_comment",
          "email_notification_preference"
        ],
        "type": "object"
      },
      "ForumEmailNotificationPreferences": {
        "description": "Email notification preference option for a forum feed",
        "enum": [
          "all_admin_posts",
          "only_weekly_summary",
          "none"
        ],
        "type": "string"
      },
      "ForumListItem": {
        "description": "A discussion forum where members can create posts, comment, and react, belonging to an experience.",
        "properties": {
          "email_notification_preference": {
            "$ref": "#/components/schemas/ForumEmailNotificationPreferences",
            "description": "The email notification setting that controls which posts trigger email alerts. One of: all_admin_posts, only_weekly_summary, none."
          },
          "experience": {
            "description": "The parent experience that this forum belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the experience.",
                "example": "exp_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "The display name of this experience shown to users in the product navigation. Maximum 255 characters.",
                "example": "Trading Signals Chat",
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ],
            "type": "object"
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "who_can_comment": {
            "$ref": "#/components/schemas/ForumWhoCanCommentTypes",
            "description": "The permission level controlling who can comment on posts. One of: everyone, admins."
          },
          "who_can_post": {
            "$ref": "#/components/schemas/ForumWhoCanPostTypes",
            "description": "The permission level controlling who can create new posts. One of: everyone, admins."
          }
        },
        "required": [
          "id",
          "experience",
          "who_can_post",
          "who_can_comment",
          "email_notification_preference"
        ],
        "type": "object"
      },
      "ForumPost": {
        "description": "A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.",
        "properties": {
          "attachments": {
            "description": "All file attachments on this post, such as images, documents, and videos.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "comment_count": {
            "description": "The total number of direct comments on this post.",
            "example": 42,
            "type": "integer"
          },
          "content": {
            "description": "The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.",
            "example": "## My Strategy\n\nHere are the key steps...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The time this post was created, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether this post has been edited after its initial creation.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this post is pinned to the top of the forum feed.",
            "type": "boolean"
          },
          "is_poster_admin": {
            "description": "Whether the author of this post is an admin of the company that owns the forum.",
            "type": "boolean"
          },
          "like_count": {
            "description": "The total number of like reactions this post has received.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "parent_id": {
            "description": "The unique identifier of the parent post. Null if this is a top-level post.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The headline of the forum post. Null if the post has no title.",
            "example": "Weekly Market Analysis - February 2025",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The time this post was last updated, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this forum post.",
            "properties": {
              "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"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The total number of times this post has been viewed by users.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "created_at",
          "updated_at",
          "is_edited",
          "is_poster_admin",
          "is_pinned",
          "parent_id",
          "user",
          "attachments",
          "view_count",
          "like_count",
          "comment_count"
        ],
        "type": "object"
      },
      "ForumPostListItem": {
        "description": "A post or comment in a forum feed, supporting rich text, attachments, polls, and reactions.",
        "properties": {
          "attachments": {
            "description": "All file attachments on this post, such as images, documents, and videos.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "comment_count": {
            "description": "The total number of direct comments on this post.",
            "example": 42,
            "type": "integer"
          },
          "content": {
            "description": "The body of the forum post in Markdown format. Null if the post is paywalled and the current user does not have access.",
            "example": "## My Strategy\n\nHere are the key steps...",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The time this post was created, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether this post has been edited after its initial creation.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this post is pinned to the top of the forum feed.",
            "type": "boolean"
          },
          "is_poster_admin": {
            "description": "Whether the author of this post is an admin of the company that owns the forum.",
            "type": "boolean"
          },
          "like_count": {
            "description": "The total number of like reactions this post has received.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "parent_id": {
            "description": "The unique identifier of the parent post. Null if this is a top-level post.",
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "description": "The headline of the forum post. Null if the post has no title.",
            "example": "Weekly Market Analysis - February 2025",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The time this post was last updated, as a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this forum post.",
            "properties": {
              "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"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The total number of times this post has been viewed by users.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "content",
          "created_at",
          "updated_at",
          "is_edited",
          "is_poster_admin",
          "is_pinned",
          "parent_id",
          "user",
          "attachments",
          "view_count",
          "like_count",
          "comment_count"
        ],
        "type": "object"
      },
      "ForumPostVisibilityTypes": {
        "description": "The visibility types for forum posts",
        "enum": [
          "members_only",
          "globally_visible"
        ],
        "type": "string"
      },
      "ForumWhoCanCommentTypes": {
        "description": "Who can comment on a forum feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "ForumWhoCanPostTypes": {
        "description": "Who can post on a forum feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "FriendlyReceiptStatus": {
        "description": "The friendly status of a payment. This is a derived status that provides a human-readable summary of the payment state, combining the underlying status and substatus fields.",
        "enum": [
          "succeeded",
          "pending",
          "failed",
          "past_due",
          "canceled",
          "price_too_low",
          "uncollectible",
          "refunded",
          "auto_refunded",
          "partially_refunded",
          "dispute_warning",
          "dispute_needs_response",
          "dispute_warning_needs_response",
          "resolution_needs_response",
          "dispute_under_review",
          "dispute_warning_under_review",
          "resolution_under_review",
          "dispute_won",
          "dispute_warning_closed",
          "resolution_won",
          "dispute_lost",
          "dispute_closed",
          "resolution_lost",
          "drafted",
          "incomplete",
          "unresolved",
          "open_dispute",
          "open_resolution"
        ],
        "type": "string"
      },
      "GlobalAffiliateStatuses": {
        "description": "The different statuses of the global affiliate program for a product.",
        "enum": [
          "enabled",
          "disabled"
        ],
        "type": "string"
      },
      "Granularities": {
        "description": "Bucket size for external ad stat rows.",
        "enum": [
          "hourly",
          "daily",
          "weekly",
          "monthly"
        ],
        "type": "string"
      },
      "IdentityProfile": {
        "description": "A consolidated identity or business profile synced from verification provider data.",
        "properties": {
          "business_address": {
            "description": "Registered business address reported by the identity provider. Present on `business` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "Business entity name. Present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "business_structure": {
            "description": "Reported legal structure of a business profile (e.g. `corp`, `llc`). Provider-specific values; present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 country code reported by the identity provider, such as `US` or `GB`. For individuals this is the country of citizenship or residence; for businesses, the country of incorporation.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When the identity profile was first created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "date_of_birth": {
            "description": "ISO date (`YYYY-MM-DD`) reported by the identity provider. Present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "description": "Individual's first name.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The tag of the identity profile (idpf_xxx).",
            "example": "idpf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_name": {
            "description": "Individual's last name.",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_companies": {
            "description": "The companies this identity profile is currently linked to. Only populated for direct Whop user sessions; always empty when authenticated via API key, app, or OAuth scope (a single identity can be linked to companies the calling platform is not entitled to see).",
            "items": {
              "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
              "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"
            },
            "type": "array"
          },
          "personal_address": {
            "description": "Residential address reported by the identity provider. Present on `individual` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "Phone number reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "profile_type": {
            "description": "Whether this is an 'individual' or 'business' profile.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IdentityProfileStatuses",
            "description": "Derived verification status across all linked verifications."
          },
          "updated_at": {
            "description": "When the identity profile was last synced from a verification.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verifications": {
            "description": "All verification attempts attached to this identity profile, ordered most-recent first.",
            "items": {
              "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
              "properties": {
                "created_at": {
                  "description": "When the verification record was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The numeric id of the verification record.",
                  "example": "verf_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "last_error_code": {
                  "description": "The most recent error code returned during verification. Null if no error has occurred.",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VerificationErrorCodes"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error_reason": {
                  "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                  "example": "Document image was too blurry to read.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "session_url": {
                  "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                  "example": "https://verify.stripe.com/session/abc123",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/VerificationStatuses",
                  "description": "The current status of this verification session."
                }
              },
              "required": [
                "id",
                "status",
                "session_url",
                "last_error_code",
                "last_error_reason",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "profile_type",
          "status",
          "first_name",
          "last_name",
          "date_of_birth",
          "email",
          "phone",
          "personal_address",
          "business_name",
          "business_structure",
          "business_address",
          "country",
          "linked_companies",
          "verifications",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "IdentityProfileKinds": {
        "description": "The kind of identity profile (individual vs business).",
        "enum": [
          "individual",
          "business"
        ],
        "type": "string"
      },
      "IdentityProfileListItem": {
        "description": "A consolidated identity or business profile synced from verification provider data.",
        "properties": {
          "business_address": {
            "description": "Registered business address reported by the identity provider. Present on `business` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "Business entity name. Present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "business_structure": {
            "description": "Reported legal structure of a business profile (e.g. `corp`, `llc`). Provider-specific values; present on `business` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "description": "ISO 3166-1 alpha-2 country code reported by the identity provider, such as `US` or `GB`. For individuals this is the country of citizenship or residence; for businesses, the country of incorporation.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "When the identity profile was first created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "date_of_birth": {
            "description": "ISO date (`YYYY-MM-DD`) reported by the identity provider. Present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "description": "Email address reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "description": "Individual's first name.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The tag of the identity profile (idpf_xxx).",
            "example": "idpf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_name": {
            "description": "Individual's last name.",
            "type": [
              "string",
              "null"
            ]
          },
          "linked_companies": {
            "description": "The companies this identity profile is currently linked to. Only populated for direct Whop user sessions; always empty when authenticated via API key, app, or OAuth scope (a single identity can be linked to companies the calling platform is not entitled to see).",
            "items": {
              "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
              "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"
            },
            "type": "array"
          },
          "personal_address": {
            "description": "Residential address reported by the identity provider. Present on `individual` profiles.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "Phone number reported by the identity provider. Typically present on `individual` profiles.",
            "type": [
              "string",
              "null"
            ]
          },
          "profile_type": {
            "description": "Whether this is an 'individual' or 'business' profile.",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/IdentityProfileStatuses",
            "description": "Derived verification status across all linked verifications."
          },
          "updated_at": {
            "description": "When the identity profile was last synced from a verification.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verifications": {
            "description": "All verification attempts attached to this identity profile, ordered most-recent first.",
            "items": {
              "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
              "properties": {
                "created_at": {
                  "description": "When the verification record was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The numeric id of the verification record.",
                  "example": "verf_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "last_error_code": {
                  "description": "The most recent error code returned during verification. Null if no error has occurred.",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VerificationErrorCodes"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error_reason": {
                  "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                  "example": "Document image was too blurry to read.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "session_url": {
                  "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                  "example": "https://verify.stripe.com/session/abc123",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/VerificationStatuses",
                  "description": "The current status of this verification session."
                }
              },
              "required": [
                "id",
                "status",
                "session_url",
                "last_error_code",
                "last_error_reason",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "profile_type",
          "status",
          "first_name",
          "last_name",
          "date_of_birth",
          "email",
          "phone",
          "personal_address",
          "business_name",
          "business_structure",
          "business_address",
          "country",
          "linked_companies",
          "verifications",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "IdentityProfileStatuses": {
        "description": "Derived verification status for an identity profile.",
        "enum": [
          "not_started",
          "pending",
          "approved",
          "rejected"
        ],
        "type": "string"
      },
      "Invoice": {
        "description": "An invoice represents an itemized bill sent by a company to a customer for a specific product and plan, tracking the amount owed, due date, and payment status.",
        "properties": {
          "created_at": {
            "description": "The datetime the invoice was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "current_plan": {
            "description": "The plan that this invoice charges for.",
            "properties": {
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "formatted_price": {
                "description": "The formatted price (including currency) for the plan.",
                "example": "$10.00",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "formatted_price",
              "currency"
            ],
            "type": "object"
          },
          "due_date": {
            "description": "The deadline by which payment is expected. Null if the invoice is collected automatically.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "email_address": {
            "description": "The email address of the customer this invoice is addressed to. Null if no email is on file.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_invoice_token": {
            "description": "A signed token that allows fetching invoice data publicly without authentication.",
            "example": "eyJhbGciOiJIUzI1NiJ9...",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the invoice.",
            "example": "inv_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "line_items": {
            "description": "Optional line items that break down the invoice total into individual charges.",
            "items": {
              "description": "A line item on an invoice, representing a single charge with a label, quantity, and unit price.",
              "properties": {
                "label": {
                  "description": "The label or description for this line item.",
                  "example": "Platform subscription",
                  "type": "string"
                },
                "position": {
                  "description": "The display order of this line item within the invoice.",
                  "example": 42,
                  "type": "integer"
                },
                "quantity": {
                  "description": "The quantity of this line item.",
                  "example": 6.9,
                  "type": "number"
                },
                "total": {
                  "description": "The computed total for this line item (quantity * unit_price).",
                  "example": 6.9,
                  "type": "number"
                },
                "unit_price": {
                  "description": "The unit price for this line item.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "label",
                "quantity",
                "unit_price",
                "total",
                "position"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "number": {
            "description": "The sequential invoice number for display purposes.",
            "example": "#0001",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatuses",
            "description": "The current payment status of the invoice, such as draft, open, paid, or void."
          },
          "user": {
            "description": "The user this invoice is addressed to. Null if the user account has been removed.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "number",
          "due_date",
          "email_address",
          "fetch_invoice_token",
          "current_plan",
          "line_items",
          "user"
        ],
        "type": "object"
      },
      "InvoiceCollectionMethods": {
        "description": "The method of collection for an invoice.",
        "enum": [
          "send_invoice",
          "charge_automatically"
        ],
        "type": "string"
      },
      "InvoiceListItem": {
        "description": "An invoice represents an itemized bill sent by a company to a customer for a specific product and plan, tracking the amount owed, due date, and payment status.",
        "properties": {
          "created_at": {
            "description": "The datetime the invoice was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "current_plan": {
            "description": "The plan that this invoice charges for.",
            "properties": {
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary amounts on the plan are denominated in this currency."
              },
              "formatted_price": {
                "description": "The formatted price (including currency) for the plan.",
                "example": "$10.00",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "formatted_price",
              "currency"
            ],
            "type": "object"
          },
          "due_date": {
            "description": "The deadline by which payment is expected. Null if the invoice is collected automatically.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "email_address": {
            "description": "The email address of the customer this invoice is addressed to. Null if no email is on file.",
            "example": "customer@example.com",
            "type": [
              "string",
              "null"
            ]
          },
          "fetch_invoice_token": {
            "description": "A signed token that allows fetching invoice data publicly without authentication.",
            "example": "eyJhbGciOiJIUzI1NiJ9...",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the invoice.",
            "example": "inv_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "line_items": {
            "description": "Optional line items that break down the invoice total into individual charges.",
            "items": {
              "description": "A line item on an invoice, representing a single charge with a label, quantity, and unit price.",
              "properties": {
                "label": {
                  "description": "The label or description for this line item.",
                  "example": "Platform subscription",
                  "type": "string"
                },
                "position": {
                  "description": "The display order of this line item within the invoice.",
                  "example": 42,
                  "type": "integer"
                },
                "quantity": {
                  "description": "The quantity of this line item.",
                  "example": 6.9,
                  "type": "number"
                },
                "total": {
                  "description": "The computed total for this line item (quantity * unit_price).",
                  "example": 6.9,
                  "type": "number"
                },
                "unit_price": {
                  "description": "The unit price for this line item.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "label",
                "quantity",
                "unit_price",
                "total",
                "position"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "number": {
            "description": "The sequential invoice number for display purposes.",
            "example": "#0001",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatuses",
            "description": "The current payment status of the invoice, such as draft, open, paid, or void."
          },
          "user": {
            "description": "The user this invoice is addressed to. Null if the user account has been removed.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "number",
          "due_date",
          "email_address",
          "fetch_invoice_token",
          "current_plan",
          "line_items",
          "user"
        ],
        "type": "object"
      },
      "InvoiceStatuses": {
        "description": "The different statuses an invoice can be in",
        "enum": [
          "draft",
          "open",
          "paid",
          "past_due",
          "uncollectible",
          "void"
        ],
        "type": "string"
      },
      "InvoicesSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "due_date"
        ],
        "type": "string"
      },
      "Languages": {
        "description": "The available languages for a course",
        "enum": [
          "en",
          "es",
          "it",
          "pt",
          "de",
          "fr",
          "pl",
          "ru",
          "nl",
          "ca",
          "tr",
          "sv",
          "uk",
          "no",
          "fi",
          "sk",
          "el",
          "cs",
          "hr",
          "da",
          "ro",
          "bg"
        ],
        "type": "string"
      },
      "Lead": {
        "description": "A prospective customer who has expressed interest in a company or product but has not yet purchased.",
        "properties": {
          "created_at": {
            "description": "The datetime the lead was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lead.",
            "example": "lead_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member record if this lead has converted into a paying customer. Null if the lead has not converted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this lead. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product the lead expressed interest in. Null if the lead is not associated with a specific product.",
            "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"
            ]
          },
          "referrer": {
            "description": "The URL of the page that referred this lead to the company. Null if no referrer was captured.",
            "example": "https://twitter.com/whabormarket",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the lead was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account associated with this lead.",
            "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",
              "email",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "referrer",
          "metadata",
          "user",
          "product",
          "member"
        ],
        "type": "object"
      },
      "LeadListItem": {
        "description": "A prospective customer who has expressed interest in a company or product but has not yet purchased.",
        "properties": {
          "created_at": {
            "description": "The datetime the lead was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the lead.",
            "example": "lead_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member record if this lead has converted into a paying customer. Null if the lead has not converted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this lead. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product the lead expressed interest in. Null if the lead is not associated with a specific product.",
            "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"
            ]
          },
          "referrer": {
            "description": "The URL of the page that referred this lead to the company. Null if no referrer was captured.",
            "example": "https://twitter.com/whabormarket",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the lead was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account associated with this lead.",
            "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",
              "email",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "referrer",
          "metadata",
          "user",
          "product",
          "member"
        ],
        "type": "object"
      },
      "LedgerAccount": {
        "description": "A ledger account represents a financial account on Whop that can hold many balances.",
        "properties": {
          "balances": {
            "description": "The balances associated with the account.",
            "items": {
              "description": "A cached balance for a LedgerAccount in respect to a currency.",
              "properties": {
                "balance": {
                  "description": "The amount of the balance.",
                  "example": 6.9,
                  "type": "number"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The currency of the balance."
                },
                "pending_balance": {
                  "description": "The amount of the balance that is pending.",
                  "example": 6.9,
                  "type": "number"
                },
                "reserve_balance": {
                  "description": "The amount of the balance that is reserved.",
                  "example": 6.9,
                  "type": "number"
                }
              },
              "required": [
                "balance",
                "currency",
                "pending_balance",
                "reserve_balance"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the ledger account.",
            "example": "ldgr_xxxxxxxxxxxxx",
            "type": "string"
          },
          "ledger_type": {
            "$ref": "#/components/schemas/LedgerTypes",
            "description": "The type of ledger account."
          },
          "owner": {
            "description": "The owner of the ledger account.",
            "discriminator": {
              "propertyName": "typename"
            },
            "oneOf": [
              {
                "description": "A user account on Whop. Contains profile information, identity details, and social connections.",
                "properties": {
                  "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"
                    ]
                  },
                  "typename": {
                    "const": "User",
                    "description": "The typename of this object",
                    "type": "string"
                  },
                  "username": {
                    "description": "The user's unique username shown on their public profile.",
                    "example": "johndoe42",
                    "type": "string"
                  }
                },
                "required": [
                  "typename",
                  "id",
                  "name",
                  "username"
                ],
                "title": "User",
                "type": [
                  "object",
                  "null"
                ]
              },
              {
                "description": "A company is a seller on Whop. Companies own products, manage members, and receive payouts.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "route": {
                    "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                    "example": "pickaxe",
                    "type": "string"
                  },
                  "title": {
                    "description": "The display name of the company shown to customers.",
                    "example": "Pickaxe",
                    "type": "string"
                  },
                  "typename": {
                    "const": "Company",
                    "description": "The typename of this object",
                    "type": "string"
                  }
                },
                "required": [
                  "typename",
                  "id",
                  "route",
                  "title"
                ],
                "title": "Company",
                "type": [
                  "object",
                  "null"
                ]
              }
            ],
            "type": "object"
          },
          "payments_approval_status": {
            "description": "The status of payments approval for the ledger account.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentsApprovalStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "payout_account_details": {
            "description": "The payout account associated with the LedgerAccount, if any.",
            "properties": {
              "address": {
                "description": "The physical address associated with this payout account",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "line1",
                  "line2",
                  "city",
                  "postal_code",
                  "state",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "business_name": {
                "description": "The company's legal name",
                "type": [
                  "string",
                  "null"
                ]
              },
              "business_representative": {
                "description": "The business representative for this payout account",
                "properties": {
                  "date_of_birth": {
                    "description": "The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "first_name": {
                    "description": "The first name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last_name": {
                    "description": "The last name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "middle_name": {
                    "description": "The middle name of the business representative.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "date_of_birth",
                  "first_name",
                  "middle_name",
                  "last_name"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "email": {
                "description": "The email address of the representative",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payout account.",
                "example": "poact_xxxxxxxxxxxx",
                "type": "string"
              },
              "latest_verification": {
                "description": "The latest verification for the connected account.",
                "properties": {
                  "id": {
                    "description": "The numeric id of the verification record.",
                    "example": "verf_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "last_error_code": {
                    "description": "The most recent error code returned during verification. Null if no error has occurred.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/VerificationErrorCodes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error_reason": {
                    "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                    "example": "Document image was too blurry to read.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "$ref": "#/components/schemas/VerificationStatuses",
                    "description": "The current status of this verification session."
                  }
                },
                "required": [
                  "id",
                  "status",
                  "last_error_code",
                  "last_error_reason"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "phone": {
                "description": "The business representative's phone",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "description": "The granular calculated status of the payout account reflecting its current KYC and withdrawal readiness state.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "status",
              "business_name",
              "phone",
              "email",
              "business_representative",
              "address",
              "latest_verification"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "transfer_fee": {
            "description": "The fee for transfers, if applicable.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "treasury_balance": {
            "description": "The balance cache associated with the account by currency.",
            "properties": {
              "balance": {
                "description": "The amount of the balance.",
                "example": 6.9,
                "type": "number"
              },
              "balance_usd": {
                "description": "The balance converted to USD.",
                "example": 6.9,
                "type": "number"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the balance."
              },
              "pending_balance": {
                "description": "The amount of the balance that is pending.",
                "example": 6.9,
                "type": "number"
              },
              "reserve_balance": {
                "description": "The amount of the balance that is reserved.",
                "example": 6.9,
                "type": "number"
              },
              "total_withdrawable_balance": {
                "description": "The amount of the balance that is withdrawable.",
                "example": 6.9,
                "type": "number"
              }
            },
            "required": [
              "balance",
              "balance_usd",
              "currency",
              "pending_balance",
              "reserve_balance",
              "total_withdrawable_balance"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "balances",
          "treasury_balance",
          "transfer_fee",
          "payout_account_details",
          "payments_approval_status",
          "ledger_type",
          "owner"
        ],
        "type": "object"
      },
      "LedgerTypes": {
        "description": "The types of ledgers that can be created.",
        "enum": [
          "primary",
          "pool"
        ],
        "type": "string"
      },
      "LessonTypes": {
        "description": "The available types for a lesson",
        "enum": [
          "text",
          "video",
          "pdf",
          "multi",
          "quiz",
          "knowledge_check"
        ],
        "type": "string"
      },
      "LessonVisibilities": {
        "description": "The available visibilities for a lesson. Determines how / whether a lesson is visible to users.",
        "enum": [
          "visible",
          "hidden"
        ],
        "type": "string"
      },
      "Member": {
        "description": "A member represents a user's relationship with a company on Whop, including their access level, status, and spending history.",
        "properties": {
          "access_level": {
            "$ref": "#/components/schemas/AccessLevel",
            "description": "The access level of the product member. If its admin, the member is an authorized user of the company. If its customer, the member has a valid membership to any product on the company. If its no_access, the member does not have access to the product."
          },
          "company": {
            "description": "The company for the member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "company_token_balance": {
            "description": "The member's token balance for this company. Computed live from the ledger, not from a cache.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the company member was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the company member.",
            "type": "string"
          },
          "joined_at": {
            "description": "When the member joined the company",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "most_recent_action": {
            "description": "The most recent action the member has taken.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              {
                "type": "null"
              }
            ]
          },
          "most_recent_action_at": {
            "description": "The time for the most recent action, if applicable.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "The phone number for the member, if available.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MemberStatuses",
            "description": "The status of the member"
          },
          "updated_at": {
            "description": "The datetime the company member was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total_spent": {
            "description": "How much money this customer has spent on the company's products and plans",
            "example": 6.9,
            "type": "number"
          },
          "user": {
            "description": "The user for this member, if any.",
            "properties": {
              "email": {
                "description": "The digital mailing address of the user.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the company member user.",
                "type": "string"
              },
              "name": {
                "description": "The user's full name.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The whop username.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "joined_at",
          "access_level",
          "status",
          "most_recent_action",
          "most_recent_action_at",
          "user",
          "phone",
          "usd_total_spent",
          "company_token_balance",
          "company"
        ],
        "type": "object"
      },
      "MemberListItem": {
        "description": "A member represents a user's relationship with a company on Whop, including their access level, status, and spending history.",
        "properties": {
          "access_level": {
            "$ref": "#/components/schemas/AccessLevel",
            "description": "The access level of the product member. If its admin, the member is an authorized user of the company. If its customer, the member has a valid membership to any product on the company. If its no_access, the member does not have access to the product."
          },
          "company_token_balance": {
            "description": "The member's token balance for this company. Computed live from the ledger, not from a cache.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the company member was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the company member.",
            "type": "string"
          },
          "joined_at": {
            "description": "When the member joined the company",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "most_recent_action": {
            "description": "The most recent action the member has taken.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              {
                "type": "null"
              }
            ]
          },
          "most_recent_action_at": {
            "description": "The time for the most recent action, if applicable.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "description": "The phone number for the member, if available.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/MemberStatuses",
            "description": "The status of the member"
          },
          "updated_at": {
            "description": "The datetime the company member was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total_spent": {
            "description": "How much money this customer has spent on the company's products and plans",
            "example": 6.9,
            "type": "number"
          },
          "user": {
            "description": "The user for this member, if any.",
            "properties": {
              "email": {
                "description": "The digital mailing address of the user.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the company member user.",
                "type": "string"
              },
              "name": {
                "description": "The user's full name.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "username": {
                "description": "The whop username.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "joined_at",
          "access_level",
          "status",
          "most_recent_action",
          "most_recent_action_at",
          "user",
          "phone",
          "usd_total_spent",
          "company_token_balance"
        ],
        "type": "object"
      },
      "MemberMostRecentActions": {
        "description": "The different most recent actions a member can have.",
        "enum": [
          "canceling",
          "churned",
          "finished_split_pay",
          "paused",
          "paid_subscriber",
          "paid_once",
          "expiring",
          "joined",
          "drafted",
          "left",
          "trialing",
          "pending_entry",
          "renewing",
          "past_due"
        ],
        "type": "string"
      },
      "MemberStatuses": {
        "description": "The different statuses a Member can have.",
        "enum": [
          "drafted",
          "joined",
          "left"
        ],
        "type": "string"
      },
      "MembersSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "usd_total_spent",
          "created_at",
          "joined_at",
          "most_recent_action"
        ],
        "type": "string"
      },
      "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"
      },
      "MembershipCancellationModes": {
        "description": "The mode of cancellation for a membership",
        "enum": [
          "at_period_end",
          "immediate"
        ],
        "type": "string"
      },
      "MembershipListItem": {
        "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"
              }
            ]
          },
          "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"
        ],
        "type": "object"
      },
      "MembershipStatus": {
        "description": "The status of a membership",
        "enum": [
          "trialing",
          "active",
          "past_due",
          "completed",
          "canceled",
          "expired",
          "unresolved",
          "drafted",
          "canceling"
        ],
        "type": "string"
      },
      "MembershipsSortableColumns": {
        "description": "Which columns can be used to sort.",
        "enum": [
          "id",
          "created_at",
          "status",
          "canceled_at",
          "date_joined",
          "total_spend"
        ],
        "type": "string"
      },
      "Message": {
        "description": "A message sent within an experience chat, direct message, or group chat.",
        "properties": {
          "content": {
            "description": "The message content formatted as Markdown. Null if the message has no text content.",
            "example": "Hey, are you available for a **quick call**?",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The timestamp when this message was originally created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether the message content has been edited after it was originally sent.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this message is pinned to the top of the channel for easy access.",
            "type": "boolean"
          },
          "mentions": {
            "description": "A list of user IDs that are explicitly mentioned in this message.",
            "items": {
              "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
              "type": "string"
            },
            "type": "array"
          },
          "mentions_everyone": {
            "description": "Whether the message includes an @everyone mention that notifies all channel members.",
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/DmsPostTypes",
            "description": "The classification of this message: regular, system, or automated."
          },
          "poll": {
            "description": "A poll attached to this message. Null if the message does not contain a poll.",
            "properties": {
              "options": {
                "description": "The options for the poll",
                "items": {
                  "description": "Represents a single poll option",
                  "properties": {
                    "id": {
                      "description": "The unique identifier for the poll option.",
                      "type": "string"
                    },
                    "text": {
                      "description": "The text of the poll option",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "text"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "options"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "poll_votes": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "option_id": {
                  "description": "The reaction that was used",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "option_id",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "reaction_counts": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "emoji": {
                  "description": "The emoji that was used in shortcode format (:heart:)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "emoji",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "replying_to_message_id": {
            "description": "The unique identifier of the message this post is replying to. Null if this is not a reply.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The timestamp when this message was last modified.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this message.",
            "properties": {
              "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"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The number of unique views this message has received. Null if view tracking is not enabled for this channel.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "content",
          "created_at",
          "updated_at",
          "poll",
          "replying_to_message_id",
          "is_edited",
          "is_pinned",
          "message_type",
          "mentions",
          "mentions_everyone",
          "user",
          "view_count",
          "reaction_counts",
          "poll_votes"
        ],
        "type": "object"
      },
      "MessageChannelOrder": {
        "description": "Sort options for message channels",
        "enum": [
          "created_at",
          "last_post_sent_at"
        ],
        "type": "string"
      },
      "MessageListItem": {
        "description": "A message sent within an experience chat, direct message, or group chat.",
        "properties": {
          "content": {
            "description": "The message content formatted as Markdown. Null if the message has no text content.",
            "example": "Hey, are you available for a **quick call**?",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "description": "The timestamp when this message was originally created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
            "type": "string"
          },
          "is_edited": {
            "description": "Whether the message content has been edited after it was originally sent.",
            "type": "boolean"
          },
          "is_pinned": {
            "description": "Whether this message is pinned to the top of the channel for easy access.",
            "type": "boolean"
          },
          "mentions": {
            "description": "A list of user IDs that are explicitly mentioned in this message.",
            "items": {
              "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
              "type": "string"
            },
            "type": "array"
          },
          "mentions_everyone": {
            "description": "Whether the message includes an @everyone mention that notifies all channel members.",
            "type": "boolean"
          },
          "message_type": {
            "$ref": "#/components/schemas/DmsPostTypes",
            "description": "The classification of this message: regular, system, or automated."
          },
          "poll": {
            "description": "A poll attached to this message. Null if the message does not contain a poll.",
            "properties": {
              "options": {
                "description": "The options for the poll",
                "items": {
                  "description": "Represents a single poll option",
                  "properties": {
                    "id": {
                      "description": "The unique identifier for the poll option.",
                      "type": "string"
                    },
                    "text": {
                      "description": "The text of the poll option",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "text"
                  ],
                  "type": "object"
                },
                "type": [
                  "array",
                  "null"
                ]
              }
            },
            "required": [
              "options"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "poll_votes": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "option_id": {
                  "description": "The reaction that was used",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "option_id",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "reaction_counts": {
            "description": "Aggregated reaction counts on this message, filtered to a specific reaction type.",
            "items": {
              "description": "Represents a reaction count for a feed post",
              "properties": {
                "count": {
                  "description": "The number of users who reacted",
                  "example": 42,
                  "type": "integer"
                },
                "emoji": {
                  "description": "The emoji that was used in shortcode format (:heart:)",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "emoji",
                "count"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "replying_to_message_id": {
            "description": "The unique identifier of the message this post is replying to. Null if this is not a reply.",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The timestamp when this message was last modified.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user who authored this message.",
            "properties": {
              "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"
            ],
            "type": "object"
          },
          "view_count": {
            "description": "The number of unique views this message has received. Null if view tracking is not enabled for this channel.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "content",
          "created_at",
          "updated_at",
          "poll",
          "replying_to_message_id",
          "is_edited",
          "is_pinned",
          "message_type",
          "mentions",
          "mentions_everyone",
          "user",
          "view_count",
          "reaction_counts",
          "poll_votes"
        ],
        "type": "object"
      },
      "MuxAssetStatuses": {
        "description": "Mux asset statuses",
        "enum": [
          "uploading",
          "created",
          "ready"
        ],
        "type": "string"
      },
      "PageInfo": {
        "description": "Information about pagination in a connection.",
        "properties": {
          "end_cursor": {
            "description": "When paginating forwards, the cursor to continue.",
            "type": [
              "string",
              "null"
            ]
          },
          "has_next_page": {
            "description": "When paginating forwards, are there more items?",
            "type": "boolean"
          },
          "has_previous_page": {
            "description": "When paginating backwards, are there more items?",
            "type": "boolean"
          },
          "start_cursor": {
            "description": "When paginating backwards, the cursor to continue.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "end_cursor",
          "start_cursor",
          "has_next_page",
          "has_previous_page"
        ],
        "type": "object"
      },
      "Payment": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "amount_after_fees": {
            "description": "How much the payment is for after fees",
            "example": 6.9,
            "type": "number"
          },
          "application_fee": {
            "description": "The application fee charged on this payment.",
            "properties": {
              "amount": {
                "description": "The application fee amount.",
                "example": 6.9,
                "type": "number"
              },
              "amount_captured": {
                "description": "The amount of the application fee that has been captured.",
                "example": 6.9,
                "type": "number"
              },
              "amount_refunded": {
                "description": "The amount of the application fee that has been refunded.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the application fee was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the application fee."
              },
              "id": {
                "description": "The unique identifier for the application fee.",
                "example": "apfee_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "amount",
              "amount_captured",
              "amount_refunded",
              "currency",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "auto_refunded": {
            "description": "Whether this payment was auto refunded or not",
            "type": "boolean"
          },
          "billing_address": {
            "description": "The address of the user who made the payment.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "billing_reason": {
            "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BillingReasons"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CardBrands"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_last4": {
            "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
            "example": "4242",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company for the payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "dispute_alerted_at": {
            "description": "When an alert came in that this transaction will be disputed",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "disputes": {
            "description": "The disputes attached to this payment. Null if the actor in context does not have the payment:dispute:read permission.",
            "items": {
              "description": "A dispute is a chargeback or payment challenge filed against a company, including evidence and response status.",
              "properties": {
                "amount": {
                  "description": "The disputed amount in the specified currency, formatted as a decimal.",
                  "example": 6.9,
                  "type": "number"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The three-letter ISO currency code for the disputed amount."
                },
                "editable": {
                  "description": "Whether the dispute evidence can still be edited and submitted.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the dispute.",
                  "example": "dspt_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "needs_response_by": {
                  "description": "The deadline by which dispute evidence must be submitted. Null if no response deadline is set.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "notes": {
                  "description": "Additional freeform notes submitted by the company as part of the dispute evidence.",
                  "example": "Customer used the product for 3 months before disputing.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "reason": {
                  "description": "A human-readable reason for the dispute.",
                  "example": "Product Not Received",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "$ref": "#/components/schemas/DisputeStatuses",
                  "description": "The current status of the dispute lifecycle, such as needs_response, under_review, won, or lost."
                }
              },
              "required": [
                "id",
                "amount",
                "currency",
                "status",
                "editable",
                "needs_response_by",
                "reason",
                "notes"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "financing_installments_count": {
            "description": "The number of financing installments for the payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "financing_transactions": {
            "description": "The financing transactions attached to this payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).",
            "items": {
              "description": "A payment transaction.",
              "properties": {
                "amount": {
                  "description": "The amount of the payment transaction.",
                  "example": 6.9,
                  "type": "number"
                },
                "created_at": {
                  "description": "The date and time the payment transaction was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "id": {
                  "description": "The unique identifier for the payment transaction.",
                  "example": "ptx_xxxxxxxxxxxxxx",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/PaymentTransactionStatuses",
                  "description": "The status of the payment transaction."
                },
                "transaction_type": {
                  "$ref": "#/components/schemas/PaymentTransactionTypes",
                  "description": "The type of the payment transaction."
                }
              },
              "required": [
                "id",
                "amount",
                "status",
                "created_at",
                "transaction_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "last_payment_attempt": {
            "description": "The time of the last payment attempt.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "phone": {
                "description": "The phone number for the member, if available.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "phone"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "membership": {
            "description": "The membership attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the membership.",
                "example": "mem_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "phone_number": {
                "description": "The phone number associated with this membership.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MembershipStatus",
                "description": "The state of the membership."
              }
            },
            "required": [
              "id",
              "status",
              "phone_number"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
            "type": [
              "object",
              "null"
            ]
          },
          "next_payment_attempt": {
            "description": "The time of the next schedule payment retry.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "description": "The tokenized payment method reference used for this payment. Null if no token was used.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method_type": {
            "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments_failed": {
            "description": "The number of failed payment attempts for the payment.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "plan": {
            "description": "The plan attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "internal_notes": {
                "description": "A personal description or notes section for the business.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "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",
              "internal_notes",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product this payment was made for",
            "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"
                ]
              },
              "route": {
                "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                "example": "pickaxe-analytics",
                "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",
              "route",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_code": {
            "description": "The promo code used for this payment.",
            "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"
              },
              "base_currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The monetary currency of the promo code."
              },
              "code": {
                "description": "The specific code used to apply the promo at checkout.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              },
              "number_of_intervals": {
                "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."
              }
            },
            "required": [
              "id",
              "code",
              "amount_off",
              "base_currency",
              "promo_type",
              "number_of_intervals"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "refundable": {
            "description": "True only for payments that are `paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.",
            "type": "boolean"
          },
          "refunded_amount": {
            "description": "The payment refund amount(if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "refunded_at": {
            "description": "When the payment was refunded (if applicable).",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "refunds": {
            "description": "The refunds issued against this payment, newest first, including failed and canceled refund attempts. Limited to the 100 most recent.",
            "items": {
              "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
              "properties": {
                "amount": {
                  "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
                  "example": 6.9,
                  "type": "number"
                },
                "created_at": {
                  "description": "The datetime the refund was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "currency": {
                  "$ref": "#/components/schemas/Currencies",
                  "description": "The three-letter ISO currency code for the refunded amount."
                },
                "id": {
                  "description": "The unique identifier for the refund.",
                  "example": "rf_xxxxxxxxxxxxxxx",
                  "type": "string"
                },
                "status": {
                  "$ref": "#/components/schemas/RefundStatuses",
                  "description": "The current processing status of the refund, such as pending, succeeded, or failed."
                }
              },
              "required": [
                "id",
                "status",
                "amount",
                "currency",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "resolutions": {
            "description": "The resolution center cases opened by the customer on this payment. Null if the actor in context does not have the payment:resolution_center_case:read permission.",
            "items": {
              "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
              "properties": {
                "customer_appealed": {
                  "description": "Whether the customer has filed an appeal after the initial resolution decision.",
                  "type": "boolean"
                },
                "customer_response_actions": {
                  "description": "The list of actions currently available to the customer.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
                  },
                  "type": "array"
                },
                "due_date": {
                  "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the resolution.",
                  "example": "reso_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "issue": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
                  "description": "The category of the dispute."
                },
                "merchant_appealed": {
                  "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
                  "type": "boolean"
                },
                "merchant_response_actions": {
                  "description": "The list of actions currently available to the merchant.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
                  },
                  "type": "array"
                },
                "platform_response_actions": {
                  "description": "The list of actions currently available to the Whop platform for moderating this resolution.",
                  "items": {
                    "$ref": "#/components/schemas/ResolutionCenterCasePlatformResponses"
                  },
                  "type": "array"
                },
                "status": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
                  "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
                }
              },
              "required": [
                "id",
                "status",
                "due_date",
                "issue",
                "customer_appealed",
                "merchant_appealed",
                "customer_response_actions",
                "merchant_response_actions",
                "platform_response_actions"
              ],
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "retryable": {
            "description": "True when the payment status is `open` and its membership is in one of the retry-eligible states (`active`, `trialing`, `completed`, or `past_due`); otherwise false. Used to decide if Whop can attempt the charge again.",
            "type": "boolean"
          },
          "risk_score": {
            "description": "Whop's in-house fraud risk score for this payment, from 0 (lowest risk) to 100 (highest risk). Null when the payment has not been scored or scoring has not yet completed.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "risk_signals": {
            "additionalProperties": true,
            "description": "A curated set of factors behind the risk score, grouped by category (business transaction history, buyer, device). Each entry has a key, human-readable label, category, and value. Null when there is no risk assessment for this payment.",
            "type": [
              "object",
              "null"
            ]
          },
          "settlement_amount": {
            "description": "The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.",
            "example": 6.9,
            "type": "number"
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "settlement_exchange_rate": {
            "description": "Deprecated. Always returns null.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "shipping_address": {
            "description": "The shipping address provided by the customer for physical goods. Null if no shipping address was collected.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "substatus": {
            "$ref": "#/components/schemas/FriendlyReceiptStatus",
            "description": "The friendly status of the payment."
          },
          "subtotal": {
            "description": "The subtotal to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The calculated amount of the sales/VAT tax (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_behavior": {
            "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptTaxBehaviors"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_refunded_amount": {
            "description": "The amount of tax that has been refunded (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "three_ds_verified": {
            "description": "Whether 3D Secure authentication was completed for this payment.",
            "type": "boolean"
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the payment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total": {
            "description": "The total in USD to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "user": {
            "description": "The user that made this payment.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "voidable": {
            "description": "True when the payment is tied to a membership in `past_due`, the payment status is `open`, and the processor allows voiding payments; otherwise false.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "substatus",
          "refundable",
          "retryable",
          "voidable",
          "created_at",
          "updated_at",
          "paid_at",
          "last_payment_attempt",
          "next_payment_attempt",
          "dispute_alerted_at",
          "refunded_at",
          "plan",
          "product",
          "user",
          "membership",
          "member",
          "payment_method",
          "company",
          "promo_code",
          "currency",
          "settlement_currency",
          "total",
          "subtotal",
          "usd_total",
          "refunded_amount",
          "auto_refunded",
          "amount_after_fees",
          "application_fee",
          "card_brand",
          "card_last4",
          "billing_address",
          "shipping_address",
          "payment_method_type",
          "billing_reason",
          "payments_failed",
          "tax_amount",
          "tax_behavior",
          "failure_message",
          "metadata",
          "checkout_configuration_id",
          "settlement_amount",
          "settlement_exchange_rate",
          "tax_refunded_amount",
          "financing_installments_count",
          "financing_transactions",
          "refunds",
          "disputes",
          "resolutions",
          "risk_score",
          "risk_signals",
          "three_ds_verified"
        ],
        "type": "object"
      },
      "PaymentListItem": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "amount_after_fees": {
            "description": "How much the payment is for after fees",
            "example": 6.9,
            "type": "number"
          },
          "application_fee": {
            "description": "The application fee charged on this payment.",
            "properties": {
              "amount": {
                "description": "The application fee amount.",
                "example": 6.9,
                "type": "number"
              },
              "amount_captured": {
                "description": "The amount of the application fee that has been captured.",
                "example": 6.9,
                "type": "number"
              },
              "amount_refunded": {
                "description": "The amount of the application fee that has been refunded.",
                "example": 6.9,
                "type": "number"
              },
              "created_at": {
                "description": "The datetime the application fee was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The currency of the application fee."
              },
              "id": {
                "description": "The unique identifier for the application fee.",
                "example": "apfee_xxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "amount",
              "amount_captured",
              "amount_refunded",
              "currency",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "auto_refunded": {
            "description": "Whether this payment was auto refunded or not",
            "type": "boolean"
          },
          "billing_address": {
            "description": "The address of the user who made the payment.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "billing_reason": {
            "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/BillingReasons"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_brand": {
            "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/CardBrands"
              },
              {
                "type": "null"
              }
            ]
          },
          "card_last4": {
            "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
            "example": "4242",
            "type": [
              "string",
              "null"
            ]
          },
          "checkout_configuration_id": {
            "description": "The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company for the payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "The slug/route of the company on the Whop site.",
                "type": "string"
              },
              "title": {
                "description": "The written name of the company.",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "dispute_alerted_at": {
            "description": "When an alert came in that this transaction will be disputed",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "last_payment_attempt": {
            "description": "The time of the last payment attempt.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "member": {
            "description": "The member attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "phone": {
                "description": "The phone number for the member, if available.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "phone"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "membership": {
            "description": "The membership attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the membership.",
                "example": "mem_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "phone_number": {
                "description": "The phone number associated with this membership.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/MembershipStatus",
                "description": "The state of the membership."
              }
            },
            "required": [
              "id",
              "status",
              "phone_number"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
            "type": [
              "object",
              "null"
            ]
          },
          "next_payment_attempt": {
            "description": "The time of the next schedule payment retry.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "payment_method": {
            "description": "The tokenized payment method reference used for this payment. Null if no token was used.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method_type": {
            "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentMethodTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "payments_failed": {
            "description": "The number of failed payment attempts for the payment.",
            "example": 42,
            "type": [
              "integer",
              "null"
            ]
          },
          "plan": {
            "description": "The plan attached to this payment.",
            "properties": {
              "id": {
                "description": "The unique identifier for the plan.",
                "example": "plan_xxxxxxxxxxxxx",
                "type": "string"
              },
              "internal_notes": {
                "description": "A personal description or notes section for the business.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "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",
              "internal_notes",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "product": {
            "description": "The product this payment was made for",
            "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"
                ]
              },
              "route": {
                "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
                "example": "pickaxe-analytics",
                "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",
              "route",
              "metadata"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "promo_code": {
            "description": "The promo code used for this payment.",
            "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"
              },
              "base_currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The monetary currency of the promo code."
              },
              "code": {
                "description": "The specific code used to apply the promo at checkout.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the promo code.",
                "example": "promo_xxxxxxxxxxxx",
                "type": "string"
              },
              "number_of_intervals": {
                "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."
              }
            },
            "required": [
              "id",
              "code",
              "amount_off",
              "base_currency",
              "promo_type",
              "number_of_intervals"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "refundable": {
            "description": "True only for payments that are `paid`, have not been fully refunded, and were processed by a payment processor that allows refunds.",
            "type": "boolean"
          },
          "refunded_amount": {
            "description": "The payment refund amount(if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "refunded_at": {
            "description": "When the payment was refunded (if applicable).",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "retryable": {
            "description": "True when the payment status is `open` and its membership is in one of the retry-eligible states (`active`, `trialing`, `completed`, or `past_due`); otherwise false. Used to decide if Whop can attempt the charge again.",
            "type": "boolean"
          },
          "settlement_currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
          },
          "shipping_address": {
            "description": "The shipping address provided by the customer for physical goods. Null if no shipping address was collected.",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "description": "The name of the customer.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "name",
              "line1",
              "line2",
              "city",
              "state",
              "postal_code",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "substatus": {
            "$ref": "#/components/schemas/FriendlyReceiptStatus",
            "description": "The friendly status of the payment."
          },
          "subtotal": {
            "description": "The subtotal to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The calculated amount of the sales/VAT tax (if applicable).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "tax_behavior": {
            "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptTaxBehaviors"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the payment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "usd_total": {
            "description": "The total in USD to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "user": {
            "description": "The user that made this payment.",
            "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",
              "name",
              "username",
              "email"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "voidable": {
            "description": "True when the payment is tied to a membership in `past_due`, the payment status is `open`, and the processor allows voiding payments; otherwise false.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "substatus",
          "refundable",
          "retryable",
          "voidable",
          "created_at",
          "updated_at",
          "paid_at",
          "last_payment_attempt",
          "next_payment_attempt",
          "dispute_alerted_at",
          "refunded_at",
          "plan",
          "product",
          "user",
          "membership",
          "member",
          "payment_method",
          "company",
          "promo_code",
          "currency",
          "settlement_currency",
          "total",
          "subtotal",
          "usd_total",
          "refunded_amount",
          "auto_refunded",
          "amount_after_fees",
          "application_fee",
          "card_brand",
          "card_last4",
          "billing_address",
          "shipping_address",
          "payment_method_type",
          "billing_reason",
          "payments_failed",
          "tax_amount",
          "tax_behavior",
          "failure_message",
          "metadata",
          "checkout_configuration_id"
        ],
        "type": "object"
      },
      "PaymentMethod": {
        "discriminator": {
          "propertyName": "typename"
        },
        "oneOf": [
          {
            "description": "A saved payment method with no type-specific details available.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "BasePaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type"
            ],
            "title": "BasePaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved card payment method, including brand, last four digits, and expiration details.",
            "properties": {
              "card": {
                "description": "The card-specific details for this payment method, including brand, last four digits, and expiration.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CardPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "title": "CardPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved US bank account payment method, including bank name, last four digits, and account type.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "UsBankAccountPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              },
              "us_bank_account": {
                "description": "The bank account-specific details for this payment method, including bank name and last four digits.",
                "properties": {
                  "account_type": {
                    "description": "The type of bank account (e.g., checking, savings).",
                    "example": "checking",
                    "type": "string"
                  },
                  "bank_name": {
                    "description": "The name of the financial institution holding the account.",
                    "example": "Chase",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The last four digits of the bank account number.",
                    "example": "6789",
                    "type": "string"
                  }
                },
                "required": [
                  "bank_name",
                  "last4",
                  "account_type"
                ],
                "type": "object"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "us_bank_account"
            ],
            "title": "UsBankAccountPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved Cash App payment method, including the buyer's cashtag and unique identifier.",
            "properties": {
              "cashapp": {
                "description": "The Cash App-specific details for this payment method, including cashtag and buyer ID.",
                "properties": {
                  "buyer_id": {
                    "description": "The unique and immutable identifier assigned by Cash App to the buyer. Null if not available.",
                    "example": "BUYER_abc123",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cashtag": {
                    "description": "The public cashtag handle of the buyer on Cash App. Null if not available.",
                    "example": "$jacksmith",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "buyer_id",
                  "cashtag"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CashappPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "cashapp"
            ],
            "title": "CashappPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved iDEAL payment method, including the customer's bank name and BIC code.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "ideal": {
                "description": "The iDEAL-specific details for this payment method, including bank name and BIC.",
                "properties": {
                  "bank": {
                    "description": "The name of the customer's bank used for the iDEAL transaction. Null if not available.",
                    "example": "ing",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "description": "The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not available.",
                    "example": "INGBNL2A",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank",
                  "bic"
                ],
                "type": "object"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "IdealPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "ideal"
            ],
            "title": "IdealPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "sepa_debit": {
                "description": "The SEPA Direct Debit-specific details for this payment method, including bank code and last four IBAN digits.",
                "properties": {
                  "bank_code": {
                    "description": "The bank code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "37040044",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "branch_code": {
                    "description": "The branch code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "0532",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The two-letter ISO country code where the bank account is located. Null if not available.",
                    "example": "DE",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the IBAN associated with this SEPA account. Null if not available.",
                    "example": "3000",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank_code",
                  "branch_code",
                  "country",
                  "last4"
                ],
                "type": "object"
              },
              "typename": {
                "const": "SepaDebitPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "sepa_debit"
            ],
            "title": "SepaDebitPaymentMethod",
            "type": "object"
          }
        ],
        "type": "object"
      },
      "PaymentMethodListItem": {
        "discriminator": {
          "propertyName": "typename"
        },
        "oneOf": [
          {
            "description": "A saved payment method with no type-specific details available.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "BasePaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type"
            ],
            "title": "BasePaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved card payment method, including brand, last four digits, and expiration details.",
            "properties": {
              "card": {
                "description": "The card-specific details for this payment method, including brand, last four digits, and expiration.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CardPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "card"
            ],
            "title": "CardPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved US bank account payment method, including bank name, last four digits, and account type.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "UsBankAccountPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              },
              "us_bank_account": {
                "description": "The bank account-specific details for this payment method, including bank name and last four digits.",
                "properties": {
                  "account_type": {
                    "description": "The type of bank account (e.g., checking, savings).",
                    "example": "checking",
                    "type": "string"
                  },
                  "bank_name": {
                    "description": "The name of the financial institution holding the account.",
                    "example": "Chase",
                    "type": "string"
                  },
                  "last4": {
                    "description": "The last four digits of the bank account number.",
                    "example": "6789",
                    "type": "string"
                  }
                },
                "required": [
                  "bank_name",
                  "last4",
                  "account_type"
                ],
                "type": "object"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "us_bank_account"
            ],
            "title": "UsBankAccountPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved Cash App payment method, including the buyer's cashtag and unique identifier.",
            "properties": {
              "cashapp": {
                "description": "The Cash App-specific details for this payment method, including cashtag and buyer ID.",
                "properties": {
                  "buyer_id": {
                    "description": "The unique and immutable identifier assigned by Cash App to the buyer. Null if not available.",
                    "example": "BUYER_abc123",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cashtag": {
                    "description": "The public cashtag handle of the buyer on Cash App. Null if not available.",
                    "example": "$jacksmith",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "buyer_id",
                  "cashtag"
                ],
                "type": "object"
              },
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "CashappPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "cashapp"
            ],
            "title": "CashappPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved iDEAL payment method, including the customer's bank name and BIC code.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "ideal": {
                "description": "The iDEAL-specific details for this payment method, including bank name and BIC.",
                "properties": {
                  "bank": {
                    "description": "The name of the customer's bank used for the iDEAL transaction. Null if not available.",
                    "example": "ing",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "description": "The Bank Identifier Code (BIC/SWIFT) of the customer's bank. Null if not available.",
                    "example": "INGBNL2A",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank",
                  "bic"
                ],
                "type": "object"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "typename": {
                "const": "IdealPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "ideal"
            ],
            "title": "IdealPaymentMethod",
            "type": "object"
          },
          {
            "description": "A saved SEPA Direct Debit payment method, including the bank code, country, and last four IBAN digits.",
            "properties": {
              "created_at": {
                "description": "The time of the event in ISO 8601 UTC format with millisecond precision",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The type of payment instrument stored on file (e.g., card, us_bank_account, cashapp, ideal, sepa_debit)."
              },
              "sepa_debit": {
                "description": "The SEPA Direct Debit-specific details for this payment method, including bank code and last four IBAN digits.",
                "properties": {
                  "bank_code": {
                    "description": "The bank code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "37040044",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "branch_code": {
                    "description": "The branch code of the financial institution associated with this SEPA account. Null if not available.",
                    "example": "0532",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The two-letter ISO country code where the bank account is located. Null if not available.",
                    "example": "DE",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the IBAN associated with this SEPA account. Null if not available.",
                    "example": "3000",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "bank_code",
                  "branch_code",
                  "country",
                  "last4"
                ],
                "type": "object"
              },
              "typename": {
                "const": "SepaDebitPaymentMethod",
                "description": "The typename of this object",
                "type": "string"
              }
            },
            "required": [
              "typename",
              "id",
              "created_at",
              "payment_method_type",
              "sepa_debit"
            ],
            "title": "SepaDebitPaymentMethod",
            "type": "object"
          }
        ],
        "type": "object"
      },
      "PaymentMethodTypes": {
        "description": "The different types of payment methods that can be used.",
        "enum": [
          "acss_debit",
          "affirm",
          "afterpay_clearpay",
          "alipay",
          "alma",
          "amazon_pay",
          "apple",
          "apple_pay",
          "au_bank_transfer",
          "au_becs_debit",
          "bacs_debit",
          "bancolombia",
          "bancontact",
          "billie",
          "bizum",
          "blik",
          "boleto",
          "bre_b",
          "ca_bank_transfer",
          "capchase_pay",
          "card",
          "card_installments_three",
          "card_installments_six",
          "card_installments_twelve",
          "cashapp",
          "claritypay",
          "coinbase",
          "crypto",
          "custom",
          "customer_balance",
          "demo_pay",
          "efecty",
          "eps",
          "eu_bank_transfer",
          "fpx",
          "gb_bank_transfer",
          "giropay",
          "google_pay",
          "gopay",
          "grabpay",
          "id_bank_transfer",
          "ideal",
          "interac",
          "kakao_pay",
          "klarna",
          "klarna_pay_now",
          "konbini",
          "kr_card",
          "kr_market",
          "kriya",
          "kueski",
          "link",
          "mb_way",
          "m_pesa",
          "mercado_pago",
          "mobilepay",
          "mondu",
          "multibanco",
          "naver_pay",
          "nequi",
          "netbanking",
          "ng_bank",
          "ng_bank_transfer",
          "ng_card",
          "ng_market",
          "ng_ussd",
          "ng_wallet",
          "nz_bank_account",
          "oxxo",
          "p24",
          "pago_efectivo",
          "pse",
          "pay_by_bank",
          "payco",
          "paynow",
          "paypal",
          "paypay",
          "payto",
          "pix",
          "platform_balance",
          "promptpay",
          "qris",
          "rechnung",
          "revolut_pay",
          "samsung_pay",
          "satispay",
          "scalapay",
          "sencillito",
          "sepa_debit",
          "sequra",
          "servipag",
          "sezzle",
          "shop_pay",
          "shopeepay",
          "sofort",
          "south_korea_market",
          "spei",
          "splitit",
          "sunbit",
          "swish",
          "tamara",
          "twint",
          "upi",
          "us_bank_account",
          "us_bank_transfer",
          "venmo",
          "vipps",
          "webpay",
          "wechat_pay",
          "yape",
          "zip",
          "coinflow",
          "unknown"
        ],
        "type": "string"
      },
      "PaymentProviders": {
        "description": "The different payment providers.",
        "enum": [
          "stripe",
          "coinbase",
          "paypal",
          "apple",
          "sezzle",
          "splitit",
          "platform_balance",
          "multi_psp",
          "adyen",
          "claritypay",
          "checkout_dot_com",
          "airwallex",
          "coinflow",
          "sequra",
          "dlocal"
        ],
        "type": "string"
      },
      "PaymentTransactionStatuses": {
        "description": "The different statuses a payment transaction can be in.",
        "enum": [
          "succeeded",
          "declined",
          "error",
          "pending",
          "created",
          "expired",
          "won",
          "rejected",
          "lost",
          "prevented",
          "canceled"
        ],
        "type": "string"
      },
      "PaymentTransactionTypes": {
        "description": "The different types of payment transactions.",
        "enum": [
          "purchase",
          "authorize",
          "capture",
          "refund",
          "canceled",
          "verify",
          "chargeback",
          "pre_chargeback",
          "three_d_secure",
          "fraud_screening",
          "authorization",
          "installment"
        ],
        "type": "string"
      },
      "PaymentsApprovalStatuses": {
        "description": "The different approval statuses an account can have.",
        "enum": [
          "pending",
          "approved",
          "monitoring",
          "rejected"
        ],
        "type": "string"
      },
      "PayoutAccount": {
        "description": "An object representing an account used for payouts.",
        "properties": {
          "address": {
            "description": "The physical address associated with this payout account",
            "properties": {
              "city": {
                "description": "The city of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "description": "The country of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line1": {
                "description": "The line 1 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "line2": {
                "description": "The line 2 of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "postal_code": {
                "description": "The postal code of the address.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "state": {
                "description": "The state of the address.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "line1",
              "line2",
              "city",
              "postal_code",
              "state",
              "country"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "business_name": {
            "description": "The company's legal name",
            "type": [
              "string",
              "null"
            ]
          },
          "business_representative": {
            "description": "The business representative for this payout account",
            "properties": {
              "date_of_birth": {
                "description": "The date of birth of the business representative in ISO 8601 format (YYYY-MM-DD).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_name": {
                "description": "The first name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_name": {
                "description": "The last name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "middle_name": {
                "description": "The middle name of the business representative.",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "date_of_birth",
              "first_name",
              "middle_name",
              "last_name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "email": {
            "description": "The email address of the representative",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout account.",
            "example": "poact_xxxxxxxxxxxx",
            "type": "string"
          },
          "latest_verification": {
            "description": "The latest verification for the connected account.",
            "properties": {
              "id": {
                "description": "The numeric id of the verification record.",
                "example": "verf_xxxxxxxxxxxxx",
                "type": "string"
              },
              "last_error_code": {
                "description": "The most recent error code returned during verification. Null if no error has occurred.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/VerificationErrorCodes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error_reason": {
                "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                "example": "Document image was too blurry to read.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "$ref": "#/components/schemas/VerificationStatuses",
                "description": "The current status of this verification session."
              }
            },
            "required": [
              "id",
              "status",
              "last_error_code",
              "last_error_reason"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "phone": {
            "description": "The business representative's phone",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "The granular calculated status of the payout account reflecting its current KYC and withdrawal readiness state.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PayoutAccountCalculatedStatuses"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "business_name",
          "phone",
          "email",
          "business_representative",
          "address",
          "latest_verification"
        ],
        "type": "object"
      },
      "PayoutAccountCalculatedStatuses": {
        "description": "The granular calculated statuses reflecting payout account KYC and withdrawal readiness.",
        "enum": [
          "connected",
          "disabled",
          "action_required",
          "pending_verification",
          "verification_failed",
          "not_started"
        ],
        "type": "string"
      },
      "PayoutDestinationCategory": {
        "description": "The category of a payout destination.",
        "enum": [
          "crypto",
          "rtp",
          "next_day_bank",
          "bank_wire",
          "digital_wallet",
          "unknown"
        ],
        "type": "string"
      },
      "PayoutErrorCodes": {
        "description": "The different error codes a payout can be in.",
        "enum": [
          "account_closed",
          "account_does_not_exist",
          "account_information_invalid",
          "account_number_invalid_region",
          "account_frozen",
          "account_lookup_failed",
          "account_not_found",
          "amount_out_of_bounds",
          "attributes_not_validated",
          "b2b_payments_prohibited",
          "bank_statement_required",
          "compliance_review",
          "currency_not_supported",
          "deposit_canceled",
          "deposit_failed",
          "deposit_rejected",
          "destination_unavailable",
          "exceeded_account_limit",
          "expired_quote",
          "generic_payout_error",
          "technical_problem",
          "identification_number_invalid",
          "invalid_account_number",
          "invalid_bank_code",
          "invalid_beneficiary",
          "invalid_mailing_address",
          "invalid_branch_number",
          "invalid_branch_code",
          "invalid_phone_number",
          "invalid_routing_number",
          "invalid_swift_code",
          "invalid_company_details",
          "manual_cancelation",
          "misc_error",
          "missing_city_and_country",
          "missing_phone_number",
          "missing_remittance_info",
          "payee_name_invalid",
          "beneficiary_name_mismatch",
          "receiving_account_locked",
          "rejected_by_compliance",
          "rtp_not_supported",
          "non_transaction_account",
          "source_token_insufficient_funds",
          "ssn_invalid",
          "wallet_screenshot_required",
          "unsupported_region",
          "payout_provider_timeout"
        ],
        "type": "string"
      },
      "PayoutMethod": {
        "description": "A configured payout destination where a user receives earned funds, such as a bank account or digital wallet.",
        "properties": {
          "account_reference": {
            "description": "A masked identifier for the payout destination, such as the last four digits of a bank account or an email address. Null if no reference is available.",
            "example": "****1234",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company associated with this payout destination. Null if not linked to a specific company.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payout token was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code that payouts are delivered in for this destination.",
            "example": "USD",
            "type": "string"
          },
          "destination": {
            "description": "The payout destination configuration linked to this token. Null if not yet configured.",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/PayoutDestinationCategory",
                "description": "The category of the payout destination"
              },
              "country_code": {
                "description": "The country code of the payout destination",
                "type": "string"
              },
              "name": {
                "description": "The name of the payer associated with the payout destination",
                "type": "string"
              }
            },
            "required": [
              "country_code",
              "category",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout token.",
            "example": "potk_xxxxxxxxxxxxx",
            "type": "string"
          },
          "institution_name": {
            "description": "The name of the bank or financial institution receiving payouts. Null if not applicable or not provided.",
            "example": "Chase Bank",
            "type": [
              "string",
              "null"
            ]
          },
          "is_default": {
            "description": "Whether this is the default payout destination for the associated payout account.",
            "type": "boolean"
          },
          "nickname": {
            "description": "A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set.",
            "example": "My Business Account",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "company",
          "nickname",
          "currency",
          "is_default",
          "account_reference",
          "institution_name",
          "destination"
        ],
        "type": "object"
      },
      "PayoutMethodListItem": {
        "description": "A configured payout destination where a user receives earned funds, such as a bank account or digital wallet.",
        "properties": {
          "account_reference": {
            "description": "A masked identifier for the payout destination, such as the last four digits of a bank account or an email address. Null if no reference is available.",
            "example": "****1234",
            "type": [
              "string",
              "null"
            ]
          },
          "company": {
            "description": "The company associated with this payout destination. Null if not linked to a specific company.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the payout token was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code that payouts are delivered in for this destination.",
            "example": "USD",
            "type": "string"
          },
          "destination": {
            "description": "The payout destination configuration linked to this token. Null if not yet configured.",
            "properties": {
              "category": {
                "$ref": "#/components/schemas/PayoutDestinationCategory",
                "description": "The category of the payout destination"
              },
              "country_code": {
                "description": "The country code of the payout destination",
                "type": "string"
              },
              "name": {
                "description": "The name of the payer associated with the payout destination",
                "type": "string"
              }
            },
            "required": [
              "country_code",
              "category",
              "name"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payout token.",
            "example": "potk_xxxxxxxxxxxxx",
            "type": "string"
          },
          "institution_name": {
            "description": "The name of the bank or financial institution receiving payouts. Null if not applicable or not provided.",
            "example": "Chase Bank",
            "type": [
              "string",
              "null"
            ]
          },
          "is_default": {
            "description": "Whether this is the default payout destination for the associated payout account.",
            "type": "boolean"
          },
          "nickname": {
            "description": "A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set.",
            "example": "My Business Account",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "company",
          "nickname",
          "currency",
          "is_default",
          "account_reference",
          "institution_name",
          "destination"
        ],
        "type": "object"
      },
      "PermissionSystemRoles": {
        "description": "The different system roles that can be assigned.",
        "enum": [
          "owner",
          "admin",
          "moderator",
          "sales_manager",
          "advertiser"
        ],
        "type": "string"
      },
      "PlanThreeDsLevels": {
        "description": "The 3D Secure behavior for a plan.",
        "enum": [
          "mandate_challenge",
          "frictionless"
        ],
        "type": "string"
      },
      "PlanTypes": {
        "description": "The type of plan that can be attached to a product",
        "enum": [
          "renewal",
          "one_time"
        ],
        "type": "string"
      },
      "Product": {
        "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
        "properties": {
          "company": {
            "description": "The company this product belongs to.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "route",
              "title"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the product was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "custom_cta": {
            "$ref": "#/components/schemas/CustomCtas",
            "description": "Call-to-action button label shown on the product purchase page."
          },
          "custom_cta_url": {
            "description": "An optional URL that the call-to-action button links to instead of the default checkout flow. Null if no custom URL is set.",
            "example": "https://example.com/signup",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_statement_descriptor": {
            "description": "Custom bank statement descriptor for product purchases. Maximum 22 characters, including required `WHOP*` prefix.",
            "example": "PICKAXE",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "A brief summary of what the product offers, displayed on product pages and search results.",
            "example": "Track your revenue, members, and growth in real time.",
            "type": [
              "string",
              "null"
            ]
          },
          "external_identifier": {
            "description": "External identifier for the product. Providing it on a product creation endpoint updates the existing product with this identifier instead of creating a new one.",
            "example": "ext_prod_12345",
            "type": [
              "string",
              "null"
            ]
          },
          "gallery_images": {
            "description": "The gallery images for this product, ordered by position.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "url",
                "content_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "global_affiliate_percentage": {
            "description": "Marketplace affiliate commission percentage for this product, or `null` if program is inactive.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "global_affiliate_status": {
            "$ref": "#/components/schemas/GlobalAffiliateStatuses",
            "description": "The enrollment status of this product in the Whop marketplace global affiliate program."
          },
          "headline": {
            "description": "A short marketing headline displayed prominently on the product's product page.",
            "example": "Real-time data analytics for creators",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the product.",
            "example": "prod_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member_affiliate_percentage": {
            "description": "Member referral commission percentage for this product, or `null` if program is inactive.",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          },
          "member_affiliate_status": {
            "$ref": "#/components/schemas/GlobalAffiliateStatuses",
            "description": "The enrollment status of this product in the member affiliate program."
          },
          "member_count": {
            "description": "Active memberships for this product. Returns `0` if the account has disabled public member counts.",
            "example": 42,
            "type": "integer"
          },
          "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"
            ]
          },
          "owner_user": {
            "description": "The user who owns the company that sells this product.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          },
          "product_tax_code": {
            "description": "The tax classification code applied to purchases of this product for sales tax calculation. Null if no tax code is assigned.",
            "properties": {
              "id": {
                "description": "The unique identifier for the product tax code.",
                "example": "ptc_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "name": {
                "description": "Human-readable name of this tax classification, such as 'Digital - SaaS'.",
                "example": "Digital - SaaS",
                "type": "string"
              },
              "product_type": {
                "$ref": "#/components/schemas/ProductTaxCodeProductTypes",
                "description": "Broad product category this tax code covers, such as physical goods or digital services."
              }
            },
            "required": [
              "id",
              "name",
              "product_type"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews for this product's company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
            "example": "pickaxe-analytics",
            "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"
          },
          "updated_at": {
            "description": "The datetime the product was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Controls whether the product is visible to customers. When set to 'hidden', the product is only accessible via direct link."
          }
        },
        "required": [
          "id",
          "title",
          "visibility",
          "headline",
          "verified",
          "created_at",
          "updated_at",
          "member_count",
          "route",
          "published_reviews_count",
          "external_identifier",
          "metadata",
          "gallery_images",
          "description",
          "custom_cta",
          "custom_cta_url",
          "custom_statement_descriptor",
          "global_affiliate_percentage",
          "global_affiliate_status",
          "member_affiliate_percentage",
          "member_affiliate_status",
          "product_tax_code",
          "owner_user",
          "company"
        ],
        "type": "object"
      },
      "ProductListItem": {
        "description": "A product is a digital good or service sold on Whop. Products contain plans for pricing and experiences for content delivery.",
        "properties": {
          "created_at": {
            "description": "The datetime the product was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "external_identifier": {
            "description": "External identifier for the product. Providing it on a product creation endpoint updates the existing product with this identifier instead of creating a new one.",
            "example": "ext_prod_12345",
            "type": [
              "string",
              "null"
            ]
          },
          "gallery_images": {
            "description": "The gallery images for this product, ordered by position.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "url",
                "content_type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "headline": {
            "description": "A short marketing headline displayed prominently on the product's product page.",
            "example": "Real-time data analytics for creators",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the product.",
            "example": "prod_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member_count": {
            "description": "Active memberships for this product. Returns `0` if the account has disabled public member counts.",
            "example": 42,
            "type": "integer"
          },
          "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"
            ]
          },
          "published_reviews_count": {
            "description": "The total number of published customer reviews for this product's company.",
            "example": 42,
            "type": "integer"
          },
          "route": {
            "description": "URL slug in the product's public link, e.g. `pickaxe-analytics` in whop.com/company/pickaxe-analytics.",
            "example": "pickaxe-analytics",
            "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"
          },
          "updated_at": {
            "description": "The datetime the product was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "verified": {
            "description": "Whether this company has been verified by Whop's trust and safety team.",
            "type": "boolean"
          },
          "visibility": {
            "$ref": "#/components/schemas/Visibility",
            "description": "Controls whether the product is visible to customers. When set to 'hidden', the product is only accessible via direct link."
          }
        },
        "required": [
          "id",
          "title",
          "visibility",
          "headline",
          "verified",
          "created_at",
          "updated_at",
          "member_count",
          "route",
          "published_reviews_count",
          "external_identifier",
          "metadata",
          "gallery_images"
        ],
        "type": "object"
      },
      "ProductTaxCodeProductTypes": {
        "description": "The product_type of the ProductTaxCode",
        "enum": [
          "physical",
          "digital",
          "services"
        ],
        "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"
      },
      "PromoCodeListItem": {
        "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"
            ]
          },
          "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"
        ],
        "type": "object"
      },
      "PromoCodeStatus": {
        "description": "Statuses for promo codes",
        "enum": [
          "active",
          "inactive",
          "archived"
        ],
        "type": "string"
      },
      "PromoCodeUpdateStatus": {
        "description": "Statuses that can be applied to promo codes through update operations.",
        "enum": [
          "active",
          "inactive"
        ],
        "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"
      },
      "Reaction": {
        "description": "A single reaction left by a user on a feed post, such as a like or emoji.",
        "properties": {
          "emoji": {
            "description": "The emoji used for this reaction in shortcode format. Null if the reaction type is not emoji.",
            "example": ":heart:",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The unique identifier of the post this reaction was left on.",
            "type": "string"
          },
          "user": {
            "description": "The user who left this reaction on the post.",
            "properties": {
              "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"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "resource_id",
          "user",
          "emoji"
        ],
        "type": "object"
      },
      "ReactionListItem": {
        "description": "A single reaction left by a user on a feed post, such as a like or emoji.",
        "properties": {
          "emoji": {
            "description": "The emoji used for this reaction in shortcode format. Null if the reaction type is not emoji.",
            "example": ":heart:",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The unique identifier of the post this reaction was left on.",
            "type": "string"
          },
          "user": {
            "description": "The user who left this reaction on the post.",
            "properties": {
              "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"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "resource_id",
          "user",
          "emoji"
        ],
        "type": "object"
      },
      "ReceiptStatus": {
        "description": "The status of a receipt",
        "enum": [
          "draft",
          "open",
          "paid",
          "pending",
          "uncollectible",
          "unresolved",
          "void"
        ],
        "type": "string"
      },
      "ReceiptTaxBehaviors": {
        "description": "The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.",
        "enum": [
          "exclusive",
          "inclusive",
          "unspecified",
          "unable_to_collect"
        ],
        "type": "string"
      },
      "ReceiptV2Order": {
        "description": "The order to sort the results by.",
        "enum": [
          "final_amount",
          "created_at",
          "paid_at"
        ],
        "type": "string"
      },
      "Refund": {
        "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
        "properties": {
          "amount": {
            "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the refund was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the refunded amount."
          },
          "id": {
            "description": "The unique identifier for the refund.",
            "example": "rf_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The original payment that this refund was issued against. Null if the payment is no longer available.",
            "properties": {
              "billing_reason": {
                "description": "The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/BillingReasons"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_brand": {
                "description": "Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CardBrands"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "card_last4": {
                "description": "The last four digits of the card used to make this payment. Null if the payment was not made with a card.",
                "example": "4242",
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/Currencies",
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur')."
              },
              "dispute_alerted_at": {
                "description": "When an alert came in that this transaction will be disputed",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "member": {
                "description": "The member attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the company member.",
                    "type": "string"
                  },
                  "phone": {
                    "description": "The phone number for the member, if available.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id",
                  "phone"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "membership": {
                "description": "The membership attached to this payment.",
                "properties": {
                  "id": {
                    "description": "The unique identifier for the membership.",
                    "example": "mem_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "status": {
                    "$ref": "#/components/schemas/MembershipStatus",
                    "description": "The state of the membership."
                  }
                },
                "required": [
                  "id",
                  "status"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "metadata": {
                "additionalProperties": true,
                "description": "The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made",
                "type": [
                  "object",
                  "null"
                ]
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payment_method_type": {
                "description": "The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentMethodTypes"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "plan": {
                "description": "The plan attached to this payment.",
                "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",
                  "null"
                ]
              },
              "product": {
                "description": "The product this payment was made for",
                "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"
                    ]
                  }
                },
                "required": [
                  "id",
                  "metadata"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "subtotal": {
                "description": "The subtotal to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax_amount": {
                "description": "The calculated amount of the sales/VAT tax (if applicable).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "tax_behavior": {
                "description": "The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ReceiptTaxBehaviors"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tax_refunded_amount": {
                "description": "The amount of tax that has been refunded (if applicable).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "usd_total": {
                "description": "The total in USD to show to the creator (excluding buyer fees).",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "user": {
                "description": "The user that made this payment.",
                "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",
                  "name",
                  "username",
                  "email"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "total",
              "subtotal",
              "usd_total",
              "currency",
              "created_at",
              "paid_at",
              "dispute_alerted_at",
              "payment_method_type",
              "billing_reason",
              "card_brand",
              "card_last4",
              "tax_amount",
              "tax_behavior",
              "tax_refunded_amount",
              "metadata",
              "plan",
              "product",
              "user",
              "member",
              "membership"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProviders",
            "description": "The payment provider that processed the refund."
          },
          "provider_created_at": {
            "description": "The timestamp when the refund was created in the payment provider's system. Null if not available from the provider.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reference_status": {
            "description": "The availability status of the refund tracking reference from the payment processor. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_type": {
            "description": "The type of tracking reference provided by the payment processor, such as an acquirer reference number. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_value": {
            "description": "The tracking reference value from the payment processor, used to trace the refund through banking networks. Null if no reference was provided.",
            "example": "74850120752",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/RefundStatuses",
            "description": "The current processing status of the refund, such as pending, succeeded, or failed."
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "created_at",
          "provider",
          "provider_created_at",
          "reference_status",
          "reference_type",
          "reference_value",
          "payment"
        ],
        "type": "object"
      },
      "RefundListItem": {
        "description": "A refund represents a full or partial reversal of a payment, including the amount, status, and payment provider.",
        "properties": {
          "amount": {
            "description": "The refunded amount as a decimal in the specified currency, such as 10.43 for $10.43 USD.",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the refund was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for the refunded amount."
          },
          "id": {
            "description": "The unique identifier for the refund.",
            "example": "rf_xxxxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The original payment that this refund was issued against. Null if the payment is no longer available.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/PaymentProviders",
            "description": "The payment provider that processed the refund."
          },
          "provider_created_at": {
            "description": "The timestamp when the refund was created in the payment provider's system. Null if not available from the provider.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "reference_status": {
            "description": "The availability status of the refund tracking reference from the payment processor. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceStatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_type": {
            "description": "The type of tracking reference provided by the payment processor, such as an acquirer reference number. Null if no reference was provided.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RefundReferenceTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "reference_value": {
            "description": "The tracking reference value from the payment processor, used to trace the refund through banking networks. Null if no reference was provided.",
            "example": "74850120752",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/RefundStatuses",
            "description": "The current processing status of the refund, such as pending, succeeded, or failed."
          }
        },
        "required": [
          "id",
          "amount",
          "currency",
          "status",
          "created_at",
          "provider",
          "provider_created_at",
          "reference_status",
          "reference_type",
          "reference_value",
          "payment"
        ],
        "type": "object"
      },
      "RefundReferenceStatuses": {
        "description": "The status of the refund reference.",
        "enum": [
          "available",
          "pending",
          "unavailable"
        ],
        "type": "string"
      },
      "RefundReferenceTypes": {
        "description": "The type of refund reference that was made available by the payment provider.",
        "enum": [
          "acquirer_reference_number",
          "retrieval_reference_number",
          "system_trace_audit_number"
        ],
        "type": "string"
      },
      "RefundStatuses": {
        "description": "The different statuses for a Refund object",
        "enum": [
          "pending",
          "requires_action",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "ReleaseMethod": {
        "description": "The methods of how a plan can be released.",
        "enum": [
          "buy_now",
          "waitlist"
        ],
        "type": "string"
      },
      "ResolutionCenterCase": {
        "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
        "properties": {
          "company": {
            "description": "The company involved in this resolution case. Null if the company no longer exists.",
            "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",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the resolution was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_appealed": {
            "description": "Whether the customer has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "customer_response_actions": {
            "description": "The list of actions currently available to the customer.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
            },
            "type": "array"
          },
          "due_date": {
            "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the resolution.",
            "example": "reso_xxxxxxxxxxxxx",
            "type": "string"
          },
          "issue": {
            "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
            "description": "The category of the dispute."
          },
          "member": {
            "description": "The membership record associated with the disputed payment. Null if the membership no longer exists.",
            "properties": {
              "id": {
                "description": "The unique identifier for the extra public member.",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "merchant_appealed": {
            "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "merchant_response_actions": {
            "description": "The list of actions currently available to the merchant.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
            },
            "type": "array"
          },
          "payment": {
            "description": "The payment record that is the subject of this resolution case.",
            "properties": {
              "created_at": {
                "description": "The datetime the payment was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "currency": {
                "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Currencies"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "paid_at": {
                "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "subtotal": {
                "description": "The payment amount before taxes and discounts are applied. In the currency specified by the currency field.",
                "example": 6.9,
                "type": [
                  "number",
                  "null"
                ]
              },
              "total": {
                "description": "The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.",
                "example": 6.9,
                "type": "number"
              }
            },
            "required": [
              "id",
              "currency",
              "created_at",
              "paid_at",
              "total",
              "subtotal"
            ],
            "type": "object"
          },
          "platform_response_actions": {
            "description": "The list of actions currently available to the Whop platform for moderating this resolution.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCasePlatformResponses"
            },
            "type": "array"
          },
          "resolution_events": {
            "description": "The most recent 50 messages, actions, and status changes that have occurred during this resolution case.",
            "items": {
              "description": "A resolution event is a message or action within a resolution case, such as a response, escalation, or status change.",
              "properties": {
                "action": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseActions",
                  "description": "The type of action recorded in this event."
                },
                "created_at": {
                  "description": "The datetime the resolution event was created.",
                  "example": "2023-12-01T05:00:00.401Z",
                  "format": "date-time",
                  "type": "string"
                },
                "details": {
                  "description": "The message body or additional context provided with this resolution event. Null if no details were included.",
                  "example": "I did not authorize this purchase.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "The unique identifier for the resolution event.",
                  "example": "revt_xxxxxxxxxxxxx",
                  "type": "string"
                },
                "reporter_type": {
                  "$ref": "#/components/schemas/ResolutionCenterCaseReporters",
                  "description": "The party who performed this action."
                }
              },
              "required": [
                "id",
                "action",
                "reporter_type",
                "details",
                "created_at"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
            "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
          },
          "updated_at": {
            "description": "The datetime the resolution was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The customer (buyer) who filed this resolution case.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "issue",
          "created_at",
          "updated_at",
          "due_date",
          "customer_appealed",
          "merchant_appealed",
          "customer_response_actions",
          "merchant_response_actions",
          "company",
          "user",
          "platform_response_actions",
          "payment",
          "member",
          "resolution_events"
        ],
        "type": "object"
      },
      "ResolutionCenterCaseActions": {
        "description": "The different types of actions for a resolution event",
        "enum": [
          "created",
          "responded",
          "accepted",
          "denied",
          "appealed",
          "withdrew",
          "requested_more_info",
          "escalated",
          "dispute_opened",
          "dispute_customer_won",
          "dispute_merchant_won"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseCustomerResponses": {
        "description": "The types of responses a customer can make to a resolution.",
        "enum": [
          "respond",
          "appeal",
          "withdraw"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseIssueTypes": {
        "description": "The different types of issues a resolution can be",
        "enum": [
          "forgot_to_cancel",
          "item_not_received",
          "significantly_not_as_described",
          "unauthorized_transaction",
          "product_unacceptable"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseListItem": {
        "description": "A resolution center case is a dispute or support case between a user and a company, tracking the issue, status, and outcome.",
        "properties": {
          "company": {
            "description": "The company involved in this resolution case. Null if the company no longer exists.",
            "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",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the resolution was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "customer_appealed": {
            "description": "Whether the customer has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "customer_response_actions": {
            "description": "The list of actions currently available to the customer.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseCustomerResponses"
            },
            "type": "array"
          },
          "due_date": {
            "description": "The deadline by which the next response is required. Null if no deadline is currently active. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the resolution.",
            "example": "reso_xxxxxxxxxxxxx",
            "type": "string"
          },
          "issue": {
            "$ref": "#/components/schemas/ResolutionCenterCaseIssueTypes",
            "description": "The category of the dispute."
          },
          "merchant_appealed": {
            "description": "Whether the merchant has filed an appeal after the initial resolution decision.",
            "type": "boolean"
          },
          "merchant_response_actions": {
            "description": "The list of actions currently available to the merchant.",
            "items": {
              "$ref": "#/components/schemas/ResolutionCenterCaseMerchantResponses"
            },
            "type": "array"
          },
          "payment": {
            "description": "The payment record that is the subject of this resolution case.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "status": {
            "$ref": "#/components/schemas/ResolutionCenterCaseStatuses",
            "description": "The current status of the resolution case, indicating which party needs to respond or if the case is closed."
          },
          "updated_at": {
            "description": "The datetime the resolution was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The customer (buyer) who filed this resolution case.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "status",
          "issue",
          "created_at",
          "updated_at",
          "due_date",
          "customer_appealed",
          "merchant_appealed",
          "customer_response_actions",
          "merchant_response_actions",
          "company",
          "user",
          "payment"
        ],
        "type": "object"
      },
      "ResolutionCenterCaseMerchantResponses": {
        "description": "The types of responses a merchant can make to a resolution.",
        "enum": [
          "accept",
          "deny",
          "request_more_info",
          "appeal",
          "respond"
        ],
        "type": "string"
      },
      "ResolutionCenterCasePlatformResponses": {
        "description": "The types of responses the platform can make to a resolution.",
        "enum": [
          "request_buyer_info",
          "request_merchant_info",
          "merchant_wins",
          "merchant_refund"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseReporters": {
        "description": "The different types of reporters for a resolution event",
        "enum": [
          "merchant",
          "customer",
          "platform",
          "system"
        ],
        "type": "string"
      },
      "ResolutionCenterCaseStatuses": {
        "description": "The statuses a resolution object can have",
        "enum": [
          "merchant_response_needed",
          "customer_response_needed",
          "merchant_info_needed",
          "customer_info_needed",
          "under_platform_review",
          "customer_won",
          "merchant_won",
          "customer_withdrew"
        ],
        "type": "string"
      },
      "ResultLabelKeys": {
        "description": "Types of optimization results tracked from external ad platforms",
        "enum": [
          "app_installs",
          "messaging_conversations_started",
          "post_engagement",
          "event_responses",
          "impressions",
          "website_purchases",
          "landing_page_views",
          "leads",
          "link_clicks",
          "quality_calls",
          "appointments_booked",
          "messaging_purchases",
          "page_likes",
          "instagram_profile_visits",
          "reach",
          "reminders_set",
          "new_subscribers",
          "video_views",
          "registrations",
          "content_views",
          "searches",
          "adds_to_cart",
          "adds_to_wishlist",
          "adds_of_payment_info",
          "checkouts_initiated",
          "website_schedules",
          "website_submit_applications",
          "website_trials_started",
          "website_subscriptions",
          "website_contacts",
          "website_donations",
          "website_find_locations",
          "website_product_customizations",
          "custom"
        ],
        "type": "string"
      },
      "Review": {
        "description": "A user-submitted review of a company, including a star rating and optional text feedback.",
        "properties": {
          "attachments": {
            "description": "A list of files and media attached to the review.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "company": {
            "description": "The company that this review was written for.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              },
              "route": {
                "description": "URL slug for the account's store page, e.g. `pickaxe` in whop.com/pickaxe.",
                "example": "pickaxe",
                "type": "string"
              },
              "title": {
                "description": "The display name of the company shown to customers.",
                "example": "Pickaxe",
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "route"
            ],
            "type": "object"
          },
          "created_at": {
            "description": "The datetime the review was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "The body text of the review containing the user's detailed feedback. Returns an empty string if no description was provided.",
            "example": "Great product, really helped me grow my audience.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the review.",
            "example": "rev_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "joined_at": {
            "description": "The timestamp of when the reviewer first joined the product. Null if unknown.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_for_product": {
            "description": "Whether the reviewer paid for the product. Null if the payment status is unknown.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "product": {
            "description": "The product that this review was written for.",
            "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"
          },
          "published_at": {
            "description": "The timestamp of when the review was published. Null if the review has not been published yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "stars": {
            "description": "The star rating given by the reviewer, from 1 to 5.",
            "example": 42,
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ReviewStatus",
            "description": "The current moderation status of the review."
          },
          "title": {
            "description": "A short summary title for the review. Null if the reviewer did not provide one.",
            "example": "Amazing community and tools",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the review was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account of the person who wrote this review.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "stars",
          "status",
          "paid_for_product",
          "created_at",
          "updated_at",
          "published_at",
          "joined_at",
          "user",
          "attachments",
          "company",
          "product"
        ],
        "type": "object"
      },
      "ReviewListItem": {
        "description": "A user-submitted review of a company, including a star rating and optional text feedback.",
        "properties": {
          "attachments": {
            "description": "A list of files and media attached to the review.",
            "items": {
              "description": "Represents an image attachment",
              "properties": {
                "content_type": {
                  "description": "Uploaded file MIME type, such as image/jpeg, video/mp4, or audio/mpeg.",
                  "example": "image/jpeg",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "filename": {
                  "description": "The original filename of the uploaded attachment, including its file extension.",
                  "example": "document.pdf",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                  "type": "string"
                },
                "url": {
                  "description": "A pre-optimized URL for rendering this attachment on the client. This should be used for displaying attachments in apps.",
                  "example": "https://media.whop.com/abc123/optimized.jpg",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "filename",
                "content_type",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "created_at": {
            "description": "The datetime the review was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "description": "The body text of the review containing the user's detailed feedback. Returns an empty string if no description was provided.",
            "example": "Great product, really helped me grow my audience.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the review.",
            "example": "rev_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "joined_at": {
            "description": "The timestamp of when the reviewer first joined the product. Null if unknown.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "paid_for_product": {
            "description": "Whether the reviewer paid for the product. Null if the payment status is unknown.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "published_at": {
            "description": "The timestamp of when the review was published. Null if the review has not been published yet.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "stars": {
            "description": "The star rating given by the reviewer, from 1 to 5.",
            "example": 42,
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/ReviewStatus",
            "description": "The current moderation status of the review."
          },
          "title": {
            "description": "A short summary title for the review. Null if the reviewer did not provide one.",
            "example": "Amazing community and tools",
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "description": "The datetime the review was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "description": "The user account of the person who wrote this review.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": "object"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "stars",
          "status",
          "paid_for_product",
          "created_at",
          "updated_at",
          "published_at",
          "joined_at",
          "user",
          "attachments"
        ],
        "type": "object"
      },
      "ReviewStatus": {
        "description": "The statuses a review can have",
        "enum": [
          "pending",
          "published",
          "removed"
        ],
        "type": "string"
      },
      "ScheduleFrequencies": {
        "description": "How often a scheduled bounty republishes a new bounty.",
        "enum": [
          "once",
          "hourly",
          "daily",
          "weekly",
          "monthly"
        ],
        "type": "string"
      },
      "SetupIntent": {
        "description": "A setup intent allows a user to save a payment method for future use without making an immediate purchase.",
        "properties": {
          "checkout_configuration": {
            "description": "The checkout session configuration associated with this setup intent. Null if no checkout session was used.",
            "properties": {
              "id": {
                "description": "The unique identifier for the checkout session.",
                "example": "ch_xxxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "company": {
            "description": "The company that initiated this setup intent. Null if the company has been deleted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the setup intent was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "error_message": {
            "description": "A human-readable error message explaining why the setup intent failed. Null if no error occurred.",
            "example": "Your card was declined.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the setup intent.",
            "example": "sint_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member associated with this setup intent. Null if the user is not a member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "user": {
                "description": "The user for this member, if any.",
                "properties": {
                  "email": {
                    "description": "The digital mailing address of the user.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the company member user.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's full name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The whop username.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "email",
                  "name",
                  "username"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "user"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this setup intent. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The saved payment method created by this setup intent. Null if the setup has not completed successfully.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "mailing_address": {
                "description": "The mailing address associated with the payment method's user",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "line1",
                  "line2",
                  "city",
                  "state",
                  "postal_code",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card",
              "mailing_address"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SetupIntentStatuses",
            "description": "The current status of the setup intent."
          },
          "three_ds_verified": {
            "description": "Whether 3D Secure authentication was completed when this payment method was set up.",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "error_message",
          "company",
          "checkout_configuration",
          "member",
          "payment_method",
          "metadata",
          "three_ds_verified"
        ],
        "type": "object"
      },
      "SetupIntentListItem": {
        "description": "A setup intent allows a user to save a payment method for future use without making an immediate purchase.",
        "properties": {
          "checkout_configuration": {
            "description": "The checkout session configuration associated with this setup intent. Null if no checkout session was used.",
            "properties": {
              "id": {
                "description": "The unique identifier for the checkout session.",
                "example": "ch_xxxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "company": {
            "description": "The company that initiated this setup intent. Null if the company has been deleted.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company.",
                "example": "biz_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "created_at": {
            "description": "The datetime the setup intent was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "error_message": {
            "description": "A human-readable error message explaining why the setup intent failed. Null if no error occurred.",
            "example": "Your card was declined.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the setup intent.",
            "example": "sint_xxxxxxxxxxxxx",
            "type": "string"
          },
          "member": {
            "description": "The company member associated with this setup intent. Null if the user is not a member.",
            "properties": {
              "id": {
                "description": "The unique identifier for the company member.",
                "type": "string"
              },
              "user": {
                "description": "The user for this member, if any.",
                "properties": {
                  "email": {
                    "description": "The digital mailing address of the user.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "id": {
                    "description": "The unique identifier for the company member user.",
                    "type": "string"
                  },
                  "name": {
                    "description": "The user's full name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "username": {
                    "description": "The whop username.",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "email",
                  "name",
                  "username"
                ],
                "type": [
                  "object",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "user"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "metadata": {
            "additionalProperties": true,
            "description": "Custom key-value pairs attached to this setup intent. Null if no metadata was provided.",
            "type": [
              "object",
              "null"
            ]
          },
          "payment_method": {
            "description": "The saved payment method created by this setup intent. Null if the setup has not completed successfully.",
            "properties": {
              "card": {
                "description": "The card data associated with the payment method, if its a debit or credit card.",
                "properties": {
                  "brand": {
                    "description": "The card network (e.g., visa, mastercard, amex). Null if the brand could not be determined.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CardBrands"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "exp_month": {
                    "description": "The two-digit expiration month of the card (1-12). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "exp_year": {
                    "description": "The two-digit expiration year of the card (e.g., 27 for 2027). Null if not available.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "last4": {
                    "description": "The last four digits of the card number. Null if not available.",
                    "example": "4242",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "brand",
                  "last4",
                  "exp_month",
                  "exp_year"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "created_at": {
                "description": "The datetime the payment token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payment token.",
                "example": "payt_xxxxxxxxxxxxx",
                "type": "string"
              },
              "mailing_address": {
                "description": "The mailing address associated with the payment method's user",
                "properties": {
                  "city": {
                    "description": "The city of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "The country of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "The line 1 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "The line 2 of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "The postal code of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "The state of the address.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "name",
                  "line1",
                  "line2",
                  "city",
                  "state",
                  "postal_code",
                  "country"
                ],
                "type": [
                  "object",
                  "null"
                ]
              },
              "payment_method_type": {
                "$ref": "#/components/schemas/PaymentMethodTypes",
                "description": "The payment method type of the payment method"
              }
            },
            "required": [
              "id",
              "created_at",
              "payment_method_type",
              "card",
              "mailing_address"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/SetupIntentStatuses",
            "description": "The current status of the setup intent."
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "error_message",
          "company",
          "checkout_configuration",
          "member",
          "payment_method",
          "metadata"
        ],
        "type": "object"
      },
      "SetupIntentStatuses": {
        "description": "The status of the setup intent.",
        "enum": [
          "processing",
          "succeeded",
          "canceled",
          "requires_action"
        ],
        "type": "string"
      },
      "Shipment": {
        "description": "A physical shipment associated with a payment, including carrier details and tracking information.",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/ShipmentCarriers",
            "description": "The shipping carrier responsible for delivering this shipment."
          },
          "created_at": {
            "description": "The datetime the shipment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "delivery_estimate": {
            "description": "The estimated delivery date for this shipment. Null if the carrier has not provided an estimate.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the shipment.",
            "example": "ship_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with this shipment. Null if the payment has been deleted or is inaccessible.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "service": {
            "description": "The shipping service level used for this shipment. Null if the carrier does not specify a service tier.",
            "example": "Priority",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatuses",
            "description": "The current delivery status of this shipment."
          },
          "substatus": {
            "description": "A more granular status providing additional detail about the shipment's current state. Null if no substatus applies.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShipmentSubstatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "tracking_code": {
            "description": "The carrier-assigned tracking number used to look up shipment progress.",
            "example": "9400111899223456789012",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the shipment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "substatus",
          "tracking_code",
          "updated_at",
          "carrier",
          "service",
          "delivery_estimate",
          "payment"
        ],
        "type": "object"
      },
      "ShipmentCarriers": {
        "description": "The carrier of a shipment",
        "enum": [
          "accurate",
          "amazon_mws",
          "amazon_shipping",
          "apc",
          "asendia_usa",
          "australia_post",
          "axlehire_v3",
          "better_trucks",
          "canada_post",
          "canpar",
          "columbus_last_mile",
          "chronopost",
          "cloud_sort",
          "courier_express",
          "couriers_please",
          "cs_logistics",
          "dai_post",
          "deutsche_post_uk",
          "deutsche_post",
          "dhl_ecommerce_asia",
          "dhl_ecs",
          "dhl_express",
          "dhl_paket",
          "door_dash",
          "dpd_nl",
          "dpd_uk",
          "dpd",
          "epost_global",
          "estafeta",
          "evri",
          "fastway",
          "fedex_cross_border",
          "fedex_default",
          "fedex_mailview",
          "fedex_smartpost",
          "fedex",
          "first_choice",
          "first_mile",
          "flexport",
          "gio",
          "gio_express",
          "gso",
          "hailify",
          "henry",
          "interlink_express",
          "jet",
          "kuroneko_yamato",
          "la_post",
          "lasership_v2",
          "loomis_express",
          "lso",
          "ontrac",
          "optima",
          "osm_worldwide",
          "parcelforce",
          "parcll",
          "passport_global",
          "post_nl",
          "purolator",
          "quick",
          "royal_mail",
          "omni_parcel",
          "sendle",
          "sf_express",
          "smart_kargo",
          "sonic",
          "spee_dee",
          "swyft",
          "tforce",
          "uds",
          "ups_iparcel",
          "ups_mail_innovations",
          "ups",
          "usps",
          "veho",
          "yanwen"
        ],
        "type": "string"
      },
      "ShipmentListItem": {
        "description": "A physical shipment associated with a payment, including carrier details and tracking information.",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/ShipmentCarriers",
            "description": "The shipping carrier responsible for delivering this shipment."
          },
          "created_at": {
            "description": "The datetime the shipment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "delivery_estimate": {
            "description": "The estimated delivery date for this shipment. Null if the carrier has not provided an estimate.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the shipment.",
            "example": "ship_xxxxxxxxxxxxx",
            "type": "string"
          },
          "payment": {
            "description": "The payment associated with this shipment. Null if the payment has been deleted or is inaccessible.",
            "properties": {
              "id": {
                "description": "The unique identifier for the payment.",
                "example": "pay_xxxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "service": {
            "description": "The shipping service level used for this shipment. Null if the carrier does not specify a service tier.",
            "example": "Priority",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ShipmentStatuses",
            "description": "The current delivery status of this shipment."
          },
          "substatus": {
            "description": "A more granular status providing additional detail about the shipment's current state. Null if no substatus applies.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ShipmentSubstatuses"
              },
              {
                "type": "null"
              }
            ]
          },
          "tracking_code": {
            "description": "The carrier-assigned tracking number used to look up shipment progress.",
            "example": "9400111899223456789012",
            "type": "string"
          },
          "updated_at": {
            "description": "The datetime the shipment was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at",
          "status",
          "substatus",
          "tracking_code",
          "updated_at",
          "carrier",
          "service",
          "delivery_estimate",
          "payment"
        ],
        "type": "object"
      },
      "ShipmentStatuses": {
        "description": "The status of a shipment",
        "enum": [
          "unknown",
          "pre_transit",
          "in_transit",
          "out_for_delivery",
          "delivered",
          "available_for_pickup",
          "return_to_sender",
          "failure",
          "cancelled",
          "error"
        ],
        "type": "string"
      },
      "ShipmentSubstatuses": {
        "description": "The substatus of a shipment",
        "enum": [
          "address_correction",
          "arrived_at_destination",
          "arrived_at_facility",
          "arrived_at_pickup_location",
          "awaiting_information",
          "substatus_cancelled",
          "damaged",
          "delayed",
          "delivery_exception",
          "departed_facility",
          "departed_origin_facility",
          "expired",
          "substatus_failure",
          "held",
          "substatus_in_transit",
          "label_created",
          "lost",
          "missorted",
          "substatus_out_for_delivery",
          "received_at_destination_facility",
          "received_at_origin_facility",
          "refused",
          "return",
          "status_update",
          "transferred_to_destination_carrier",
          "transit_exception",
          "substatus_unknown",
          "weather_delay"
        ],
        "type": "string"
      },
      "SocialLinkWebsites": {
        "description": "The different websites you can have social links for",
        "enum": [
          "x",
          "instagram",
          "facebook",
          "tiktok",
          "youtube",
          "linkedin",
          "twitch",
          "website",
          "custom"
        ],
        "type": "string"
      },
      "SpecificFeeOrigins": {
        "description": "The origin of the specific fee",
        "enum": [
          "stripe_domestic_processing_fee",
          "stripe_international_processing_fee",
          "stripe_fixed_processing_fee",
          "stripe_billing_fee",
          "stripe_radar_fee",
          "sales_tax_remittance",
          "sales_tax_remittance_reversal",
          "stripe_sales_tax_fee",
          "whop_processing_fee",
          "marketplace_affiliate_fee",
          "affiliate_fee",
          "crypto_fee",
          "stripe_standard_processing_fee",
          "paypal_fee",
          "stripe_payout_fee",
          "dispute_fee",
          "dispute_alert_fee",
          "apple_processing_fee",
          "buyer_fee",
          "sezzle_processing_fee",
          "splitit_processing_fee",
          "platform_balance_processing_fee",
          "payment_processing_percentage_fee",
          "payment_processing_fixed_fee",
          "cross_border_percentage_fee",
          "fx_percentage_fee",
          "orchestration_percentage_fee",
          "three_ds_fixed_fee",
          "billing_percentage_fee",
          "revshare_percentage_fee",
          "application_fee"
        ],
        "type": "string"
      },
      "Status": {
        "description": "Statuses for resources",
        "enum": [
          "active",
          "archived",
          "deleted"
        ],
        "type": "string"
      },
      "Statuses": {
        "description": "The available bounty statuses to choose from.",
        "enum": [
          "published",
          "archived",
          "scheduled"
        ],
        "type": "string"
      },
      "SupportChannel": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "company_id": {
            "description": "The unique identifier of the company associated with this channel. Null if this is not a support or company-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_user": {
            "description": "The customer who initiated this support conversation. Null if this is not a support chat.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_at": {
            "description": "The timestamp when the linked support ticket was marked as resolved. Null if unresolved or not a support chat.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "custom_name",
          "customer_user",
          "resolved_at",
          "last_message_at"
        ],
        "type": "object"
      },
      "SupportChannelListItem": {
        "description": "A messaging channel that can be a one-on-one DM, group chat, company support conversation, or platform-level direct message.",
        "properties": {
          "company_id": {
            "description": "The unique identifier of the company associated with this channel. Null if this is not a support or company-scoped conversation.",
            "type": [
              "string",
              "null"
            ]
          },
          "custom_name": {
            "description": "A custom display name assigned to this channel by the user. Null if no custom name has been set.",
            "example": "Project Alpha Team",
            "type": [
              "string",
              "null"
            ]
          },
          "customer_user": {
            "description": "The customer who initiated this support conversation. Null if this is not a support chat.",
            "properties": {
              "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",
              "name",
              "username"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the entity",
            "type": "string"
          },
          "last_message_at": {
            "description": "The timestamp when the most recent message was sent in this channel. Null if no messages have been sent.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "resolved_at": {
            "description": "The timestamp when the linked support ticket was marked as resolved. Null if unresolved or not a support chat.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "company_id",
          "custom_name",
          "customer_user",
          "resolved_at",
          "last_message_at"
        ],
        "type": "object"
      },
      "SupportChannelView": {
        "description": "The perspective to filter support channels by.",
        "enum": [
          "all",
          "admin",
          "customer"
        ],
        "type": "string"
      },
      "TaxIdentifierTypes": {
        "description": "The type of tax identifier",
        "enum": [
          "ad_nrt",
          "ao_tin",
          "ar_cuit",
          "al_tin",
          "am_tin",
          "aw_tin",
          "au_abn",
          "au_arn",
          "eu_vat",
          "az_tin",
          "bs_tin",
          "bh_vat",
          "bd_bin",
          "bb_tin",
          "by_tin",
          "bj_ifu",
          "bo_tin",
          "ba_tin",
          "br_cnpj",
          "br_cpf",
          "bg_uic",
          "bf_ifu",
          "kh_tin",
          "cm_niu",
          "ca_bn",
          "ca_gst_hst",
          "ca_pst_bc",
          "ca_pst_mb",
          "ca_pst_sk",
          "ca_qst",
          "cv_nif",
          "cl_tin",
          "cn_tin",
          "co_nit",
          "cd_nif",
          "cr_tin",
          "hr_oib",
          "do_rcn",
          "ec_ruc",
          "eg_tin",
          "sv_nit",
          "et_tin",
          "eu_oss_vat",
          "ge_vat",
          "gh_tin",
          "de_stn",
          "gb_vat",
          "gn_nif",
          "hk_br",
          "hu_tin",
          "is_vat",
          "in_gst",
          "id_npwp",
          "il_vat",
          "jp_cn",
          "jp_rn",
          "jp_trn",
          "kz_bin",
          "ke_pin",
          "kg_tin",
          "la_tin",
          "li_uid",
          "li_vat",
          "my_frp",
          "my_itn",
          "my_sst",
          "mr_nif",
          "mx_rfc",
          "md_vat",
          "me_pib",
          "ma_vat",
          "np_pan",
          "nz_gst",
          "ng_tin",
          "mk_vat",
          "no_vat",
          "no_voec",
          "om_vat",
          "pe_ruc",
          "ph_tin",
          "pl_nip",
          "ro_tin",
          "ru_inn",
          "ru_kpp",
          "sa_vat",
          "sn_ninea",
          "rs_pib",
          "sg_gst",
          "sg_uen",
          "si_tin",
          "za_vat",
          "kr_brn",
          "es_cif",
          "ch_uid",
          "ch_vat",
          "tw_vat",
          "tj_tin",
          "tz_vat",
          "th_vat",
          "tr_tin",
          "ug_tin",
          "ua_vat",
          "ae_trn",
          "us_ein",
          "uy_ruc",
          "uz_tin",
          "uz_vat",
          "ve_rif",
          "vn_tin",
          "zm_tin",
          "zw_tin",
          "sr_fin",
          "xi_vat"
        ],
        "type": "string"
      },
      "TaxTypes": {
        "description": "Whether or not the tax is included in a plan's price (or if it hasn't been set up)",
        "enum": [
          "inclusive",
          "exclusive",
          "unspecified"
        ],
        "type": "string"
      },
      "Topup": {
        "description": "A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.",
        "properties": {
          "created_at": {
            "description": "The datetime the payment was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/Currencies"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_message": {
            "description": "If the payment failed, the reason for the failure.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier for the payment.",
            "example": "pay_xxxxxxxxxxxxxx",
            "type": "string"
          },
          "paid_at": {
            "description": "The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "description": "The total to show to the creator (excluding buyer fees).",
            "example": 6.9,
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "paid_at",
          "currency",
          "total",
          "failure_message"
        ],
        "type": "object"
      },
      "UploadStatuses": {
        "description": "The upload status of a file",
        "enum": [
          "pending",
          "processing",
          "ready",
          "failed"
        ],
        "type": "string"
      },
      "Verification": {
        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
        "properties": {
          "id": {
            "description": "The numeric id of the verification record.",
            "example": "verf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_error_code": {
            "description": "The most recent error code returned during verification. Null if no error has occurred.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationErrorCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_reason": {
            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
            "example": "Document image was too blurry to read.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatuses",
            "description": "The current status of this verification session."
          }
        },
        "required": [
          "id",
          "status",
          "last_error_code",
          "last_error_reason"
        ],
        "type": "object"
      },
      "VerificationErrorCodes": {
        "description": "An error code for a verification attempt.",
        "enum": [
          "abandoned",
          "consent_declined",
          "country_not_supported",
          "device_not_supported",
          "document_expired",
          "document_type_not_supported",
          "document_unverified_other",
          "email_unverified_other",
          "email_verification_declined",
          "id_number_insufficient_document_data",
          "id_number_mismatch",
          "id_number_unverified_other",
          "phone_unverified_other",
          "phone_verification_declined",
          "selfie_document_missing_photo",
          "selfie_face_mismatch",
          "selfie_manipulated",
          "selfie_unverified_other",
          "under_supported_age"
        ],
        "type": "string"
      },
      "VerificationListItem": {
        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
        "properties": {
          "id": {
            "description": "The numeric id of the verification record.",
            "example": "verf_xxxxxxxxxxxxx",
            "type": "string"
          },
          "last_error_code": {
            "description": "The most recent error code returned during verification. Null if no error has occurred.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/VerificationErrorCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error_reason": {
            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
            "example": "Document image was too blurry to read.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VerificationStatuses",
            "description": "The current status of this verification session."
          }
        },
        "required": [
          "id",
          "status",
          "last_error_code",
          "last_error_reason"
        ],
        "type": "object"
      },
      "VerificationStatuses": {
        "description": "A status for a verification.",
        "enum": [
          "requires_input",
          "processing",
          "verified",
          "canceled",
          "created",
          "started",
          "submitted",
          "approved",
          "declined",
          "resubmission_requested",
          "expired",
          "abandoned",
          "review",
          "action_required"
        ],
        "type": "string"
      },
      "Visibility": {
        "description": "Visibility of a resource",
        "enum": [
          "visible",
          "hidden",
          "archived",
          "quick_link"
        ],
        "type": "string"
      },
      "VisibilityFilter": {
        "description": "The different levels of visibility for resources",
        "enum": [
          "visible",
          "hidden",
          "archived",
          "quick_link",
          "all",
          "not_quick_link",
          "not_archived"
        ],
        "type": "string"
      },
      "Webhook": {
        "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
        "properties": {
          "api_version": {
            "$ref": "#/components/schemas/ApiVersion",
            "description": "The API version used to format payloads sent to this webhook endpoint."
          },
          "child_resource_events": {
            "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the webhook was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this webhook endpoint is currently active and receiving events.",
            "type": "boolean"
          },
          "events": {
            "description": "The list of event types this webhook is subscribed to.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the webhook.",
            "example": "hook_xxxxxxxxxxxxx",
            "type": "string"
          },
          "resource_id": {
            "description": "The ID of the resource (company or product) this webhook is attached to.",
            "type": "string"
          },
          "testable_events": {
            "description": "The subset of subscribed event types that support sending test payloads.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "url": {
            "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
            "example": "https://example.com/path",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "enabled",
          "events",
          "api_version",
          "created_at",
          "child_resource_events",
          "testable_events",
          "resource_id"
        ],
        "type": "object"
      },
      "WebhookEvent": {
        "description": "The different event types available",
        "enum": [
          "invoice.created",
          "invoice.marked_uncollectible",
          "invoice.paid",
          "invoice.past_due",
          "invoice.voided",
          "membership.activated",
          "membership.deactivated",
          "membership.trial_ending_soon",
          "entry.created",
          "entry.approved",
          "entry.denied",
          "entry.deleted",
          "setup_intent.requires_action",
          "setup_intent.succeeded",
          "setup_intent.canceled",
          "ledger_account.funds_available",
          "withdrawal.created",
          "withdrawal.updated",
          "course_lesson_interaction.completed",
          "payout_method.created",
          "verification.succeeded",
          "identity_profile.approved",
          "identity_profile.rejected",
          "identity_profile.needs_action",
          "identity_profile.updated",
          "payout_account.status_updated",
          "resolution_center_case.created",
          "resolution_center_case.updated",
          "resolution_center_case.decided",
          "chat.message.created",
          "chat.reaction.created",
          "payment.created",
          "payment.succeeded",
          "payment.failed",
          "payment.pending",
          "dispute.created",
          "dispute.updated",
          "refund.created",
          "refund.updated",
          "dispute_alert.created",
          "membership.cancel_at_period_end_changed"
        ],
        "type": "string"
      },
      "WebhookListItem": {
        "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
        "properties": {
          "api_version": {
            "$ref": "#/components/schemas/ApiVersion",
            "description": "The API version used to format payloads sent to this webhook endpoint."
          },
          "child_resource_events": {
            "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
            "type": "boolean"
          },
          "created_at": {
            "description": "The datetime the webhook was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "enabled": {
            "description": "Whether this webhook endpoint is currently active and receiving events.",
            "type": "boolean"
          },
          "events": {
            "description": "The list of event types this webhook is subscribed to.",
            "items": {
              "$ref": "#/components/schemas/WebhookEvent"
            },
            "type": "array"
          },
          "id": {
            "description": "The unique identifier for the webhook.",
            "example": "hook_xxxxxxxxxxxxx",
            "type": "string"
          },
          "url": {
            "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
            "example": "https://example.com/path",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "enabled",
          "events",
          "api_version",
          "created_at",
          "child_resource_events"
        ],
        "type": "object"
      },
      "WhoCanPostTypes": {
        "description": "Who can post on a chat feed",
        "enum": [
          "everyone",
          "admins"
        ],
        "type": "string"
      },
      "WhoCanReactTypes": {
        "description": "Who can react on a chat feed",
        "enum": [
          "everyone",
          "no_one"
        ],
        "type": "string"
      },
      "Withdrawal": {
        "description": "A withdrawal represents a request to transfer funds from a ledger account to an external payout method.",
        "properties": {
          "amount": {
            "description": "The withdrawal amount as a decimal number in the specified currency (e.g., 100.00 for $100.00 USD).",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the withdrawal was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur')."
          },
          "error_code": {
            "description": "A machine-readable error code describing why the payout failed. Null if no error occurred.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PayoutErrorCodes"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "description": "A human-readable message describing why the payout failed. Null if no error occurred.",
            "example": "Destination bank account is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "estimated_availability": {
            "description": "The estimated time at which the funds become available in the destination account. Null if no estimate is available. As a Unix timestamp.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "fee_amount": {
            "description": "The fee charged for processing this withdrawal, in the same currency as the withdrawal amount.",
            "example": 6.9,
            "type": "number"
          },
          "fee_type": {
            "description": "How the fee was applied to the withdrawal. 'exclusive' means the fee was added on top (user receives the full requested amount). 'inclusive' means the fee was deducted from the withdrawal (user receives less than requested). Null if no fee was charged.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WithdrawalFeeTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the withdrawal.",
            "example": "wdrl_xxxxxxxxxxxxx",
            "type": "string"
          },
          "ledger_account": {
            "description": "The ledger account from which the withdrawal funds are sourced.",
            "properties": {
              "company_id": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "description": "The unique identifier for the ledger account.",
                "example": "ldgr_xxxxxxxxxxxxx",
                "type": "string"
              }
            },
            "required": [
              "id",
              "company_id"
            ],
            "type": "object"
          },
          "markup_fee": {
            "description": "An additional markup fee charged for the withdrawal, in the same currency as the withdrawal amount. Only applies to platform accounts using Whop Rails.",
            "example": 6.9,
            "type": "number"
          },
          "payout_token": {
            "description": "The saved payout destination used for this withdrawal (e.g., a bank account or PayPal address). Null if no payout token was used.",
            "properties": {
              "created_at": {
                "description": "The datetime the payout token was created.",
                "example": "2023-12-01T05:00:00.401Z",
                "format": "date-time",
                "type": "string"
              },
              "destination_currency_code": {
                "description": "The three-letter ISO currency code that payouts are delivered in for this destination.",
                "example": "USD",
                "type": "string"
              },
              "id": {
                "description": "The unique identifier for the payout token.",
                "example": "potk_xxxxxxxxxxxxx",
                "type": "string"
              },
              "nickname": {
                "description": "A user-defined label to help identify this payout destination. Not sent to the provider. Null if no nickname has been set.",
                "example": "My Business Account",
                "type": [
                  "string",
                  "null"
                ]
              },
              "payer_name": {
                "description": "The legal name of the account holder receiving payouts. Null if not provided.",
                "example": "Acme Corp LLC",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "payer_name",
              "nickname",
              "destination_currency_code",
              "created_at"
            ],
            "type": [
              "object",
              "null"
            ]
          },
          "speed": {
            "$ref": "#/components/schemas/WithdrawalSpeeds",
            "description": "The processing speed selected for this withdrawal ('standard' or 'instant')."
          },
          "status": {
            "$ref": "#/components/schemas/WithdrawalStatus",
            "description": "The computed lifecycle status of the withdrawal, accounting for the state of associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed')."
          },
          "trace_code": {
            "description": "The ACH trace number for tracking the payout through the banking network. Null if not available or not an ACH transaction.",
            "example": "021000021234567",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status",
          "amount",
          "currency",
          "fee_amount",
          "fee_type",
          "speed",
          "created_at",
          "markup_fee",
          "ledger_account",
          "payout_token",
          "error_code",
          "error_message",
          "estimated_availability",
          "trace_code"
        ],
        "type": "object"
      },
      "WithdrawalFeeTypes": {
        "description": "The different fee types for a withdrawal.",
        "enum": [
          "exclusive",
          "inclusive"
        ],
        "type": "string"
      },
      "WithdrawalListItem": {
        "description": "A withdrawal represents a request to transfer funds from a ledger account to an external payout method.",
        "properties": {
          "amount": {
            "description": "The withdrawal amount as a decimal number in the specified currency (e.g., 100.00 for $100.00 USD).",
            "example": 6.9,
            "type": "number"
          },
          "created_at": {
            "description": "The datetime the withdrawal was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur')."
          },
          "fee_amount": {
            "description": "The fee charged for processing this withdrawal, in the same currency as the withdrawal amount.",
            "example": 6.9,
            "type": "number"
          },
          "fee_type": {
            "description": "How the fee was applied to the withdrawal. 'exclusive' means the fee was added on top (user receives the full requested amount). 'inclusive' means the fee was deducted from the withdrawal (user receives less than requested). Null if no fee was charged.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WithdrawalFeeTypes"
              },
              {
                "type": "null"
              }
            ]
          },
          "id": {
            "description": "The unique identifier for the withdrawal.",
            "example": "wdrl_xxxxxxxxxxxxx",
            "type": "string"
          },
          "markup_fee": {
            "description": "An additional markup fee charged for the withdrawal, in the same currency as the withdrawal amount. Only applies to platform accounts using Whop Rails.",
            "example": 6.9,
            "type": "number"
          },
          "speed": {
            "$ref": "#/components/schemas/WithdrawalSpeeds",
            "description": "The processing speed selected for this withdrawal ('standard' or 'instant')."
          },
          "status": {
            "$ref": "#/components/schemas/WithdrawalStatus",
            "description": "The computed lifecycle status of the withdrawal, accounting for the state of associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed')."
          }
        },
        "required": [
          "id",
          "status",
          "amount",
          "currency",
          "fee_amount",
          "fee_type",
          "speed",
          "created_at",
          "markup_fee"
        ],
        "type": "object"
      },
      "WithdrawalSpeeds": {
        "description": "The different speeds of withdrawals",
        "enum": [
          "standard",
          "instant"
        ],
        "type": "string"
      },
      "WithdrawalStatus": {
        "description": "The status of a withdrawal request",
        "enum": [
          "requested",
          "awaiting_payment",
          "in_transit",
          "completed",
          "failed",
          "canceled",
          "denied"
        ],
        "type": "string"
      },
      "WorkforceBounty": {
        "description": "A privately accessible bounty.",
        "properties": {
          "bounty_type": {
            "$ref": "#/components/schemas/BountyTypes",
            "description": "The underlying bounty implementation type."
          },
          "created_at": {
            "description": "The datetime the bounty was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The currency used for the bounty funds."
          },
          "description": {
            "description": "The description of the bounty.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the bounty.",
            "example": "bnty_xxxxxxxxxxxxx",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Statuses",
            "description": "The current lifecycle status of the bounty."
          },
          "title": {
            "description": "The title of the bounty.",
            "type": "string"
          },
          "total_available": {
            "description": "The total amount currently funded in the bounty pool for payout.",
            "example": 6.9,
            "type": "number"
          },
          "total_paid": {
            "description": "The total amount paid out for this bounty.",
            "example": 6.9,
            "type": "number"
          },
          "updated_at": {
            "description": "The datetime the bounty was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "vote_threshold": {
            "description": "The number of watcher votes required before the submission can resolve.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "status",
          "total_available",
          "total_paid",
          "currency",
          "bounty_type",
          "vote_threshold",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "WorkforceBountyListItem": {
        "description": "A privately accessible bounty.",
        "properties": {
          "bounty_type": {
            "$ref": "#/components/schemas/BountyTypes",
            "description": "The underlying bounty implementation type."
          },
          "created_at": {
            "description": "The datetime the bounty was created.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currencies",
            "description": "The currency used for the bounty funds."
          },
          "description": {
            "description": "The description of the bounty.",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier for the bounty.",
            "example": "bnty_xxxxxxxxxxxxx",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Statuses",
            "description": "The current lifecycle status of the bounty."
          },
          "title": {
            "description": "The title of the bounty.",
            "type": "string"
          },
          "total_available": {
            "description": "The total amount currently funded in the bounty pool for payout.",
            "example": 6.9,
            "type": "number"
          },
          "total_paid": {
            "description": "The total amount paid out for this bounty.",
            "example": 6.9,
            "type": "number"
          },
          "updated_at": {
            "description": "The datetime the bounty was last updated.",
            "example": "2023-12-01T05:00:00.401Z",
            "format": "date-time",
            "type": "string"
          },
          "vote_threshold": {
            "description": "The number of watcher votes required before the submission can resolve.",
            "example": 42,
            "type": "integer"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "status",
          "total_available",
          "total_paid",
          "currency",
          "bounty_type",
          "vote_threshold",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      }
    },
    "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"
      }
    }
  },
  "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-18"
  },
  "openapi": "3.1.0",
  "paths": {
    "/access_tokens": {
      "post": {
        "description": "Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.",
        "operationId": "createAccessToken",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccessToken",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to generate the token for, starting with 'biz_'. The API key must have permission to access this company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "expires_at": {
                    "description": "The expiration timestamp for the access token. Defaults to 1 hour from now, with a maximum of 3 hours.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scoped_actions": {
                    "description": "An array of permission scopes to grant to the access token. If empty or omitted, all permissions from the authenticating credential are inherited. Must be a subset of the credential's permissions.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to generate the token for, starting with 'user_'. The API key must have permission to access this user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessToken"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Create access token",
        "tags": [
          "Access tokens"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst accessToken = await client.accessTokens.create();\n\nconsole.log(accessToken.token);"
          }
        ]
      }
    },
    "/account_links": {
      "post": {
        "description": "Generate a URL that directs a sub-merchant to their account portal, such as the hosted payouts dashboard or the KYC onboarding flow.",
        "operationId": "createAccountLink",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccountLink",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to generate the link for, starting with 'biz_'. Must be a sub-merchant of the API key's company.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "refresh_url": {
                    "description": "The URL to redirect the user to if the session expires and needs to be re-authenticated, such as 'https://example.com/refresh'.",
                    "type": "string"
                  },
                  "return_url": {
                    "description": "The URL to redirect the user to when they want to return to your site, such as 'https://example.com/return'.",
                    "type": "string"
                  },
                  "use_case": {
                    "$ref": "#/components/schemas/AccountLinkUseCases",
                    "description": "The purpose of the account link, such as hosted payouts portal or hosted KYC onboarding."
                  }
                },
                "required": [
                  "company_id",
                  "refresh_url",
                  "return_url",
                  "use_case"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountLink"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Create account link",
        "tags": [
          "Account links"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst accountLink = await client.accountLinks.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  refresh_url: 'refresh_url',\n  return_url: 'return_url',\n  use_case: 'account_onboarding',\n});\n\nconsole.log(accountLink.expires_at);"
          }
        ]
      }
    },
    "/ad_reports": {
      "get": {
        "description": "Performance report for a company, ad campaigns, ad groups, or ads. Always returns aggregate `summary` totals summed across the scope. Set `granularity` to additionally get a time series, or set `breakdown` (`campaign`/`ad_group`/`ad`) to additionally get per-entity rows inside the requested scope. Exactly one of `companyId`, `adCampaignIds`, `adGroupIds`, or `adIds` must be provided.\n\nRequired permissions:\n - `ad_campaign:stats:read`",
        "operationId": "retrieveAdReport",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "ad_campaign_ids",
            "required": false,
            "schema": {
              "description": "Scope the report to these ad campaigns (max 100); stats are summed across them. Mutually exclusive with `companyId`, `adGroupIds`, and `adIds`.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "ad_group_ids",
            "required": false,
            "schema": {
              "description": "Scope the report to these ad groups (max 100); stats are summed across them. Mutually exclusive with `companyId`, `adCampaignIds`, and `adIds`.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "ad_ids",
            "required": false,
            "schema": {
              "description": "Scope the report to these ads (max 100); stats are summed across them. Mutually exclusive with `companyId`, `adCampaignIds`, and `adGroupIds`.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "breakdown",
            "required": false,
            "schema": {
              "description": "Entity level to break down the report by. When set, `breakdown` on the response contains one row per entity at the requested level inside the requested scope. `ad` returns one row per ad, `ad_group` per ad group, `campaign` per ad campaign. The breakdown level must be at or below the scope (e.g. `adId` cannot be broken down by `campaign`). The `summary` totals are unaffected.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AdReportBreakdownLevels"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a company. Mutually exclusive with `adCampaignIds`, `adGroupIds`, and `adIds`. Use with `breakdown` to fan out across every campaign, ad group, or ad in the company without paging.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "currency",
            "required": false,
            "schema": {
              "description": "ISO 4217 currency code to report `spend` in. Defaults to the company's ads reporting currency.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "from",
            "required": true,
            "schema": {
              "description": "Inclusive start of the reporting window.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "description": "Bucket grain for the per-bucket `granularity` time series. Omit (`null`) for summary-only. `hourly`/`daily` max 90 days, `weekly` max 366 days, `monthly` max 4 years. The `summary` totals are unaffected. With `breakdown`, each row gets its own series at the same grain.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Granularities"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "to",
            "required": true,
            "schema": {
              "description": "Inclusive end of the reporting window.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdReport"
                }
              }
            },
            "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": [
              "ad_campaign:stats:read"
            ]
          }
        ],
        "summary": "Retrieve ad report",
        "tags": [
          "Ad reports"
        ],
        "x-group-title": "Ads",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst adReport = await client.adReports.retrieve({\n  from: '2023-12-01T05:00:00.401Z',\n  to: '2023-12-01T05:00:00.401Z',\n});\n\nconsole.log(adReport.breakdown);"
          }
        ]
      }
    },
    "/affiliates": {
      "get": {
        "description": "Returns a paginated list of affiliates for the actor in context, with optional filtering by status, search, and sorting.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "listAffiliate",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list affiliates for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to sort results by.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AffiliatesSortableColumns"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search affiliates by username.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter by affiliate status (active or archived).",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Status"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Affiliate.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AffiliateListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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:basic:read"
            ]
          }
        ],
        "summary": "List affiliates",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const affiliateListResponse of client.affiliates.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(affiliateListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates or finds an affiliate for a company and user.\n\nRequired permissions:\n - `affiliate:create`",
        "operationId": "createAffiliate",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAffiliateRecord",
                "properties": {
                  "company_id": {
                    "description": "The ID of the company to create the affiliate for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "user_identifier": {
                    "description": "The user identifier (username, email, user ID, or Discord ID).",
                    "type": "string"
                  }
                },
                "required": [
                  "company_id",
                  "user_identifier"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Affiliate"
                }
              }
            },
            "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:create"
            ]
          }
        ],
        "summary": "Create affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst affiliate = await client.affiliates.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  user_identifier: 'user_identifier',\n});\n\nconsole.log(affiliate.id);"
          }
        ]
      }
    },
    "/affiliates/{id}": {
      "get": {
        "description": "Retrieves the details of an existing affiliate.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "retrieveAffiliate",
        "parameters": [
          {
            "description": "The unique identifier of the affiliate.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Affiliate"
                }
              }
            },
            "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:basic:read"
            ]
          }
        ],
        "summary": "Retrieve affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst affiliate = await client.affiliates.retrieve('aff_xxxxxxxxxxxxxx');\n\nconsole.log(affiliate.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/archive": {
      "post": {
        "description": "Archives an existing Affiliate\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "archiveAffiliate",
        "parameters": [
          {
            "description": "The internal ID of the affiliate to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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"
            ]
          }
        ],
        "summary": "Archive affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.affiliates.archive('aff_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/affiliates/{id}/overrides": {
      "get": {
        "description": "Returns a paginated list of overrides for an affiliate.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "listOverridesAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "override_type",
            "required": false,
            "schema": {
              "description": "Filter by override type (standard or rev_share).",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AffiliateOverrideRoles"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AffiliateOverride.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "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"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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:basic:read"
            ]
          }
        ],
        "summary": "List overrides",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const overrideListResponse of client.affiliates.overrides.list('aff_xxxxxxxxxxxxxx')) {\n  console.log(overrideListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a commission override for an affiliate.\n\nRequired permissions:\n - `affiliate:create`",
        "operationId": "createOverrideAffiliate",
        "parameters": [
          {
            "description": "The affiliate ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAffiliateOverride",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateAffiliateOverride",
                    "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).",
                        "example": 6.9,
                        "type": "number"
                      },
                      "id": {
                        "description": "The affiliate ID.",
                        "type": "string"
                      },
                      "override_type": {
                        "const": "standard",
                        "type": "string"
                      },
                      "plan_id": {
                        "description": "The plan ID (required for standard overrides).",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "commission_value",
                      "id",
                      "override_type",
                      "plan_id"
                    ],
                    "title": "CreateAffiliateOverrideInputOverrideTypeStandard",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateAffiliateOverride",
                    "properties": {
                      "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).",
                        "example": 6.9,
                        "type": "number"
                      },
                      "id": {
                        "description": "The affiliate ID.",
                        "type": "string"
                      },
                      "override_type": {
                        "const": "rev_share",
                        "type": "string"
                      },
                      "product_id": {
                        "description": "The product ID (for rev-share overrides, omit for company-wide).",
                        "example": "prod_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "revenue_basis": {
                        "description": "The revenue calculation basis for rev-share overrides. Defaults to post_fees.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/AffiliateRevenueBases"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "commission_value",
                      "id",
                      "override_type"
                    ],
                    "title": "CreateAffiliateOverrideInputOverrideTypeRevShare",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "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:create"
            ]
          }
        ],
        "summary": "Create override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.create('aff_xxxxxxxxxxxxxx', {\n  id: 'id',\n  commission_value: 6.9,\n  override_type: 'standard',\n  plan_id: 'plan_xxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/overrides/{override_id}": {
      "delete": {
        "description": "Deletes an affiliate override.\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "deleteOverrideAffiliate",
        "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"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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"
            ]
          }
        ],
        "summary": "Delete override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.delete('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of a specific affiliate override.\n\nRequired permissions:\n - `affiliate:basic:read`",
        "operationId": "retrieveOverrideAffiliate",
        "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"
            }
          }
        ],
        "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:basic:read"
            ]
          }
        ],
        "summary": "Retrieve override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.retrieve('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      },
      "patch": {
        "description": "Updates an existing affiliate override.\n\nRequired permissions:\n - `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"
            ]
          }
        ],
        "summary": "Update override",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst override = await client.affiliates.overrides.update('override_id', {\n  id: 'aff_xxxxxxxxxxxxxx',\n});\n\nconsole.log(override.id);"
          }
        ]
      }
    },
    "/affiliates/{id}/unarchive": {
      "post": {
        "description": "Unarchives an existing Affiliate\n\nRequired permissions:\n - `affiliate:update`",
        "operationId": "unarchiveAffiliate",
        "parameters": [
          {
            "description": "The internal ID of the affiliate to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aff_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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"
            ]
          }
        ],
        "summary": "Unarchive affiliate",
        "tags": [
          "Affiliates"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.affiliates.unarchive('aff_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/ai_chats": {
      "get": {
        "description": "Returns a paginated list of AI chat threads for the current authenticated user.",
        "operationId": "listAiChat",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "only_active_crons",
            "required": false,
            "schema": {
              "description": "When true, returns only chats with an active cron schedule",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AiChat.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AiChatListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": []
          }
        ],
        "summary": "List ai chats",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const aiChatListResponse of client.aiChats.list()) {\n  console.log(aiChatListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new AI chat thread and send the first message to the AI agent.\n\nRequired permissions:\n - `ai_chat:create`",
        "operationId": "createAiChat",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAiChat",
                "properties": {
                  "current_company_id": {
                    "description": "The unique identifier of the company to set as context for the AI chat (e.g., \"biz_XXXXX\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "message_attachments": {
                    "description": "A list of previously uploaded file attachments to include with the first message.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "message_source": {
                    "description": "The source of the message.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AiChatMessageSourceTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "message_text": {
                    "description": "The text content of the first message to send to the AI agent.",
                    "type": "string"
                  },
                  "suggestion_type": {
                    "description": "The type of suggestion prompt that was clicked, when message_source is 'suggestion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "An optional display title for the AI chat thread (e.g., \"Help with billing\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "message_text"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "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": [
              "ai_chat:create"
            ]
          }
        ],
        "summary": "Create ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.create({ message_text: 'message_text' });\n\nconsole.log(aiChat.id);"
          }
        ]
      }
    },
    "/ai_chats/{id}": {
      "delete": {
        "description": "Delete an AI chat thread so it no longer appears in the user's chat list.\n\nRequired permissions:\n - `ai_chat:delete`",
        "operationId": "deleteAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to delete (e.g., \"ai_chat_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "ai_chat:delete"
            ]
          }
        ],
        "summary": "Delete ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.delete('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing AI chat.",
        "operationId": "retrieveAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Retrieve ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.retrieve('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat.id);"
          }
        ]
      },
      "patch": {
        "description": "Update an AI chat's title, notification preferences, or associated company context.\n\nRequired permissions:\n - `ai_chat:update`",
        "operationId": "updateAiChat",
        "parameters": [
          {
            "description": "The unique identifier of the AI chat to update (e.g., \"ai_chat_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "aich_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAiChat",
                "properties": {
                  "current_company_id": {
                    "description": "The unique identifier of the company to set as context for the AI chat (e.g., \"biz_XXXXX\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notification_preference": {
                    "description": "The notification preference for the AI chat.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AiChatNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "title": {
                    "description": "The new display title for the AI chat thread (e.g., \"Help with billing\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiChat"
                }
              }
            },
            "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": [
              "ai_chat:update"
            ]
          }
        ],
        "summary": "Update ai chat",
        "tags": [
          "Ai chats"
        ],
        "x-group-title": "AI",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst aiChat = await client.aiChats.update('aich_xxxxxxxxxxxxx');\n\nconsole.log(aiChat.id);"
          }
        ]
      }
    },
    "/app_builds": {
      "get": {
        "description": "Returns a paginated list of build artifacts for a given app, with optional filtering by platform, status, and creation date.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "listAppBuild",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "app_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the app to list builds for.",
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "description": "Filter builds by target platform.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AppBuildPlatforms"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter builds by review status.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AppBuildStatuses"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return builds created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return builds created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AppBuild.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AppBuildListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "List app builds",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const appBuildListResponse of client.appBuilds.list({ app_id: 'app_xxxxxxxxxxxxxx' })) {\n  console.log(appBuildListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Upload a new build artifact for an app. The build must include a compiled code bundle for the specified platform.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "createAppBuild",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAppBuild",
                "properties": {
                  "ai_prompt_id": {
                    "description": "The identifier of the AI prompt that generated this build, if applicable.",
                    "example": "prmt_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "app_id": {
                    "description": "The unique identifier of the app to create the build for. Defaults to the app associated with the current API key.",
                    "example": "app_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "attachment": {
                    "description": "The build file to upload. For iOS and Android, this should be a .zip archive containing a main_js_bundle.hbc file and an optional assets folder. For web, this should be a JavaScript file or a .zip archive of the hosted site.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": "object"
                  },
                  "checksum": {
                    "description": "A client-generated checksum of the build file, used to verify file integrity when unpacked on a device.",
                    "type": "string"
                  },
                  "platform": {
                    "$ref": "#/components/schemas/AppBuildPlatforms",
                    "description": "The target platform for the build. Accepted values: ios, android, web."
                  },
                  "source_attachment": {
                    "description": "An optional compressed archive (.zip or .gz) of the source code that produced this build, stored alongside the build so it can be downloaded later.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "supported_app_view_types": {
                    "description": "The view types this build supports. A build can support multiple view types but should only list the ones its code implements.",
                    "items": {
                      "$ref": "#/components/schemas/AppViewTypes"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  }
                },
                "required": [
                  "attachment",
                  "checksum",
                  "platform"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "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": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Create app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.create({\n  attachment: { id: 'id' },\n  checksum: 'checksum',\n  platform: 'ios',\n});\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/app_builds/{id}": {
      "get": {
        "description": "Retrieves the details of an existing app build.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "retrieveAppBuild",
        "parameters": [
          {
            "description": "The unique identifier of the app build to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "apbu_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "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": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Retrieve app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.retrieve('apbu_xxxxxxxxxxxxx');\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/app_builds/{id}/promote": {
      "post": {
        "description": "Promote an approved or draft app build to production so it becomes the active version served to users.\n\nRequired permissions:\n - `developer:manage_builds`",
        "operationId": "promoteAppBuild",
        "parameters": [
          {
            "description": "The unique identifier of the app build to promote to production, starting with 'abld_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "apbu_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppBuild"
                }
              }
            },
            "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": [
              "developer:manage_builds"
            ]
          }
        ],
        "summary": "Promote app build",
        "tags": [
          "App builds"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst appBuild = await client.appBuilds.promote('apbu_xxxxxxxxxxxxx');\n\nconsole.log(appBuild.id);"
          }
        ]
      }
    },
    "/apps": {
      "get": {
        "description": "Returns a paginated list of apps on the Whop platform, with optional filtering by company, type, view support, and search query.",
        "operationId": "listApp",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "app_type",
            "required": false,
            "schema": {
              "description": "Filter apps by the type of end-user they are built for, such as consumer or business.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AppTypes"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Filter apps to only those created by this company, starting with 'biz_'.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Accepted values: asc, desc.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to sort apps by. Defaults to discoverable_at descending, showing the most recently published apps first.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AppOrder"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "A search string to filter apps by name, such as 'chat' or 'analytics'.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "verified_apps_only",
            "required": false,
            "schema": {
              "description": "Whether to only return apps that have been verified by Whop. Useful for populating a featured apps section.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "view_type",
            "required": false,
            "schema": {
              "description": "Filter apps to only those supporting a specific view type, such as 'dashboard' or 'hub'.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AppViewTypes"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicApp.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AppListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": []
          }
        ],
        "summary": "List apps",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const appListResponse of client.apps.list()) {\n  console.log(appListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Register a new app on the Whop developer platform. Apps provide custom experiences that can be added to products.\n\nRequired permissions:\n - `developer:create_app`\n - `developer:manage_api_key`\n - `developer:update_app`",
        "operationId": "createApp",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateApp",
                "properties": {
                  "base_url": {
                    "description": "The base production URL where the app is hosted, such as 'https://myapp.example.com'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The unique identifier of the company to create the app for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "icon": {
                    "description": "The icon image for the app in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name for the app, shown to users on the app store and product pages.",
                    "type": "string"
                  },
                  "redirect_uris": {
                    "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The unique subdomain route where the app's hosted web builds are served, such as 'myapp' for myapp.whop.app.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "company_id",
                  "name"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "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": [
              "developer:create_app",
              "developer:manage_api_key",
              "developer:update_app"
            ]
          }
        ],
        "summary": "Create app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst app = await client.apps.create({ company_id: 'biz_xxxxxxxxxxxxxx', name: 'name' });\n\nconsole.log(app.id);"
          }
        ]
      }
    },
    "/apps/{id}": {
      "get": {
        "description": "Retrieves the details of an existing app.\n\nRequired permissions:\n - `developer:manage_api_key`\n - `developer:update_app`",
        "operationId": "retrieveApp",
        "parameters": [
          {
            "description": "The unique identifier of the app to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "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": [
              "developer:manage_api_key",
              "developer:update_app"
            ]
          }
        ],
        "summary": "Retrieve app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst app = await client.apps.retrieve('app_xxxxxxxxxxxxxx');\n\nconsole.log(app.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the settings, metadata, or status of an existing app on the Whop developer platform.\n\nRequired permissions:\n - `developer:update_app`\n - `developer:manage_api_key`",
        "operationId": "updateApp",
        "parameters": [
          {
            "description": "The unique identifier of the app to update, starting with 'app_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "app_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateApp",
                "properties": {
                  "app_store_description": {
                    "description": "The detailed description shown on the app store's in-depth app view page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "app_type": {
                    "description": "The type of end-user the app is built for, such as consumer or business.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "base_url": {
                    "description": "The base production URL where the app is hosted, such as 'https://myapp.example.com'.",
                    "example": "https://example.com/path",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "dashboard_path": {
                    "description": "The URL path for the company dashboard view of the app, such as '/dashboard'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A short description of the app shown in listings and search results.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "discover_path": {
                    "description": "The URL path for the discover view of the app, such as '/discover'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_path": {
                    "description": "The URL path for the member-facing hub view of the app, such as '/experiences/[experienceId]'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "icon": {
                    "description": "The icon image for the app, used in listings and navigation.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name for the app, shown to users on the app store and product pages.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "oauth_client_type": {
                    "description": "How this app authenticates at the OAuth token endpoint.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppOauthClientTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "openapi_path": {
                    "description": "The URL path to the OpenAPI spec file of the app, such as '/assets/openapi.json'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_uris": {
                    "description": "The whitelisted OAuth callback URLs that users are redirected to after authorizing the app",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "required_scopes": {
                    "description": "The permission scopes the app will request from users when they install it.",
                    "items": {
                      "$ref": "#/components/schemas/AppValidScopes"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The unique subdomain route where the app's hosted web builds are served, such as 'myapp' for myapp.whop.app.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "secrets": {
                    "additionalProperties": true,
                    "description": "Secrets to add or overwrite on the app, as an object of string values (e.g. {\"MAIL_API_KEY\": \"...\"}). Keys not included are left untouched. Pass null or an empty string as the value to delete a secret. Secrets are encrypted at rest and injected into the app's hosted server runtime as environment bindings.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "skills_path": {
                    "description": "The URL path to the skills directory of the app, such as '/assets/skills/'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "status": {
                    "description": "Controls the app's visibility. Set to 'live' to publish on Whop discovery (requires name, icon, and description). Set to 'unlisted' to hide from discovery while keeping the app accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/AppStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/App"
                }
              }
            },
            "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": [
              "developer:update_app",
              "developer:manage_api_key"
            ]
          }
        ],
        "summary": "Update app",
        "tags": [
          "Apps"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst app = await client.apps.update('app_xxxxxxxxxxxxxx');\n\nconsole.log(app.id);"
          }
        ]
      }
    },
    "/authorized_users": {
      "get": {
        "description": "Returns a paginated list of authorized team members for a company, with optional filtering by user, role, and creation date.\n\nRequired permissions:\n - `company:authorized_user:read`\n - `member:email:read`",
        "operationId": "listAuthorizedUser",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list authorized users for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter results to a specific user to check if they are an authorized team member.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "description": "Filter authorized users by their assigned role within the company.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AuthorizedUserRoles"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return authorized users created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return authorized users created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for AuthorizedUser.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/AuthorizedUserListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "company:authorized_user:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List authorized users",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const authorizedUserListResponse of client.authorizedUsers.list()) {\n  console.log(authorizedUserListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add a new authorized user to a company.\n\nRequired permissions:\n - `authorized_user:create`\n - `member:email:read`",
        "operationId": "createAuthorizedUser",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAuthorizedUser",
                "properties": {
                  "company_id": {
                    "description": "The ID of the company to add the authorized user to.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "elevation": {
                    "description": "Re-authentication proof required to perform this sensitive action.",
                    "properties": {
                      "authenticator_data": {
                        "description": "The WebAuthn authenticator data (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "client_data_json": {
                        "description": "The WebAuthn client data JSON (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "credential_id": {
                        "description": "The WebAuthn credential ID (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_code": {
                        "description": "The 6-digit code emailed to the user.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "signature": {
                        "description": "The WebAuthn signature (base64).",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "totp_code": {
                        "description": "The 6-digit code from the authenticator app or SMS.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "use_finance_session": {
                        "description": "Reuse an existing elevated session (for SMS/email 2FA users).",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "role": {
                    "$ref": "#/components/schemas/AuthorizedUserRoles",
                    "description": "The role to assign to the authorized user within the company. Supported roles: 'moderator', 'sales_manager'."
                  },
                  "send_emails": {
                    "description": "Whether to send notification emails to the user on creation.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The ID of the user to add as an authorized user.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "company_id",
                  "role",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizedUser"
                }
              }
            },
            "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": [
              "authorized_user:create",
              "member:email:read"
            ]
          }
        ],
        "summary": "Create authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  role: 'owner',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(authorizedUser.id);"
          }
        ]
      }
    },
    "/authorized_users/{id}": {
      "delete": {
        "description": "Remove an authorized user from a company.\n\nRequired permissions:\n - `authorized_user:delete`",
        "operationId": "deleteAuthorizedUser",
        "parameters": [
          {
            "description": "The ID of the authorized user or user to remove.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ausr_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The ID of the company the authorized user belongs to. Optional if the authorized user ID is provided.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "authorized_user:delete"
            ]
          }
        ],
        "summary": "Delete authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.delete('ausr_xxxxxxxxxxxxx');\n\nconsole.log(authorizedUser);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing authorized user.\n\nRequired permissions:\n - `company:authorized_user:read`\n - `member:email:read`",
        "operationId": "retrieveAuthorizedUser",
        "parameters": [
          {
            "description": "The unique identifier of the authorized user to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ausr_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizedUser"
                }
              }
            },
            "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": [
              "company:authorized_user:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve authorized user",
        "tags": [
          "Authorized users"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst authorizedUser = await client.authorizedUsers.retrieve('ausr_xxxxxxxxxxxxx');\n\nconsole.log(authorizedUser.id);"
          }
        ]
      }
    },
    "/bounties": {
      "get": {
        "description": "Returns a paginated list of workforce bounties. When experienceId is provided, returns bounties scoped to that experience. When omitted, returns bounties with no experience.",
        "operationId": "listBounty",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": false,
            "schema": {
              "description": "The experience to list bounties for. When omitted, returns bounties with no experience.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter bounties by status.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Statuses"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "Sort direction. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Bounty.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/WorkforceBountyListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": []
          }
        ],
        "summary": "List bounties",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const bountyListItem of client.bounties.list()) {\n  console.log(bountyListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new workforce bounty by funding a dedicated bounty pool.\n\nRequired permissions:\n - `bounty:create`",
        "operationId": "createBounty",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateWorkforceBounty",
                "properties": {
                  "accepted_submissions_limit": {
                    "description": "The number of submissions that can be approved before the bounty closes. Defaults to 1. The total pool (base_unit_amount times this limit) must be at least 5 in the bounty's currency.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "allowed_country_codes": {
                    "description": "The ISO3166 country codes where this bounty should be visible. Empty means globally visible.",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "base_unit_amount": {
                    "description": "The amount paid to each approved submission. The total bounty pool funded is this amount times accepted_submissions_limit, and must be at least 5 in the bounty's currency.",
                    "example": 6.9,
                    "type": "number"
                  },
                  "business_goal_type": {
                    "description": "What the poster is trying to accomplish with this bounty. Product taxonomy, distinct from the implementation type.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/BusinessGoalTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The currency for the bounty pool funding amount."
                  },
                  "description": {
                    "description": "The description of the bounty.",
                    "type": "string"
                  },
                  "experience_id": {
                    "description": "An optional experience to scope the bounty to.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "minimum_total_verified_clip_duration_seconds": {
                    "description": "Data capture bounties only: the minimum total server-verified clip duration in seconds. Defaults to 3600 and must be a whole number of hours between 1 and 12.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "origin_account_id": {
                    "description": "The user (user_*) or company (biz_*) tag whose balance funds this bounty pool. Defaults to the requester's personal balance when omitted. The requester must be the user themself or an owner/admin of the company.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "post_markdown_content": {
                    "description": "Optional markdown body for the anchor forum post. Falls back to the bounty description when omitted.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "post_title": {
                    "description": "Optional title for the anchor forum post. Falls back to the bounty title when omitted.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheduled_frequency": {
                    "description": "How often a scheduled bounty republishes. Only applies when scheduled_publish_at is provided.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ScheduleFrequencies"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "scheduled_publish_at": {
                    "description": "When to publish the bounty. When provided, the bounty is created as a hidden draft and published at this time instead of immediately. Must be in the future.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "scheduled_timezone": {
                    "description": "The IANA timezone used for recurring occurrences. Required when scheduled_publish_at is provided.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The title of the bounty.",
                    "type": "string"
                  }
                },
                "required": [
                  "base_unit_amount",
                  "currency",
                  "description",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkforceBounty"
                }
              }
            },
            "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": [
              "bounty:create"
            ]
          }
        ],
        "summary": "Create bounty",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.create({\n  description: 'description',\n  gross_reward_amount: 0,\n  title: 'title',\n});\n\nconsole.log(bounty.id);"
          }
        ]
      }
    },
    "/bounties/{id}": {
      "get": {
        "description": "Retrieves a workforce bounty for the current authenticated user.",
        "operationId": "retrieveBounty",
        "parameters": [
          {
            "description": "The unique identifier of the workforce bounty to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "bnty_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkforceBounty"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Retrieve bounty",
        "tags": [
          "Bounties"
        ],
        "x-group-title": "Bounties",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst bounty = await client.bounties.retrieve('id');\n\nconsole.log(bounty.id);"
          }
        ]
      }
    },
    "/card_transactions": {
      "get": {
        "description": "Returns a paginated list of card transactions for a company.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "listCardTransaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "card_id",
            "required": false,
            "schema": {
              "description": "Filter transactions to a specific card.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The company to list card transactions for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return transactions created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return transactions created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "Sort direction for results.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter by transaction lifecycle status.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CardIssuingTransactionStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicCardTransaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CardTransactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "List card transactions",
        "tags": [
          "Card transactions"
        ],
        "x-group-title": "Cards"
      }
    },
    "/card_transactions/{id}": {
      "get": {
        "description": "Retrieves a single card transaction by ID.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrieveCardTransaction",
        "parameters": [
          {
            "description": "The card transaction ID (citx_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardTransaction"
                }
              }
            },
            "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": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve card transaction",
        "tags": [
          "Card transactions"
        ],
        "x-group-title": "Cards"
      }
    },
    "/chat_channels": {
      "get": {
        "description": "Returns a paginated list of chat channels within a specific company, with optional filtering by product.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "listChatChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list chat channels for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a product to filter by. When set, only chat channels connected to this product are returned.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ChatFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ChatChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "List chat channels",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatChannelListResponse of client.chatChannels.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(chatChannelListResponse.id);\n}"
          }
        ]
      }
    },
    "/chat_channels/{id}": {
      "get": {
        "description": "Retrieves the details of an existing chat channel.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "retrieveChatChannel",
        "parameters": [
          {
            "description": "The unique identifier of the chat channel or experience to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChannel"
                }
              }
            },
            "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "Retrieve chat channel",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatChannel = await client.chatChannels.retrieve('id');\n\nconsole.log(chatChannel.id);"
          }
        ]
      },
      "patch": {
        "description": "Update moderation settings for a chat channel, such as who can post, banned words, and media restrictions.\n\nRequired permissions:\n - `chat:moderate`",
        "operationId": "updateChatChannel",
        "parameters": [
          {
            "description": "The unique identifier of the chat channel to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a chat channel ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateChatChannel",
                "properties": {
                  "ban_media": {
                    "description": "Whether media uploads such as images and videos are banned in this chat channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "ban_urls": {
                    "description": "Whether URLs and links are banned from being posted in this chat channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "banned_words": {
                    "description": "A list of words that are automatically blocked from messages in this chat channel. For example, ['spam', 'scam'].",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "user_posts_cooldown_seconds": {
                    "description": "The minimum number of seconds a user must wait between sending messages in this chat channel.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "who_can_post": {
                    "description": "Controls which roles are allowed to send messages in this chat channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WhoCanPostTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_react": {
                    "description": "Controls which roles are allowed to add reactions to messages in this chat channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/WhoCanReactTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatChannel"
                }
              }
            },
            "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": [
              "chat:moderate"
            ]
          }
        ],
        "summary": "Update chat channel",
        "tags": [
          "Chat channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst chatChannel = await client.chatChannels.update('id');\n\nconsole.log(chatChannel.id);"
          }
        ]
      }
    },
    "/checkout_configurations": {
      "get": {
        "description": "Returns a paginated list of checkout configurations for a company, with optional filtering by plan and creation date.\n\nRequired permissions:\n - `checkout_configuration:basic:read`",
        "operationId": "listCheckoutConfiguration",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list checkout configurations for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_id",
            "required": false,
            "schema": {
              "description": "Filter checkout configurations to only those associated with this plan identifier.",
              "example": "plan_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return checkout configurations created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return checkout configurations created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CheckoutSession.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CheckoutConfigurationListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "List checkout configurations",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list({\n  company_id: 'company_id',\n})) {\n  console.log(checkoutConfigurationListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a new checkout configuration\n\nRequired permissions:\n - `checkout_configuration:create`\n - `plan:create`\n - `access_pass:create`\n - `access_pass:update`\n - `checkout_configuration:basic:read`",
        "operationId": "createCheckoutConfiguration",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCheckoutSession",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "affiliate_code": {
                        "description": "An affiliate tracking code to attribute the checkout to a specific affiliate.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "payment",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes to create a new plan inline for this checkout configuration.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "application_fee_amount": {
                            "description": "The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "company_id": {
                            "description": "The company the plan should be created for.",
                            "example": "biz_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The respective currency identifier for the plan."
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires (for expiration-based plans). For example, 365 for a one-year access pass.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "force_create_new_plan": {
                            "description": "Whether to force the creation of a new plan even if one with the same attributes already exists.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "image": {
                            "description": "An image for the plan. This will be visible on the product page to customers.",
                            "properties": {
                              "id": {
                                "description": "The ID of an existing file object.",
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "title": "FileInputWithId",
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Provided as a number in dollars (e.g., 10.00 for $10.00).",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "override_tax_type": {
                            "description": "An override for tax to specify for this specific plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "product": {
                            "description": "Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.",
                            "properties": {
                              "collect_shipping_address": {
                                "description": "Whether or not to collect shipping information at checkout from the customer.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "custom_statement_descriptor": {
                                "description": "The custom statement descriptor for the product i.e. WHOP*SPORTS, must be between 5 and 22 characters, contain at least one letter, and not contain any of the following characters: <, >, \\, ', \"",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "A written description of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_identifier": {
                                "description": "A unique ID used to find or create a product. When provided during creation, we will look for an existing product with this external identifier — if found, it will be updated; otherwise, a new product will be created.",
                                "type": "string"
                              },
                              "global_affiliate_percentage": {
                                "description": "The percentage of the revenue that goes to the global affiliate program.",
                                "example": 6.9,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "global_affiliate_status": {
                                "description": "The status of the global affiliate program for this product.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headline": {
                                "description": "The headline of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_tax_code_id": {
                                "description": "The ID of the product tax code to apply to this product.",
                                "example": "ptc_xxxxxxxxxxxxxx",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect_purchase_url": {
                                "description": "The URL to redirect the customer to after a purchase.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "route": {
                                "description": "The route of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "The title of the product.",
                                "type": "string"
                              },
                              "visibility": {
                                "description": "This product will/will not be displayed publicly - default hidden.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/Visibility"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "external_identifier",
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product the plan is related to. Either this or product is required.",
                            "example": "prod_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Provided as a number in dollars (e.g., 9.99 for $9.99/period).",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "split_pay_required_payments": {
                            "description": "The number of payments required before pausing the subscription.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase. If not provided, stock is unlimited.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the plan. This will be visible on the product page to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "company_id",
                          "currency"
                        ],
                        "type": "object"
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "plan"
                    ],
                    "title": "CreateCheckoutSessionInputModePaymentWithPlan",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "affiliate_code": {
                        "description": "An affiliate tracking code to attribute the checkout to a specific affiliate.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "payment",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan_id": {
                        "description": "The unique identifier of an existing plan to use for this checkout configuration.",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "plan_id"
                    ],
                    "title": "CreateCheckoutSessionInputModePaymentWithPlanId",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCheckoutSession",
                    "properties": {
                      "checkout_styling": {
                        "description": "Checkout styling overrides for this session. Overrides plan and company defaults.",
                        "properties": {
                          "background_color": {
                            "description": "A hex color code for the checkout page background, applied to the order summary panel (e.g. #F4F4F5).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "border_style": {
                            "description": "The border style for buttons and inputs.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutShapes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "button_color": {
                            "description": "A hex color code for the button color (e.g. #FF5733).",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "font_family": {
                            "description": "The font family for the checkout page.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CheckoutFonts"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create the checkout configuration for. Only required in setup mode.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "currency": {
                        "description": "The currency for the checkout when in setup mode. Controls which currency-specific payment methods are available. Defaults to USD when in setup mode.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom key-value metadata to attach to the checkout configuration.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "mode": {
                        "const": "setup",
                        "type": "string"
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the checkout session. Only applies to setup mode. If not provided, the platform or company defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "redirect_url": {
                        "description": "The URL to redirect the user to after checkout is completed.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "three_ds_level": {
                        "description": "The 3D Secure behavior to apply when collecting a payment method. Only applies to setup mode; in payment mode the plan's 3D Secure behavior is used.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanThreeDsLevels"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "mode",
                      "company_id"
                    ],
                    "title": "CreateCheckoutSessionInputModeSetup",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutConfiguration"
                }
              }
            },
            "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": [
              "checkout_configuration:create",
              "plan:create",
              "access_pass:create",
              "access_pass:update",
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "Create checkout configuration",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst checkoutConfiguration = await client.checkoutConfigurations.create();\n\nconsole.log(checkoutConfiguration.id);"
          }
        ]
      }
    },
    "/checkout_configurations/{id}": {
      "get": {
        "description": "Retrieves the details of an existing checkout configuration.\n\nRequired permissions:\n - `checkout_configuration:basic:read`",
        "operationId": "retrieveCheckoutConfiguration",
        "parameters": [
          {
            "description": "The unique identifier of the checkout configuration.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ch_xxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutConfiguration"
                }
              }
            },
            "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": [
              "checkout_configuration:basic:read"
            ]
          }
        ],
        "summary": "Retrieve checkout configuration",
        "tags": [
          "Checkout configurations"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst checkoutConfiguration = await client.checkoutConfigurations.retrieve('id');\n\nconsole.log(checkoutConfiguration.id);"
          }
        ]
      }
    },
    "/companies": {
      "get": {
        "description": "Returns a paginated list of companies. When parent_company_id is provided, lists connected accounts under that platform. When omitted, lists companies the current user has access to.\n\nRequired permissions:\n - `company:basic:read`",
        "operationId": "listCompany",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "parent_company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the parent platform company. When provided, lists connected accounts under that platform. Omit to list the current user's own companies.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return companies created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return companies created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicCompany.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CompanyListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "company:basic:read"
            ]
          }
        ],
        "summary": "List companies",
        "tags": [
          "Companies"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const companyListResponse of client.companies.list()) {\n  console.log(companyListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new company. Pass parent_company_id to create a connected account under a platform, or omit it to create a company for the current user.\n\nRequired permissions:\n - `company:create`\n - `company:basic:read`",
        "operationId": "createCompany",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCompany",
                "properties": {
                  "country": {
                    "description": "The country the company is located in. Defaults to the parent company's country for connected accounts, or the owner's IP-derived country.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Countries"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "description": {
                    "description": "A promotional pitch displayed to potential customers on the company's store page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email": {
                    "description": "The email address of the user who will own the connected account. Required when parent_company_id is provided.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "The company's logo image. Accepts PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A key-value JSON object of custom metadata to store on the company.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "parent_company_id": {
                    "description": "The unique identifier of the parent platform company. When provided, creates a connected account under that platform. Omit to create a company for the current user.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_customer_emails": {
                    "description": "Whether Whop sends transactional emails to customers on behalf of this company. Only applies when creating a connected account.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the company shown to customers.",
                    "type": "string"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            },
            "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": [
              "company:create",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Create company",
        "tags": [
          "Companies"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst company = await client.companies.create({ title: 'title' });\n\nconsole.log(company.id);"
          }
        ]
      }
    },
    "/companies/{id}": {
      "get": {
        "description": "Retrieves the details of an existing company.\n\nRequired permissions:\n - `company:basic:read`",
        "operationId": "retrieveCompany",
        "parameters": [
          {
            "description": "The unique identifier or route slug of the company.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            },
            "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": [
              "company:basic:read"
            ]
          }
        ],
        "summary": "Retrieve company",
        "tags": [
          "Companies"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst company = await client.companies.retrieve('biz_xxxxxxxxxxxxxx');\n\nconsole.log(company.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a company's title, description, logo, and other settings.\n\nRequired permissions:\n - `company:update`\n - `company:basic:read`",
        "operationId": "updateCompany",
        "parameters": [
          {
            "description": "The unique identifier of the company to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateCompany",
                "properties": {
                  "affiliate_application_required": {
                    "description": "Whether prospective affiliates must submit an application before they can promote this company.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "affiliate_instructions": {
                    "description": "Guidelines and instructions shown to affiliates explaining how to promote this company's products.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "banner_image": {
                    "description": "The company's banner image. Accepts PNG or JPEG format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A promotional pitch displayed to potential customers on the company's store page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "featured_affiliate_product_id": {
                    "description": "The ID of the product to feature on this company's affiliate page. Pass null to clear.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "The company's logo image. Accepts PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The unique URL slug for the company's store page. Must be lowercase and can include hyphens (e.g., 'my-company'). If not provided, the route will remain unchanged.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_customer_emails": {
                    "description": "Whether Whop sends transactional emails (receipts, renewals, cancelations) to customers on behalf of this company.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "social_links": {
                    "description": "The social media links to display on the company's store page. Pass the full list of desired social links — any existing links not included will be removed.",
                    "items": {
                      "description": "Input for creating a social link for a company",
                      "properties": {
                        "image": {
                          "description": "The custom image for the social link",
                          "properties": {
                            "id": {
                              "description": "The ID of an existing file object.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "title": "FileInputWithId",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "order": {
                          "description": "The order of the social link",
                          "example": "123.45",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "title": {
                          "description": "The title of the social link",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "url": {
                          "description": "The URL of the social link",
                          "example": "https://example.com/path",
                          "type": "string"
                        },
                        "website": {
                          "$ref": "#/components/schemas/SocialLinkWebsites",
                          "description": "The website this link is for"
                        },
                        "website_order": {
                          "description": "The order of the website social link",
                          "example": "123.45",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "url",
                        "website"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "target_audience": {
                    "description": "The target audience for this company (e.g., 'beginner day traders aged 18-25 looking to learn options').",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the company shown to customers.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Company"
                }
              }
            },
            "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": [
              "company:update",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Update company",
        "tags": [
          "Companies"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst company = await client.companies.update('biz_xxxxxxxxxxxxxx');\n\nconsole.log(company.id);"
          }
        ]
      }
    },
    "/companies/{parent_company_id}/api_keys": {
      "post": {
        "description": "Create an API key for a connected account (child company) owned by a parent company.",
        "operationId": "createApiKeyCompany",
        "parameters": [
          {
            "description": "The unique identifier of the parent platform company (e.g. 'biz_xxx').",
            "in": "path",
            "name": "parent_company_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateChildCompanyApiKey",
                "properties": {
                  "child_company_id": {
                    "description": "The unique identifier of the connected account to create the API key for (e.g. 'biz_xxx').",
                    "type": "string"
                  },
                  "name": {
                    "description": "A human-readable name for the API key, such as 'Production API Key'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "permissions": {
                    "description": "Granular permission statements defining which actions this API key can perform. Either permissions or role must be provided.",
                    "items": {
                      "description": "Input for a single permissions statement",
                      "properties": {
                        "actions": {
                          "description": "Actions covered by this statement",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "grant": {
                          "description": "Whether the actions are granted or denied",
                          "type": "boolean"
                        },
                        "resources": {
                          "description": "Resource identifiers. Can look like 'biz_xxxx' or 'biz_xxx|pass_*|exp_xxx' or 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or 'biz_xxx|pass_*'",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "actions",
                        "grant",
                        "resources"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "role": {
                    "description": "A system role to inherit permissions from (e.g. owner, admin, moderator). Either role or permissions must be provided.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/PermissionSystemRoles"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "child_company_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "An API key created for a child company, including the one-time secret key.",
                  "properties": {
                    "id": {
                      "description": "The unique identifier for the authorized api key.",
                      "type": "string"
                    },
                    "name": {
                      "description": "A user set name to identify an API key",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "secret_key": {
                      "description": "The secret key used to authenticate requests. Only returned at creation time.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "secret_key"
                  ],
                  "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": []
          }
        ],
        "summary": "Create child company API key",
        "tags": [
          "Companies"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.companies.createAPIKey('parent_company_id', {\n  child_company_id: 'child_company_id',\n});\n\nconsole.log(response.id);"
          }
        ]
      }
    },
    "/company_token_transactions": {
      "get": {
        "description": "Returns a paginated list of token transactions for a user or company, depending on the authenticated actor, with optional filtering by user and transaction type.\n\nRequired permissions:\n - `company_token_transaction:read`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "listCompanyTokenTransaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list token transactions for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter transactions to only those involving this specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "transaction_type",
            "required": false,
            "schema": {
              "description": "Filter transactions by type.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CompanyTokenTransactionTypes"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CompanyTokenTransaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CompanyTokenTransactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "company_token_transaction:read",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "List company token transactions",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const companyTokenTransactionListResponse of client.companyTokenTransactions.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(companyTokenTransactionListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a token transaction to add, subtract, or transfer tokens for a member within a company.\n\nRequired permissions:\n - `company_token_transaction:create`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "createCompanyTokenTransaction",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCompanyTokenTransaction",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "destination_user_id": {
                        "description": "The unique identifier of the user receiving the tokens. Required when the transaction type is 'transfer'.",
                        "type": "string"
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "transfer",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "company_id",
                      "transaction_type",
                      "user_id",
                      "destination_user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeTransfer",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "add",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "company_id",
                      "transaction_type",
                      "user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeAdd",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateCompanyTokenTransaction",
                    "properties": {
                      "amount": {
                        "description": "The positive number of tokens to transact. For example, 100.0 for 100 tokens.",
                        "example": 6.9,
                        "type": "number"
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create the transaction in, starting with 'biz_'.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "description": {
                        "description": "A human-readable description of why the transaction was created.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "idempotency_key": {
                        "description": "A unique key to prevent duplicate transactions. Use a UUID or similar unique string.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transaction_type": {
                        "const": "subtract",
                        "type": "string"
                      },
                      "user_id": {
                        "description": "The unique identifier of the user whose token balance will be affected, starting with 'user_'.",
                        "example": "user_xxxxxxxxxxxxx",
                        "type": "string"
                      }
                    },
                    "required": [
                      "amount",
                      "company_id",
                      "transaction_type",
                      "user_id"
                    ],
                    "title": "CreateCompanyTokenTransactionInputTransactionTypeSubtract",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTokenTransaction"
                }
              }
            },
            "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": [
              "company_token_transaction:create",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Create company token transaction",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst companyTokenTransaction = await client.companyTokenTransactions.create({\n  amount: 6.9,\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  destination_user_id: 'destination_user_id',\n  transaction_type: 'transfer',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(companyTokenTransaction.id);"
          }
        ]
      }
    },
    "/company_token_transactions/{id}": {
      "get": {
        "description": "Retrieves the details of an existing company token transaction.\n\nRequired permissions:\n - `company_token_transaction:read`\n - `member:basic:read`\n - `company:basic:read`",
        "operationId": "retrieveCompanyTokenTransaction",
        "parameters": [
          {
            "description": "The unique identifier of the token transaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompanyTokenTransaction"
                }
              }
            },
            "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": [
              "company_token_transaction:read",
              "member:basic:read",
              "company:basic:read"
            ]
          }
        ],
        "summary": "Retrieve company token transaction",
        "tags": [
          "Company token transactions"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst companyTokenTransaction = await client.companyTokenTransactions.retrieve('id');\n\nconsole.log(companyTokenTransaction.id);"
          }
        ]
      }
    },
    "/course_chapters": {
      "get": {
        "description": "Returns a paginated list of chapters within a course, ordered by position.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourseChapter",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the course to list chapters for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Chapter.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseChapterListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "List course chapters",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseChapterListResponse of client.courseChapters.list({\n  course_id: 'cors_xxxxxxxxxxxxx',\n})) {\n  console.log(courseChapterListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new chapter within a course to organize lessons into sections.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourseChapter",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateChapter",
                "properties": {
                  "course_id": {
                    "description": "The unique identifier of the course to create the chapter in (e.g., \"course_XXXXX\").",
                    "example": "cors_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "title": {
                    "description": "The display title of the chapter (e.g., \"Module 1: Introduction\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "course_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.create({ course_id: 'cors_xxxxxxxxxxxxx' });\n\nconsole.log(courseChapter.id);"
          }
        ]
      }
    },
    "/course_chapters/{id}": {
      "delete": {
        "description": "Permanently delete a chapter and all of its lessons from a course.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to delete (e.g., \"chap_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.delete('chap_xxxxxxxxxxxxx');\n\nconsole.log(courseChapter);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course chapter.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.retrieve('chap_xxxxxxxxxxxxx');\n\nconsole.log(courseChapter.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a chapter's title within a course.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourseChapter",
        "parameters": [
          {
            "description": "The unique identifier of the chapter to update (e.g., \"chap_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "chap_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateChapter",
                "properties": {
                  "title": {
                    "description": "The new display title of the chapter (e.g., \"Module 1: Introduction\").",
                    "type": "string"
                  }
                },
                "required": [
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseChapter"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course chapter",
        "tags": [
          "Course chapters"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseChapter = await client.courseChapters.update('chap_xxxxxxxxxxxxx', { title: 'title' });\n\nconsole.log(courseChapter.id);"
          }
        ]
      }
    },
    "/course_lesson_interactions": {
      "get": {
        "description": "Returns a paginated list of lesson interactions, filtered by lesson, course, user, or completion status.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "listCourseLessonInteraction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the user to filter lesson interactions for.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "lesson_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the lesson to filter interactions for.",
              "example": "lesn_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the course to filter interactions for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "completed",
            "required": false,
            "schema": {
              "description": "Whether to filter for completed or in-progress lesson interactions.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for LessonInteraction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseLessonInteractionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "List course lesson interactions",
        "tags": [
          "Course lesson interactions"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseLessonInteractionListItem of client.courseLessonInteractions.list()) {\n  console.log(courseLessonInteractionListItem.id);\n}"
          }
        ]
      }
    },
    "/course_lesson_interactions/{id}": {
      "get": {
        "description": "Retrieves the details of an existing course lesson interaction.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "retrieveCourseLessonInteraction",
        "parameters": [
          {
            "description": "The unique identifier of the lesson interaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "crsli_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLessonInteraction"
                }
              }
            },
            "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": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "Retrieve course lesson interaction",
        "tags": [
          "Course lesson interactions"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseLessonInteraction = await client.courseLessonInteractions.retrieve(\n  'crsli_xxxxxxxxxxxx',\n);\n\nconsole.log(courseLessonInteraction.id);"
          }
        ]
      }
    },
    "/course_lessons": {
      "get": {
        "description": "Returns a paginated list of lessons within a course or chapter, ordered by position.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourseLesson",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the course to return all lessons across all chapters.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "chapter_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a chapter to return only its lessons.",
              "example": "chap_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Lesson.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseLessonListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "List course lessons",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseLessonListResponse of client.courseLessons.list()) {\n  console.log(courseLessonListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new lesson within a course chapter. Lessons can contain video, text, or assessment content.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourseLesson",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateLesson",
                "properties": {
                  "chapter_id": {
                    "description": "The unique identifier of the chapter to create the lesson in (e.g., \"chap_XXXXX\").",
                    "example": "chap_xxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "content": {
                    "description": "The Markdown content body of the lesson.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "days_from_course_start_until_unlock": {
                    "description": "The number of days after a student starts the course before this lesson becomes accessible.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "embed_id": {
                    "description": "The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed_type": {
                    "description": "The type of video embed for this lesson, such as YouTube or Loom.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EmbedTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lesson_type": {
                    "$ref": "#/components/schemas/LessonTypes",
                    "description": "The content type of the lesson, such as video, text, quiz, or knowledge check."
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the lesson in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the lesson (e.g., \"Getting Started with APIs\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "chapter_id",
                  "lesson_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.create({\n  chapter_id: 'chap_xxxxxxxxxxxxx',\n  lesson_type: 'text',\n});\n\nconsole.log(lesson.id);"
          }
        ]
      }
    },
    "/course_lessons/{id}": {
      "delete": {
        "description": "Permanently delete a lesson and remove it from its chapter.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to delete (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseLesson = await client.courseLessons.delete('lesn_xxxxxxxxxxxxx');\n\nconsole.log(courseLesson);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course lesson.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.retrieve('lesn_xxxxxxxxxxxxx');\n\nconsole.log(lesson.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a lesson's content, type, visibility, assessment questions, or media attachments.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to update (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lesn_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateLesson",
                "properties": {
                  "assessment_completion_requirement": {
                    "description": "The passing criteria for quiz or knowledge check lessons, such as minimum grade or correct answers.",
                    "properties": {
                      "minimum_grade_percent": {
                        "description": "The minimum grade percentage required to pass (0-100). Cannot be set together with minimum_questions_correct.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "minimum_questions_correct": {
                        "description": "The minimum number of questions that must be answered correctly. Cannot be set together with minimum_grade_percent.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "assessment_questions": {
                    "description": "The full list of assessment questions for quiz or knowledge check lessons. Replaces all existing questions.",
                    "items": {
                      "description": "Input for creating or updating an assessment question",
                      "properties": {
                        "correct_answer": {
                          "description": "The correct answer for the question. Used for short answer questions",
                          "type": "string"
                        },
                        "id": {
                          "description": "The ID of an existing question. If provided, the question will be updated. If not provided, a new question will be created.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "image": {
                          "description": "Optional image attachment for the question",
                          "properties": {
                            "id": {
                              "description": "The ID of an existing file object.",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id"
                          ],
                          "title": "FileInputWithId",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "options": {
                          "description": "The answer options for multiple choice/select questions",
                          "items": {
                            "description": "Input for creating or updating an assessment question option",
                            "properties": {
                              "id": {
                                "description": "The ID of an existing option. If provided, the option will be updated. If not provided, a new option will be created.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "is_correct": {
                                "description": "Whether this option is a correct answer",
                                "type": "boolean"
                              },
                              "option_text": {
                                "description": "The text of the answer option",
                                "type": "string"
                              }
                            },
                            "required": [
                              "is_correct",
                              "option_text"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "question_text": {
                          "description": "The text of the question",
                          "type": "string"
                        },
                        "question_type": {
                          "$ref": "#/components/schemas/CoursesAssessmentQuestionTypes",
                          "description": "The type of the question"
                        }
                      },
                      "required": [
                        "correct_answer",
                        "question_text",
                        "question_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "attachments": {
                    "description": "File attachments for the lesson such as PDFs or documents. Replaces all existing attachments.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The Markdown content body of the lesson.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "days_from_course_start_until_unlock": {
                    "description": "The number of days after a student starts the course before this lesson becomes accessible.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "embed_id": {
                    "description": "The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID).",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "embed_type": {
                    "description": "The type of video embed for this lesson, such as YouTube or Loom.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/EmbedTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "lesson_type": {
                    "description": "The content type of the lesson, such as video, text, quiz, or knowledge check.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LessonTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "main_pdf": {
                    "description": "The primary PDF document attached to this lesson for student reference.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "max_attempts": {
                    "description": "The maximum number of attempts a student is allowed for assessment lessons.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "mux_asset_id": {
                    "description": "The identifier of a Mux video asset to attach to this lesson (e.g., \"mux_XXXXX\").",
                    "example": "mux_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the lesson in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the lesson (e.g., \"Getting Started with APIs\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls whether this lesson is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/LessonVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseLesson"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lesson = await client.courseLessons.update('lesn_xxxxxxxxxxxxx');\n\nconsole.log(lesson.id);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/mark_as_completed": {
      "post": {
        "description": "Mark a lesson as completed for the current user after they finish the content.",
        "operationId": "markAsCompletedCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson to mark as completed (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Mark as completed course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.markAsCompleted('lesson_id');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/start": {
      "post": {
        "description": "Record that the current user has started viewing a lesson, creating progress tracking records.",
        "operationId": "startCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the lesson the user is starting (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Start course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.start('lesson_id');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/course_lessons/{lesson_id}/submit_assessment": {
      "post": {
        "description": "Submit answers for a quiz or knowledge check lesson and receive a graded result.",
        "operationId": "submitAssessmentCourseLesson",
        "parameters": [
          {
            "description": "The unique identifier of the quiz or knowledge check lesson to submit answers for (e.g., \"les_XXXXX\").",
            "in": "path",
            "name": "lesson_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for SubmitAssessment",
                "properties": {
                  "answers": {
                    "description": "The list of answers to submit for each assessment question.",
                    "items": {
                      "description": "Input for a single question's answer in an assessment submission",
                      "properties": {
                        "answer_text": {
                          "description": "The text answer provided by the user (for short answer questions)",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "question_id": {
                          "description": "The ID of the question being answered",
                          "type": "string"
                        },
                        "selected_option_ids": {
                          "description": "The IDs of the selected options (for multiple choice/select questions)",
                          "items": {
                            "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                            "type": "string"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "question_id"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "answers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The result of a user's assessment attempt",
                  "properties": {
                    "created_at": {
                      "description": "The datetime the assessment result was created.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "id": {
                      "description": "The unique identifier for the assessment result.",
                      "example": "crsar_xxxxxxxxxxxx",
                      "type": "string"
                    },
                    "lesson": {
                      "description": "The lesson this assessment result is for",
                      "properties": {
                        "id": {
                          "description": "The unique identifier for the lesson.",
                          "example": "lesn_xxxxxxxxxxxxx",
                          "type": "string"
                        },
                        "title": {
                          "description": "The display name of the lesson shown to students. Maximum 120 characters.",
                          "example": "Understanding Candlestick Patterns",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "title"
                      ],
                      "type": "object"
                    },
                    "result_correct": {
                      "description": "The number of correct answers",
                      "example": 42,
                      "type": "integer"
                    },
                    "result_grade": {
                      "description": "The grade achieved on the assessment",
                      "example": 6.9,
                      "type": "number"
                    },
                    "result_graded_questions": {
                      "additionalProperties": true,
                      "description": "Array of graded questions with details",
                      "type": "object"
                    },
                    "result_passing_grade": {
                      "description": "Whether the user achieved a passing grade",
                      "type": "boolean"
                    },
                    "result_question_count": {
                      "description": "The total number of questions in the assessment",
                      "example": 42,
                      "type": "integer"
                    },
                    "score_percent": {
                      "description": "The percentage score achieved on the assessment",
                      "example": 6.9,
                      "type": "number"
                    },
                    "updated_at": {
                      "description": "The datetime the assessment result was last updated.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "user": {
                      "description": "The user who took the assessment",
                      "properties": {
                        "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",
                        "name",
                        "username"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "id",
                    "created_at",
                    "updated_at",
                    "result_grade",
                    "result_correct",
                    "result_question_count",
                    "result_passing_grade",
                    "result_graded_questions",
                    "score_percent",
                    "user",
                    "lesson"
                  ],
                  "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": []
          }
        ],
        "summary": "Submit assessment course lesson",
        "tags": [
          "Course lessons"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.courseLessons.submitAssessment('lesson_id', {\n  answers: [{ question_id: 'question_id' }],\n});\n\nconsole.log(response.id);"
          }
        ]
      }
    },
    "/course_students": {
      "get": {
        "description": "Returns a paginated list of students enrolled in a course, with optional name filtering.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "listCourseStudent",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "course_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the course to list enrolled students for.",
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "keyword",
            "required": false,
            "schema": {
              "description": "A search term to filter students by name or username.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CourseStudentType.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseStudentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "List course students",
        "tags": [
          "Course students"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseStudentListResponse of client.courseStudents.list({\n  course_id: 'cors_xxxxxxxxxxxxx',\n})) {\n  console.log(courseStudentListResponse.id);\n}"
          }
        ]
      }
    },
    "/course_students/{id}": {
      "get": {
        "description": "Retrieves the details of an existing course student.\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`",
        "operationId": "retrieveCourseStudent",
        "parameters": [
          {
            "description": "The unique identifier of the course student record to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CourseStudent"
                }
              }
            },
            "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": [
              "courses:read",
              "course_analytics:read"
            ]
          }
        ],
        "summary": "Retrieve course student",
        "tags": [
          "Course students"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst courseStudent = await client.courseStudents.retrieve('id');\n\nconsole.log(courseStudent.id);"
          }
        ]
      }
    },
    "/courses": {
      "get": {
        "description": "Returns a paginated list of courses, filtered by either an experience or a company.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "listCourse",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the experience to list courses for.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list courses for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Course.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/CourseListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "List courses",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const courseListResponse of client.courses.list()) {\n  console.log(courseListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new course within an experience, with optional chapters, lessons, and a certificate.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "createCourse",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateCourse",
                "properties": {
                  "certificate_after_completion_enabled": {
                    "description": "Whether the course awards students a PDF certificate after completing all lessons.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "experience_id": {
                    "description": "The unique identifier of the experience to create the course in (e.g., \"exp_XXXXX\").",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "order": {
                    "description": "The decimal order position of the course within its experience. Use fractional values (e.g., \"1.5\") to place between existing courses.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_completing_lessons_in_order": {
                    "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "tagline": {
                    "description": "A short tagline displayed beneath the course title (e.g., \"Master the fundamentals of design\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the course in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the course (e.g., \"Introduction to Web Development\").",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Controls whether this course is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CourseVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "experience_id",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Create course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.create({ experience_id: 'exp_xxxxxxxxxxxxxx', title: 'title' });\n\nconsole.log(course.id);"
          }
        ]
      }
    },
    "/courses/{id}": {
      "delete": {
        "description": "Permanently delete a course and all of its chapters, lessons, and student progress.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "deleteCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to delete (e.g., \"course_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Delete course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.delete('cors_xxxxxxxxxxxxx');\n\nconsole.log(course);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing course.\n\nRequired permissions:\n - `courses:read`",
        "operationId": "retrieveCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "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": [
              "courses:read"
            ]
          }
        ],
        "summary": "Retrieve course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.retrieve('cors_xxxxxxxxxxxxx');\n\nconsole.log(course.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a course's title, description, visibility, thumbnail, or chapter ordering.\n\nRequired permissions:\n - `courses:update`",
        "operationId": "updateCourse",
        "parameters": [
          {
            "description": "The unique identifier of the course to update (e.g., \"course_XXXXX\").",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "cors_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateCourse",
                "properties": {
                  "certificate_after_completion_enabled": {
                    "description": "Whether the course awards students a PDF certificate after completing all lessons.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "chapters": {
                    "description": "A list of chapters with nested lessons to reorder or rename in bulk.",
                    "items": {
                      "description": "Input for updating a chapter while updating a course",
                      "properties": {
                        "id": {
                          "description": "The ID of the chapter to update",
                          "type": "string"
                        },
                        "lessons": {
                          "description": "The lessons to update within this chapter",
                          "items": {
                            "description": "Input for updating a lesson while updating a course",
                            "properties": {
                              "chapter_id": {
                                "description": "The ID of the chapter this lesson belongs to (for moving between chapters)",
                                "example": "chap_xxxxxxxxxxxxx",
                                "type": "string"
                              },
                              "id": {
                                "description": "The ID of the lesson to update",
                                "type": "string"
                              },
                              "order": {
                                "description": "The order of the lesson within its chapter",
                                "example": 42,
                                "type": "integer"
                              },
                              "title": {
                                "description": "The title of the lesson",
                                "type": "string"
                              }
                            },
                            "required": [
                              "chapter_id",
                              "id",
                              "order",
                              "title"
                            ],
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "order": {
                          "description": "The order of the chapter within its course",
                          "example": 42,
                          "type": "integer"
                        },
                        "title": {
                          "description": "The title of the chapter",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "order",
                        "title"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A short description of the course displayed to students on the course page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "language": {
                    "description": "The primary language spoken in the video content of the course.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Languages"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "order": {
                    "description": "The decimal order position of the course within its experience. Use fractional values (e.g., \"1.5\") to place between existing courses.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "require_completing_lessons_in_order": {
                    "description": "Whether students must complete each lesson sequentially before advancing to the next one.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "tagline": {
                    "description": "A short tagline displayed beneath the course title (e.g., \"Master the fundamentals of design\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "thumbnail": {
                    "description": "The thumbnail image for the course in PNG, JPEG, or GIF format.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display title of the course (e.g., \"Introduction to Web Development\").",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls whether this course is visible to students or hidden as a draft.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CourseVisibilities"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Course"
                }
              }
            },
            "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": [
              "courses:update"
            ]
          }
        ],
        "summary": "Update course",
        "tags": [
          "Courses"
        ],
        "x-group-title": "Courses",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst course = await client.courses.update('cors_xxxxxxxxxxxxx');\n\nconsole.log(course.id);"
          }
        ]
      }
    },
    "/dispute_alerts": {
      "get": {
        "description": "Returns a paginated list of dispute alerts for a company, with optional filtering by creation date.\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `payment:dispute:read`",
        "operationId": "listDisputeAlert",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list dispute alerts for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return dispute alerts created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return dispute alerts created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DisputeAlert.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DisputeAlertListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:dispute_alert:read",
              "payment:basic:read",
              "payment:dispute:read"
            ]
          }
        ],
        "summary": "List dispute alerts",
        "tags": [
          "Dispute alerts"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const disputeAlertListResponse of client.disputeAlerts.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(disputeAlertListResponse.id);\n}"
          }
        ]
      }
    },
    "/dispute_alerts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing dispute alert.\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `payment:dispute:read`",
        "operationId": "retrieveDisputeAlert",
        "parameters": [
          {
            "description": "The unique identifier of the dispute alert.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspa_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisputeAlert"
                }
              }
            },
            "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": [
              "payment:dispute_alert:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "payment:dispute:read"
            ]
          }
        ],
        "summary": "Retrieve dispute alert",
        "tags": [
          "Dispute alerts"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst disputeAlert = await client.disputeAlerts.retrieve('dspa_xxxxxxxxxxxxx');\n\nconsole.log(disputeAlert.id);"
          }
        ]
      }
    },
    "/disputes": {
      "get": {
        "description": "Returns a paginated list of disputes for a company, with optional filtering by creation date. A dispute represents a chargeback or inquiry filed by a customer against a payment.\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`",
        "operationId": "listDispute",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list disputes for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return disputes created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return disputes created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Dispute.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DisputeListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:dispute:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List disputes",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const disputeListResponse of client.disputes.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(disputeListResponse.id);\n}"
          }
        ]
      }
    },
    "/disputes/{id}": {
      "get": {
        "description": "Retrieves the details of an existing dispute.\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "retrieveDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "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": [
              "payment:dispute:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve dispute",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dispute = await client.disputes.retrieve('dspt_xxxxxxxxxxxxx');\n\nconsole.log(dispute.id);"
          }
        ]
      }
    },
    "/disputes/{id}/submit_evidence": {
      "post": {
        "description": "Submit a payment dispute to the payment processor for review. Once submitted, no further edits can be made.\n\nRequired permissions:\n - `payment:dispute`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "submitEvidenceDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute to submit to the payment processor for review.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "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": [
              "payment:dispute",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Submit evidence",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dispute = await client.disputes.submitEvidence('dspt_xxxxxxxxxxxxx');\n\nconsole.log(dispute.id);"
          }
        ]
      }
    },
    "/disputes/{id}/update_evidence": {
      "post": {
        "description": "Update a dispute with evidence data to attempt to win the dispute.\n\nRequired permissions:\n - `payment:dispute`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "updateEvidenceDispute",
        "parameters": [
          {
            "description": "The unique identifier of the dispute to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "dspt_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDispute",
                "properties": {
                  "access_activity_log": {
                    "description": "An IP access activity log showing the customer used the service.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "billing_address": {
                    "description": "The billing address associated with the customer's payment method.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "cancellation_policy_attachment": {
                    "description": "A file upload containing the company's cancellation policy document.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "cancellation_policy_disclosure": {
                    "description": "The company's cancellation policy text to submit as evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_communication_attachment": {
                    "description": "A file upload containing evidence of customer communication. Must be a JPEG, PNG, GIF, or PDF.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "customer_email_address": {
                    "description": "The email address of the customer associated with the disputed payment.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "customer_name": {
                    "description": "The full name of the customer associated with the disputed payment.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "notes": {
                    "description": "Additional notes or context to submit as part of the dispute evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "product_description": {
                    "description": "A description of the product or service that was provided to the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "refund_policy_attachment": {
                    "description": "A file upload containing the company's refund policy document.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "refund_policy_disclosure": {
                    "description": "The company's refund policy text to submit as evidence.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "refund_refusal_explanation": {
                    "description": "An explanation of why the refund request was refused.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "service_date": {
                    "description": "The date when the product or service was delivered to the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "uncategorized_attachment": {
                    "description": "A file upload for evidence that does not fit into the other categories.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Dispute"
                }
              }
            },
            "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": [
              "payment:dispute",
              "plan:basic:read",
              "access_pass:basic:read",
              "company:basic:read",
              "payment:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Update evidence",
        "tags": [
          "Disputes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dispute = await client.disputes.updateEvidence('dspt_xxxxxxxxxxxxx');\n\nconsole.log(dispute.id);"
          }
        ]
      }
    },
    "/dm_channels": {
      "get": {
        "description": "Returns a paginated list of DM channels for the currently authenticated user, sorted by most recently active.\n\nRequired permissions:\n - `dms:read`",
        "operationId": "listDmChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a company to filter DM channels by. Only returns channels scoped to this company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DmChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "dms:read"
            ]
          }
        ],
        "summary": "List dm channels",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dmChannelListResponse of client.dmChannels.list()) {\n  console.log(dmChannelListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new DM channel between two or more users, optionally scoped to a specific company. Returns the existing channel if one already exists.",
        "operationId": "createDmChannel",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateDmChannelV2",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to scope this DM channel to. When set, the channel is visible only within that company context.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_name": {
                    "description": "A custom display name for the DM channel. For example, 'Project Discussion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "with_user_ids": {
                    "description": "The list of user identifiers to include in the DM channel. Each entry can be an email, username, or user ID (e.g. 'user_xxxxx').",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "with_user_ids"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Create dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.create({ with_user_ids: ['string'] });\n\nconsole.log(dmChannel.id);"
          }
        ]
      }
    },
    "/dm_channels/{id}": {
      "delete": {
        "description": "Permanently delete a DM channel and all of its messages. Only an admin of the channel can perform this action.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "deleteDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Delete dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.delete('id');\n\nconsole.log(dmChannel);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing DM channel.\n\nRequired permissions:\n - `dms:read`",
        "operationId": "retrieveDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "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": [
              "dms:read"
            ]
          }
        ],
        "summary": "Retrieve dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.retrieve('id');\n\nconsole.log(dmChannel.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the settings of an existing DM channel, such as its display name. Only an admin of the channel can perform this action.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "updateDmChannel",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDmChannel",
                "properties": {
                  "custom_name": {
                    "description": "A new custom display name for the DM channel. For example, 'Project Discussion'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmChannel"
                }
              }
            },
            "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": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Update dm channel",
        "tags": [
          "Dm channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmChannel = await client.dmChannels.update('id');\n\nconsole.log(dmChannel.id);"
          }
        ]
      }
    },
    "/dm_members": {
      "get": {
        "description": "Returns a paginated list of members in a specific DM channel, sorted by the date they were added.\n\nRequired permissions:\n - `dms:read`",
        "operationId": "listDmMember",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "channel_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the DM channel to list members for.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeedMember.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/DmMemberListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "dms:read"
            ]
          }
        ],
        "summary": "List dm members",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const dmMemberListResponse of client.dmMembers.list({ channel_id: 'channel_id' })) {\n  console.log(dmMemberListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add a new user to an existing DM channel. Only an admin of the channel can add members.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "createDmMember",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateDmMember",
                "properties": {
                  "channel_id": {
                    "description": "The unique identifier of the DM channel to add the new member to.",
                    "type": "string"
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to add to the DM channel. For example, 'user_xxxxx'.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "channel_id",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "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": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Create dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.create({\n  channel_id: 'channel_id',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(dmMember.id);"
          }
        ]
      }
    },
    "/dm_members/{id}": {
      "delete": {
        "description": "Remove a user from a DM channel. An admin can remove any member, and a member can remove themselves.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "deleteDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to remove.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Delete dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.delete('id');\n\nconsole.log(dmMember);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing DM member.\n\nRequired permissions:\n - `dms:read`",
        "operationId": "retrieveDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "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": [
              "dms:read"
            ]
          }
        ],
        "summary": "Retrieve dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.retrieve('id');\n\nconsole.log(dmMember.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a DM channel member's settings, such as their notification preferences or membership status.\n\nRequired permissions:\n - `dms:channel:manage`",
        "operationId": "updateDmMember",
        "parameters": [
          {
            "description": "The unique identifier of the DM channel member to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateDmMember",
                "properties": {
                  "notification_preference": {
                    "description": "The notification setting for this member, controlling how they receive alerts for new messages in this channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/DmsFeedMemberNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "description": "The membership status for this member in the DM channel.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/DmsFeedMemberStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DmMember"
                }
              }
            },
            "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": [
              "dms:channel:manage"
            ]
          }
        ],
        "summary": "Update dm member",
        "tags": [
          "Dm members"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst dmMember = await client.dmMembers.update('id');\n\nconsole.log(dmMember.id);"
          }
        ]
      }
    },
    "/entries": {
      "get": {
        "description": "Returns a paginated list of waitlist entries for a company, with optional filtering by product, plan, status, and creation date.\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`",
        "operationId": "listEntry",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list waitlist entries for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The column to sort waitlist entries by. Defaults to creation date.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/EntriesSortableColumns"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter entries to only those for specific products.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter entries to only those for specific plans.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter entries by their current status.",
              "items": {
                "$ref": "#/components/schemas/EntryStatus"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return entries created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return entries created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicEntry.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/EntryListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "plan:waitlist:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List entries",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const entryListResponse of client.entries.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(entryListResponse.id);\n}"
          }
        ]
      }
    },
    "/entries/{id}": {
      "get": {
        "description": "Retrieves the details of an existing waitlist entry.\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`",
        "operationId": "retrieveEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry"
                }
              }
            },
            "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": [
              "plan:waitlist:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst entry = await client.entries.retrieve('entry_xxxxxxxxxxxx');\n\nconsole.log(entry.id);"
          }
        ]
      }
    },
    "/entries/{id}/approve": {
      "post": {
        "description": "Approve a pending waitlist entry, triggering the checkout process to grant the user access to the plan.\n\nRequired permissions:\n - `plan:waitlist:manage`",
        "operationId": "approveEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to approve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "An object representing an asynchronous job.",
                  "properties": {
                    "job_id": {
                      "description": "The ID of the job.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "job_id"
                  ],
                  "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": [
              "plan:waitlist:manage"
            ]
          }
        ],
        "summary": "Approve entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.entries.approve('entry_xxxxxxxxxxxx');\n\nconsole.log(response.job_id);"
          }
        ]
      }
    },
    "/entries/{id}/deny": {
      "post": {
        "description": "Deny a pending waitlist entry, preventing the user from gaining access to the plan.\n\nRequired permissions:\n - `plan:waitlist:manage`\n - `plan:basic:read`\n - `member:email:read`",
        "operationId": "denyEntry",
        "parameters": [
          {
            "description": "The unique identifier of the waitlist entry to deny.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "entry_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Entry"
                }
              }
            },
            "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": [
              "plan:waitlist:manage",
              "plan:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Deny entry",
        "tags": [
          "Entries"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst entry = await client.entries.deny('entry_xxxxxxxxxxxx');\n\nconsole.log(entry.id);"
          }
        ]
      }
    },
    "/experiences": {
      "get": {
        "description": "Returns a paginated list of experiences belonging to a company, with optional filtering by product and app.",
        "operationId": "listExperience",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list experiences for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "Filter to only experiences attached to this product identifier.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "app_id",
            "required": false,
            "schema": {
              "description": "Filter to only experiences powered by this app identifier.",
              "example": "app_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return experiences created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return experiences created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicExperience.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ExperienceListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": []
          }
        ],
        "summary": "List experiences",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const experienceListResponse of client.experiences.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(experienceListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Required permissions:\n - `experience:create`",
        "operationId": "createExperience",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateExperience",
                "properties": {
                  "app_id": {
                    "description": "The unique identifier of the app that powers this experience.",
                    "example": "app_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The unique identifier of the company to create this experience for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "is_public": {
                    "description": "Whether the experience is publicly accessible without a membership.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "A logo image displayed alongside the experience name.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name of the experience. Defaults to the app's name if not provided.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "section_id": {
                    "description": "The unique identifier of the section to place the experience in.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "app_id",
                  "company_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": [
              "experience:create"
            ]
          }
        ],
        "summary": "Create experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.create({\n  app_id: 'app_xxxxxxxxxxxxxx',\n  company_id: 'biz_xxxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}": {
      "delete": {
        "description": "Required permissions:\n - `experience:delete`",
        "operationId": "deleteExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "experience:delete"
            ]
          }
        ],
        "summary": "Delete experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.delete('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing experience.",
        "operationId": "retrieveExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Retrieve experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.retrieve('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      },
      "patch": {
        "description": "Required permissions:\n - `experience:update`",
        "operationId": "updateExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateExperience",
                "properties": {
                  "access_level": {
                    "description": "The access level of the experience.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ExperienceAccessLevels"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_public": {
                    "description": "Whether the experience is publicly accessible without a membership.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "logo": {
                    "description": "A logo image displayed alongside the experience name.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The display name of the experience.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "order": {
                    "description": "The position of the experience within its section for display ordering.",
                    "example": "123.45",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "section_id": {
                    "description": "The unique identifier of the section to move the experience into.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": [
              "experience:update"
            ]
          }
        ],
        "summary": "Update experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.update('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/attach": {
      "post": {
        "description": "Attach an experience to a product, making it accessible to the product's customers.\n\nRequired permissions:\n - `experience:attach`",
        "operationId": "attachExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to attach.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for AddExperienceToAccessPass",
                "properties": {
                  "product_id": {
                    "description": "The unique identifier of the product to attach the experience to.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": [
              "experience:attach"
            ]
          }
        ],
        "summary": "Attach experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.attach('exp_xxxxxxxxxxxxxx', {\n  product_id: 'prod_xxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/detach": {
      "post": {
        "description": "Detach an experience from a product, removing customer access to it through that product.\n\nRequired permissions:\n - `experience:detach`",
        "operationId": "detachExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to detach.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for RemoveExperienceFromAccessPass",
                "properties": {
                  "product_id": {
                    "description": "The unique identifier of the product to detach the experience from.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "product_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": [
              "experience:detach"
            ]
          }
        ],
        "summary": "Detach experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.detach('exp_xxxxxxxxxxxxxx', {\n  product_id: 'prod_xxxxxxxxxxxxx',\n});\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/experiences/{id}/duplicate": {
      "post": {
        "description": "Duplicates an existing experience. The name will be copied, unless provided. The new experience will be attached to the same products as the original experience.\nIf duplicating a Forum or Chat experience, the new experience will have the same settings as the original experience, e.g. who can post, who can comment, etc.\nNo content, e.g. posts, messages, lessons from within the original experience will be copied.\n\n\nRequired permissions:\n - `experience:create`",
        "operationId": "duplicateExperience",
        "parameters": [
          {
            "description": "The unique identifier of the experience to duplicate.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for DuplicateExperience",
                "properties": {
                  "name": {
                    "description": "The display name for the duplicated experience. Defaults to the original experience's name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Experience"
                }
              }
            },
            "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": [
              "experience:create"
            ]
          }
        ],
        "summary": "Duplicate experience",
        "tags": [
          "Experiences"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst experience = await client.experiences.duplicate('exp_xxxxxxxxxxxxxx');\n\nconsole.log(experience.id);"
          }
        ]
      }
    },
    "/fee_markups": {
      "get": {
        "description": "Returns a paginated list of fee markups configured for a company. If the company is a platform account, returns the platform default markups.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "listFeeMarkup",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list fee markups for. Pass a platform account identifier to retrieve platform default markups.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for FeeMarkup.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/FeeMarkupListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "List fee markups",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const feeMarkupListResponse of client.feeMarkups.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(feeMarkupListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create or update a fee markup for a company. If a markup for the specified fee type already exists, it will be updated with the new values.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "createFeeMarkup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateFeeMarkup",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to create or update the fee markup for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "fee_type": {
                    "$ref": "#/components/schemas/FeeMarkupTypes",
                    "description": "The type of fee this markup applies to, such as processing or platform fees."
                  },
                  "fixed_fee_usd": {
                    "description": "The fixed fee amount in USD to charge per transaction. Must be between 0 and 50.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value metadata to attach to this fee markup.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "notes": {
                    "description": "Internal notes about this fee markup for record-keeping purposes.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "percentage_fee": {
                    "description": "The percentage fee to charge per transaction. Must be between 0 and 25.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "company_id",
                  "fee_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeMarkup"
                }
              }
            },
            "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": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "Create fee markup",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst feeMarkup = await client.feeMarkups.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  fee_type: 'crypto_withdrawal_markup',\n});\n\nconsole.log(feeMarkup.id);"
          }
        ]
      }
    },
    "/fee_markups/{id}": {
      "delete": {
        "description": "Delete a fee markup configuration for a company. This removes the custom fee override and reverts to the parent company's default fees.\n\nRequired permissions:\n - `company:update_child_fees`",
        "operationId": "deleteFeeMarkup",
        "parameters": [
          {
            "description": "The unique identifier of the fee markup to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "company:update_child_fees"
            ]
          }
        ],
        "summary": "Delete fee markup",
        "tags": [
          "Fee markups"
        ],
        "x-group-title": "Identity",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst feeMarkup = await client.feeMarkups.delete('id');\n\nconsole.log(feeMarkup);"
          }
        ]
      }
    },
    "/files": {
      "post": {
        "description": "Create a new file record and receive a presigned URL for uploading content to S3.",
        "operationId": "createFile",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateFile",
                "properties": {
                  "filename": {
                    "description": "The name of the file including its extension (e.g., \"photo.png\" or \"document.pdf\").",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Controls whether the file is publicly accessible via CDN or requires authentication. Defaults to public.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/FileVisibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "filename"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A file that has been uploaded or is pending upload.",
                  "properties": {
                    "content_type": {
                      "description": "The MIME type of the uploaded file (e.g., image/jpeg, video/mp4, audio/mpeg).",
                      "example": "image/jpeg",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "filename": {
                      "description": "The original filename of the uploaded file, including its file extension.",
                      "example": "document.pdf",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "description": "The unique identifier for the file.",
                      "example": "file_xxxxxxxxxxxxx",
                      "type": "string"
                    },
                    "size": {
                      "description": "The file size in bytes. Null if the file has not finished uploading.",
                      "example": "123.45",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "upload_headers": {
                      "additionalProperties": true,
                      "description": "Headers to include in the upload request. Only present in the response from the create mutation.",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "upload_status": {
                      "$ref": "#/components/schemas/UploadStatuses",
                      "description": "The current upload status of the file (e.g., pending, ready)."
                    },
                    "upload_url": {
                      "description": "The presigned URL to upload the file contents to. Only present in the response from the create mutation.",
                      "example": "https://media.whop.com/uploads/presigned",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "url": {
                      "description": "The URL for accessing the file. For public files, this is a permanent CDN URL. For private files, this is a signed URL that expires. Null if the file has not finished uploading.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "visibility": {
                      "$ref": "#/components/schemas/FileVisibility",
                      "description": "Whether the file is publicly accessible or requires authentication."
                    }
                  },
                  "required": [
                    "id",
                    "upload_status",
                    "filename",
                    "content_type",
                    "size",
                    "url",
                    "visibility",
                    "upload_url",
                    "upload_headers"
                  ],
                  "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": []
          }
        ],
        "summary": "Create file",
        "tags": [
          "Files"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.create({ filename: 'filename' });\n\nconsole.log(file.id);"
          }
        ]
      }
    },
    "/files/{id}": {
      "get": {
        "description": "Retrieves the details of an existing file.",
        "operationId": "retrieveFile",
        "parameters": [
          {
            "description": "The unique identifier of the file to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "file_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Retrieve file",
        "tags": [
          "Files"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.retrieve('file_xxxxxxxxxxxxx');\n\nconsole.log(file.id);"
          }
        ]
      }
    },
    "/forum_posts": {
      "get": {
        "description": "Returns a paginated list of forum posts within a specific experience, with optional filtering by parent post or pinned status.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "listForumPost",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "experience_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the experience to list forum posts for.",
              "example": "exp_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "include_bounty_anchors",
            "required": false,
            "schema": {
              "description": "Whether to include top-level bounty discussion anchors as rich forum items.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "parent_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a parent post to list comments for. When set, returns replies to that post.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "pinned",
            "required": false,
            "schema": {
              "description": "Whether to filter for only pinned posts. Set to true to return only pinned posts.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ForumPost.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ForumPostListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "forum:read"
            ]
          }
        ],
        "summary": "List forum posts",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const forumPostListResponse of client.forumPosts.list({\n  experience_id: 'exp_xxxxxxxxxxxxxx',\n})) {\n  console.log(forumPostListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. Pass experience_id 'public' with a company_id to post to a company's public forum.\n\nRequired permissions:\n - `forum:post:create`",
        "operationId": "createForumPost",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateForumPostV2",
                "properties": {
                  "attachments": {
                    "description": "A list of file attachments to include with the post, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The unique identifier of the company whose public forum to post in. Required when experience_id is 'public'. For example, 'biz_xxxxx'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The main body of the post in Markdown format. For example, 'Check out this **update**'. Hidden if the post is paywalled and the viewer has not purchased access.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_id": {
                    "description": "The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with company_id to automatically use the company's public forum.",
                    "example": "exp_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "is_mention": {
                    "description": "Whether to send this post as a mention notification to all users in the experience who have mentions enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "parent_id": {
                    "description": "The unique identifier of the parent post to comment on. Omit this field to create a top-level post.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "paywall_amount": {
                    "description": "The price to unlock this post in the specified paywall currency. For example, 5.00 for $5.00. When set, users must purchase access to view the post content.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "paywall_currency": {
                    "description": "The currency for the paywall price on this post. When set along with paywall_amount, users must purchase access to view the post content.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Currencies"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pinned": {
                    "description": "Whether this post should be pinned to the top of the forum.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "poll": {
                    "description": "A poll to attach to this post, allowing members to vote on options.",
                    "properties": {
                      "options": {
                        "description": "The options for the poll. Must have sequential IDs starting from 1",
                        "items": {
                          "description": "Input type for a single poll option",
                          "properties": {
                            "id": {
                              "description": "Sequential ID for the poll option (starting from '1')",
                              "type": "string"
                            },
                            "text": {
                              "description": "The text of the poll option",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "options"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "rich_content": {
                    "description": "The rich content of the post in Tiptap JSON format. When provided, takes priority over the markdown content field for rendering.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls who can see this forum post, such as members only or public.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumPostVisibilityTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "experience_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "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": [
              "forum:post:create"
            ]
          }
        ],
        "summary": "Create forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.create({ experience_id: 'exp_xxxxxxxxxxxxxx' });\n\nconsole.log(forumPost.id);"
          }
        ]
      }
    },
    "/forum_posts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing forum post.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "retrieveForumPost",
        "parameters": [
          {
            "description": "The unique identifier of the forum post to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "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": [
              "forum:read"
            ]
          }
        ],
        "summary": "Retrieve forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.retrieve('id');\n\nconsole.log(forumPost.id);"
          }
        ]
      },
      "patch": {
        "description": "Edit the content, attachments, pinned status, or visibility of an existing forum post or comment.",
        "operationId": "updateForumPost",
        "parameters": [
          {
            "description": "The unique identifier of the forum post to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateForumPost",
                "properties": {
                  "attachments": {
                    "description": "A replacement list of file attachments for this post, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The updated body of the post in Markdown format. For example, 'Check out this **update**'. Hidden if the post is paywalled and the viewer has not purchased access.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_pinned": {
                    "description": "Whether this post should be pinned to the top of the forum. Only top-level posts can be pinned, not comments.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The updated title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Controls who can see this forum post, such as members only or public.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumPostVisibilityTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForumPost"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Update forum post",
        "tags": [
          "Forum posts"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forumPost = await client.forumPosts.update('id');\n\nconsole.log(forumPost.id);"
          }
        ]
      }
    },
    "/forums": {
      "get": {
        "description": "Returns a paginated list of forums within a specific company, with optional filtering by product.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "listForum",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list forums for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of a product to filter by. When set, only forums connected to this product are returned.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for ForumFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ForumListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "forum:read"
            ]
          }
        ],
        "summary": "List forums",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const forumListResponse of client.forums.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(forumListResponse.id);\n}"
          }
        ]
      }
    },
    "/forums/{id}": {
      "get": {
        "description": "Retrieves the details of an existing forum.\n\nRequired permissions:\n - `forum:read`",
        "operationId": "retrieveForum",
        "parameters": [
          {
            "description": "The unique identifier of the forum or experience to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forum"
                }
              }
            },
            "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": [
              "forum:read"
            ]
          }
        ],
        "summary": "Retrieve forum",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forum = await client.forums.retrieve('id');\n\nconsole.log(forum.id);"
          }
        ]
      },
      "patch": {
        "description": "Update moderation and notification settings for a forum, such as who can post, who can comment, and email notification preferences.\n\nRequired permissions:\n - `forum:moderate`",
        "operationId": "updateForum",
        "parameters": [
          {
            "description": "The unique identifier of the forum to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a forum ID.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateForum",
                "properties": {
                  "banned_words": {
                    "description": "A list of words that are automatically blocked from posts in this forum. For example, ['spam', 'scam'].",
                    "items": {
                      "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "banner_image": {
                    "description": "The banner image displayed at the top of the forum page. Pass null to remove the existing banner.",
                    "properties": {
                      "id": {
                        "description": "The ID of an existing file object.",
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "title": "FileInputWithId",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "email_notification_preference": {
                    "description": "Controls how email notifications are sent to members when new posts are created in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumEmailNotificationPreferences"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_comment": {
                    "description": "Controls which roles are allowed to comment on posts in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumWhoCanCommentTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "who_can_post": {
                    "description": "Controls which roles are allowed to create new posts in this forum.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ForumWhoCanPostTypes"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Forum"
                }
              }
            },
            "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": [
              "forum:moderate"
            ]
          }
        ],
        "summary": "Update forum",
        "tags": [
          "Forums"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst forum = await client.forums.update('id');\n\nconsole.log(forum.id);"
          }
        ]
      }
    },
    "/identity_profiles": {
      "get": {
        "description": "Returns a paginated list of identity profiles. When company_id is provided, lists IPs currently linked to that company's ledger. When omitted, lists IPs linked to any ledger the actor can read (including child companies under a parent).\n\nRequired permissions:\n - `identity:read`",
        "operationId": "listIdentityProfile",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to filter to. When omitted, returns IPs across all ledgers the actor can read.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "profile_type",
            "required": false,
            "schema": {
              "description": "Filter by profile type (individual or business).",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/IdentityProfileKinds"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter by derived verification status.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/IdentityProfileStatuses"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for IdentityProfile.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/IdentityProfileListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "identity:read"
            ]
          }
        ],
        "summary": "List identity profiles",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/identity_profiles/{id}": {
      "delete": {
        "description": "Unlinks an IdentityProfile from a LedgerAccount (flips the matching link to is_current=false).",
        "operationId": "unlinkIdentityProfile",
        "parameters": [
          {
            "description": "The ID of the IdentityProfile to unlink.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "ledger_account_id",
            "required": true,
            "schema": {
              "description": "The ID of the LedgerAccount to unlink the identity profile from.",
              "example": "ldgr_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfile"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Unlink an identity profile",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      },
      "get": {
        "description": "Retrieves the details of an existing identity profile.\n\nRequired permissions:\n - `identity:read`",
        "operationId": "retrieveIdentityProfile",
        "parameters": [
          {
            "description": "The unique identifier of the identity profile (idpf_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdentityProfile"
                }
              }
            },
            "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": [
              "identity:read"
            ]
          }
        ],
        "summary": "Retrieve identity profile",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/identity_profiles/{id}/verifications": {
      "get": {
        "description": "Returns a list of verifications attached to an identity profile, ordered by most recent first.\n\nRequired permissions:\n - `identity:read`",
        "operationId": "listVerificationsIdentityProfile",
        "parameters": [
          {
            "description": "The unique identifier of the identity profile (idpf_xxx).",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "idpf_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Verification.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "An identity verification session used to confirm a person or entity's identity for payout account eligibility.",
                        "properties": {
                          "created_at": {
                            "description": "When the verification record was created.",
                            "example": "2023-12-01T05:00:00.401Z",
                            "format": "date-time",
                            "type": "string"
                          },
                          "id": {
                            "description": "The numeric id of the verification record.",
                            "example": "verf_xxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "last_error_code": {
                            "description": "The most recent error code returned during verification. Null if no error has occurred.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/VerificationErrorCodes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "last_error_reason": {
                            "description": "A human-readable explanation of the most recent verification error. Null if no error has occurred.",
                            "example": "Document image was too blurry to read.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "session_url": {
                            "description": "A URL the user can visit to complete the verification process. Null if the session does not require user interaction.",
                            "example": "https://verify.stripe.com/session/abc123",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "$ref": "#/components/schemas/VerificationStatuses",
                            "description": "The current status of this verification session."
                          }
                        },
                        "required": [
                          "id",
                          "status",
                          "session_url",
                          "last_error_code",
                          "last_error_reason",
                          "created_at"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "identity:read"
            ]
          }
        ],
        "summary": "List identity profile verifications",
        "tags": [
          "Identity profiles"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/invoices": {
      "get": {
        "description": "Returns a paginated list of invoices for a company, with optional filtering by product, status, collection method, and creation date.\n\nRequired permissions:\n - `invoice:basic:read`",
        "operationId": "listInvoice",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list invoices for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter invoices to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "collection_methods",
            "required": false,
            "schema": {
              "description": "Filter invoices by their collection method.",
              "items": {
                "$ref": "#/components/schemas/InvoiceCollectionMethods"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter invoices by their current status.",
              "items": {
                "$ref": "#/components/schemas/InvoiceStatuses"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to order results by, such as creation date or due date.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InvoicesSortableColumns"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return invoices created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return invoices created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicInvoice.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "invoice:basic:read"
            ]
          }
        ],
        "summary": "List invoices",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const invoiceListItem of client.invoices.list()) {\n  console.log(invoiceListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create an invoice for a customer. The invoice can be charged automatically using a stored payment method, or sent to the customer for manual payment.\n\nRequired permissions:\n - `invoice:create`",
        "operationId": "createInvoice",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateInvoice",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreateInvoice",
                    "properties": {
                      "automatically_finalizes_at": {
                        "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email to the customer at the specified time.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "billing_address": {
                        "description": "Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.",
                        "properties": {
                          "city": {
                            "description": "The city of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "country": {
                            "description": "The country of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line1": {
                            "description": "The line 1 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line2": {
                            "description": "The line 2 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "description": "The name of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "description": "The phone number of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postal_code": {
                            "description": "The postal code of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "description": "The state of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tax_id_type": {
                            "description": "The type of tax identifier.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxIdentifierTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tax_id_value": {
                            "description": "The value of the tax identifier.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "charge_buyer_fee": {
                        "description": "Whether to charge the customer a buyer fee on this invoice.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "collection_method": {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods",
                        "description": "How the invoice should be collected. Use charge_automatically to charge a stored payment method, or send_invoice to email the customer."
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create this invoice for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "customer_name": {
                        "description": "The name of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "due_date": {
                        "description": "The date by which the invoice must be paid. Required unless save_as_draft is true.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_address": {
                        "description": "The email address of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line_items": {
                        "description": "Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price.",
                        "items": {
                          "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                          "properties": {
                            "label": {
                              "description": "The label or description for this line item.",
                              "type": "string"
                            },
                            "quantity": {
                              "description": "The quantity of this line item. Defaults to 1.",
                              "example": 6.9,
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "unit_price": {
                              "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                              "example": 6.9,
                              "type": "number"
                            }
                          },
                          "required": [
                            "label",
                            "unit_price"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "mailing_address_id": {
                        "description": "The unique identifier of an existing mailing address to attach to this invoice. Cannot be used together with billing_address.",
                        "example": "ma_xxxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The unique identifier of an existing member to create this invoice for. If not provided, you must supply an email_address and customer_name.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The unique identifier of the payment method to charge. Required when collection_method is charge_automatically.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_token_id": {
                        "description": "The payment token ID to use for this invoice. If using charge_automatically, you must provide a payment_token.",
                        "example": "payt_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes defining the price, currency, and billing interval for this invoice.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans).",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Currencies"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legacy_payment_method_controls": {
                            "description": "Whether this plan uses legacy payment method controls",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "unlimited_stock": {
                            "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": "object"
                      },
                      "product": {
                        "description": "The properties of the product to create for this invoice. Provide this to create a new product inline.",
                        "properties": {
                          "product_tax_code_id": {
                            "description": "The ID of the product tax code to apply to this product.",
                            "example": "ptc_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the product.",
                            "type": "string"
                          }
                        },
                        "required": [
                          "title"
                        ],
                        "type": "object"
                      },
                      "save_as_draft": {
                        "description": "When true, creates the invoice as a draft without sending or charging. Relaxes customer and due date requirements.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "subscription_billing_anchor_at": {
                        "description": "The date that defines when the subscription billing cycle should start. When set on a renewal plan invoice, this anchors all future billing periods to this date.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "company_id",
                      "plan",
                      "collection_method",
                      "product"
                    ],
                    "title": "CreateInvoiceInputWithProduct",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreateInvoice",
                    "properties": {
                      "automatically_finalizes_at": {
                        "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email to the customer at the specified time.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "billing_address": {
                        "description": "Inline billing address to create a new mailing address for this invoice. Cannot be used together with mailing_address_id.",
                        "properties": {
                          "city": {
                            "description": "The city of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "country": {
                            "description": "The country of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line1": {
                            "description": "The line 1 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "line2": {
                            "description": "The line 2 of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "name": {
                            "description": "The name of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "phone": {
                            "description": "The phone number of the customer.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "postal_code": {
                            "description": "The postal code of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "state": {
                            "description": "The state of the address.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "tax_id_type": {
                            "description": "The type of tax identifier.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/TaxIdentifierTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "tax_id_value": {
                            "description": "The value of the tax identifier.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "charge_buyer_fee": {
                        "description": "Whether to charge the customer a buyer fee on this invoice.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "collection_method": {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods",
                        "description": "How the invoice should be collected. Use charge_automatically to charge a stored payment method, or send_invoice to email the customer."
                      },
                      "company_id": {
                        "description": "The unique identifier of the company to create this invoice for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "customer_name": {
                        "description": "The name of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "due_date": {
                        "description": "The date by which the invoice must be paid. Required unless save_as_draft is true.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "email_address": {
                        "description": "The email address of the customer. Required when creating an invoice for a customer who is not yet a member of the company.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line_items": {
                        "description": "Optional line items that break down the invoice total. When provided, the sum of (quantity * unit_price) for all items must equal the plan price.",
                        "items": {
                          "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                          "properties": {
                            "label": {
                              "description": "The label or description for this line item.",
                              "type": "string"
                            },
                            "quantity": {
                              "description": "The quantity of this line item. Defaults to 1.",
                              "example": 6.9,
                              "type": [
                                "number",
                                "null"
                              ]
                            },
                            "unit_price": {
                              "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                              "example": 6.9,
                              "type": "number"
                            }
                          },
                          "required": [
                            "label",
                            "unit_price"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "mailing_address_id": {
                        "description": "The unique identifier of an existing mailing address to attach to this invoice. Cannot be used together with billing_address.",
                        "example": "ma_xxxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "member_id": {
                        "description": "The unique identifier of an existing member to create this invoice for. If not provided, you must supply an email_address and customer_name.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The unique identifier of the payment method to charge. Required when collection_method is charge_automatically.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "payment_token_id": {
                        "description": "The payment token ID to use for this invoice. If using charge_automatically, you must provide a payment_token.",
                        "example": "payt_xxxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "plan": {
                        "description": "The plan attributes defining the price, currency, and billing interval for this invoice.",
                        "properties": {
                          "adaptive_pricing_enabled": {
                            "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans).",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Currencies"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "custom_fields": {
                            "description": "An array of custom field objects.",
                            "items": {
                              "properties": {
                                "field_type": {
                                  "$ref": "#/components/schemas/CustomFieldTypes",
                                  "description": "The type of the custom field."
                                },
                                "id": {
                                  "description": "The ID of the custom field (if being updated)",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "name": {
                                  "description": "The name of the custom field.",
                                  "type": "string"
                                },
                                "order": {
                                  "description": "The order of the field.",
                                  "example": 42,
                                  "type": [
                                    "integer",
                                    "null"
                                  ]
                                },
                                "placeholder": {
                                  "description": "The placeholder value of the field.",
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "required": {
                                  "description": "Whether or not the field is required.",
                                  "type": [
                                    "boolean",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "field_type",
                                "name"
                              ],
                              "type": "object"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "legacy_payment_method_controls": {
                            "description": "Whether this plan uses legacy payment method controls",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "payment_method_configuration": {
                            "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                            "properties": {
                              "disabled": {
                                "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "enabled": {
                                "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                                "items": {
                                  "$ref": "#/components/schemas/PaymentMethodTypes"
                                },
                                "type": "array"
                              },
                              "include_platform_defaults": {
                                "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "disabled",
                              "enabled"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "release_method": {
                            "description": "This is the release method the business uses to sell this plan.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ReleaseMethod"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "stock": {
                            "description": "The number of units available for purchase.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "unlimited_stock": {
                            "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [],
                        "type": "object"
                      },
                      "product_id": {
                        "description": "The unique identifier of an existing product to create this invoice for.",
                        "example": "prod_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "save_as_draft": {
                        "description": "When true, creates the invoice as a draft without sending or charging. Relaxes customer and due date requirements.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "subscription_billing_anchor_at": {
                        "description": "The date that defines when the subscription billing cycle should start. When set on a renewal plan invoice, this anchors all future billing periods to this date.",
                        "example": "2023-12-01T05:00:00.401Z",
                        "format": "date-time",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "company_id",
                      "plan",
                      "collection_method",
                      "product_id"
                    ],
                    "title": "CreateInvoiceInputWithProductId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "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": [
              "invoice:create"
            ]
          }
        ],
        "summary": "Create invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.create({\n  collection_method: 'send_invoice',\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  plan: {},\n  product: { title: 'title' },\n});\n\nconsole.log(invoice.id);"
          }
        ]
      }
    },
    "/invoices/{id}": {
      "delete": {
        "description": "Delete a draft invoice.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "deleteInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the draft invoice to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Delete invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.delete('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing invoice.\n\nRequired permissions:\n - `invoice:basic:read`",
        "operationId": "retrieveInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice, or a secure token.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "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": [
              "invoice:basic:read"
            ]
          }
        ],
        "summary": "Retrieve invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.retrieve('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a draft invoice's details.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "updateInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateInvoice",
                "properties": {
                  "automatically_finalizes_at": {
                    "description": "The date and time when the invoice will be automatically finalized. For charge_automatically, triggers an automatic charge. For send_invoice, sends the invoice email at the specified time.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "billing_address": {
                    "description": "Inline billing address to create or update a mailing address for this invoice.",
                    "properties": {
                      "city": {
                        "description": "The city of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "country": {
                        "description": "The country of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line1": {
                        "description": "The line 1 of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "line2": {
                        "description": "The line 2 of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "description": "The name of the customer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "phone": {
                        "description": "The phone number of the customer.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "postal_code": {
                        "description": "The postal code of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "state": {
                        "description": "The state of the address.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "tax_id_type": {
                        "description": "The type of tax identifier.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/TaxIdentifierTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "tax_id_value": {
                        "description": "The value of the tax identifier.",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "charge_buyer_fee": {
                    "description": "Whether to charge the customer a buyer fee on this invoice.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "collection_method": {
                    "description": "How the invoice should be collected.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/InvoiceCollectionMethods"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "customer_name": {
                    "description": "The name of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "due_date": {
                    "description": "The date by which the invoice must be paid.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "email_address": {
                    "description": "The email address of the customer.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line_items": {
                    "description": "Line items that break down the invoice total.",
                    "items": {
                      "description": "A single line item to include on the invoice, with a label, quantity, and unit price.",
                      "properties": {
                        "label": {
                          "description": "The label or description for this line item.",
                          "type": "string"
                        },
                        "quantity": {
                          "description": "The quantity of this line item. Defaults to 1.",
                          "example": 6.9,
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "unit_price": {
                          "description": "The unit price for this line item. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                          "example": 6.9,
                          "type": "number"
                        }
                      },
                      "required": [
                        "label",
                        "unit_price"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "mailing_address_id": {
                    "description": "The unique identifier of an existing mailing address to attach.",
                    "example": "ma_xxxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_id": {
                    "description": "The unique identifier of a member to assign as the customer.",
                    "example": "mber_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "payment_method_id": {
                    "description": "The unique identifier of the payment method to charge.",
                    "example": "pmt_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "plan": {
                    "description": "Updated plan attributes.",
                    "properties": {
                      "adaptive_pricing_enabled": {
                        "description": "Whether this plan accepts local currency payments via adaptive pricing.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "billing_period": {
                        "description": "The interval in days at which the plan charges (renewal plans).",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "currency": {
                        "description": "The three-letter ISO currency code for the plan's pricing. Defaults to USD.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "custom_fields": {
                        "description": "An array of custom field objects.",
                        "items": {
                          "properties": {
                            "field_type": {
                              "$ref": "#/components/schemas/CustomFieldTypes",
                              "description": "The type of the custom field."
                            },
                            "id": {
                              "description": "The ID of the custom field (if being updated)",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "description": "The name of the custom field.",
                              "type": "string"
                            },
                            "order": {
                              "description": "The order of the field.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "placeholder": {
                              "description": "The placeholder value of the field.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "required": {
                              "description": "Whether or not the field is required.",
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "field_type",
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "description": {
                        "description": "The description of the plan.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "expiration_days": {
                        "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for a one-year access period.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "initial_price": {
                        "description": "An additional amount charged upon first purchase. Use only if a one time payment OR you want to charge an additional amount on top of the renewal price. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "internal_notes": {
                        "description": "A personal description or notes section for the business.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "legacy_payment_method_controls": {
                        "description": "Whether this plan uses legacy payment method controls",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "payment_method_configuration": {
                        "description": "The explicit payment method configuration for the plan. If not provided, the platform or company's defaults will apply.",
                        "properties": {
                          "disabled": {
                            "description": "An array of payment method identifiers that are explicitly disabled. Only applies if the include_platform_defaults is true.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "enabled": {
                            "description": "An array of payment method identifiers that are explicitly enabled. This means these payment methods will be shown on checkout. Example use case is to only enable a specific payment method like cashapp, or extending the platform defaults with additional methods.",
                            "items": {
                              "$ref": "#/components/schemas/PaymentMethodTypes"
                            },
                            "type": "array"
                          },
                          "include_platform_defaults": {
                            "description": "Whether Whop's platform default payment method enablement settings are included in this configuration. The full list of default payment methods can be found in the documentation at docs.whop.com/payments.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "disabled",
                          "enabled"
                        ],
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "plan_type": {
                        "description": "Indicates if the plan is a one time payment or recurring.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "release_method": {
                        "description": "This is the release method the business uses to sell this plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/ReleaseMethod"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "renewal_price": {
                        "description": "The amount the customer is charged every billing period. Use only if a recurring payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "stock": {
                        "description": "The number of units available for purchase.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "trial_period_days": {
                        "description": "The number of free trial days added before a renewal plan.",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "unlimited_stock": {
                        "description": "When true, the plan has unlimited stock (stock field is ignored). When false, purchases are limited by the stock field.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "Shows or hides the plan from public/business view.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Visibility"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The unique identifier of an existing product to attach to this invoice. Only allowed while the invoice is still a draft.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "subscription_billing_anchor_at": {
                    "description": "The date that defines when the subscription billing cycle should start.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                }
              }
            },
            "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": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Update invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst invoice = await client.invoices.update('inv_xxxxxxxxxxxxxx');\n\nconsole.log(invoice.id);"
          }
        ]
      }
    },
    "/invoices/{id}/mark_paid": {
      "post": {
        "description": "Mark an open invoice as paid when payment was collected outside of Whop.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "markPaidInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to mark as paid.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Mark paid invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.markPaid('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/invoices/{id}/mark_uncollectible": {
      "post": {
        "description": "Mark an open invoice as uncollectible when payment is not expected.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "markUncollectibleInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to mark as uncollectible.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Mark uncollectible invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.markUncollectible('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/invoices/{id}/void": {
      "post": {
        "description": "Void an open invoice so it can no longer be paid. Voiding is permanent and cannot be undone.\n\nRequired permissions:\n - `invoice:update`",
        "operationId": "voidInvoice",
        "parameters": [
          {
            "description": "The unique identifier of the invoice to void.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "inv_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "invoice:update"
            ]
          }
        ],
        "summary": "Void invoice",
        "tags": [
          "Invoices"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.invoices.void('inv_xxxxxxxxxxxxxx');\n\nconsole.log(response);"
          }
        ]
      }
    },
    "/leads": {
      "get": {
        "description": "Returns a paginated list of leads for a company, with optional filtering by product and creation date.\n\nRequired permissions:\n - `lead:basic:read`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "listLead",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list leads for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return leads created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return leads created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter leads to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Lead.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/LeadListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "lead:basic:read",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "List leads",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const leadListResponse of client.leads.list({ company_id: 'biz_xxxxxxxxxxxxxx' })) {\n  console.log(leadListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Record a new lead for a company, capturing a potential customer's interest in a specific product.\n\nRequired permissions:\n - `lead:manage`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "createLead",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateLeadV2",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to create the lead for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A JSON object of custom metadata to attach to the lead for tracking purposes.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The unique identifier of the product the lead is interested in, starting with 'prod_'.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "referrer": {
                    "description": "The referral URL that brought the lead to the company, such as 'https://example.com/landing'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The unique identifier of the user to record as the lead. If authenticated as a user, that user is used automatically.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "company_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "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": [
              "lead:manage",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Create lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.create({ company_id: 'biz_xxxxxxxxxxxxxx' });\n\nconsole.log(lead.id);"
          }
        ]
      }
    },
    "/leads/{id}": {
      "get": {
        "description": "Retrieves the details of an existing lead.\n\nRequired permissions:\n - `lead:basic:read`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "retrieveLead",
        "parameters": [
          {
            "description": "The unique identifier of the lead to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lead_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "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": [
              "lead:basic:read",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Retrieve lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.retrieve('lead_xxxxxxxxxxxxx');\n\nconsole.log(lead.id);"
          }
        ]
      },
      "patch": {
        "description": "Update the metadata or referrer information on an existing lead record.\n\nRequired permissions:\n - `lead:manage`\n - `member:email:read`\n - `access_pass:basic:read`\n - `member:basic:read`",
        "operationId": "updateLead",
        "parameters": [
          {
            "description": "The unique identifier of the lead to update, starting with 'lead_'.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "lead_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateLead",
                "properties": {
                  "metadata": {
                    "additionalProperties": true,
                    "description": "A JSON object of custom metadata to set on the lead, replacing any existing metadata.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "referrer": {
                    "description": "The updated referral URL for the lead, such as 'https://example.com/landing'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Lead"
                }
              }
            },
            "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": [
              "lead:manage",
              "member:email:read",
              "access_pass:basic:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Update lead",
        "tags": [
          "Leads"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst lead = await client.leads.update('lead_xxxxxxxxxxxxx');\n\nconsole.log(lead.id);"
          }
        ]
      }
    },
    "/ledger_accounts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing ledger account.\n\nRequired permissions:\n - `company:balance:read`\n - `payout:account:read`",
        "operationId": "retrieveLedgerAccount",
        "parameters": [
          {
            "description": "The identifier to look up the ledger account. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ldgr_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LedgerAccount"
                }
              }
            },
            "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": [
              "company:balance:read",
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve ledger account",
        "tags": [
          "Ledger accounts"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst ledgerAccount = await client.ledgerAccounts.retrieve('ldgr_xxxxxxxxxxxxx');\n\nconsole.log(ledgerAccount.id);"
          }
        ]
      }
    },
    "/members": {
      "get": {
        "description": "Returns a paginated list of members for a company, with extensive filtering by product, plan, status, access level, and more.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `member:phone:read`",
        "operationId": "listMember",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list members for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The column to sort members by, such as creation date or revenue.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MembersSortableColumns"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return members created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return members created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "access_level",
            "required": false,
            "schema": {
              "description": "Filter members by their current access level to the product.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AccessLevel"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those belonging to these specific products.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those subscribed to these specific plans.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those matching these specific user identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter members by their current subscription status.",
              "items": {
                "$ref": "#/components/schemas/MemberStatuses"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "promo_code_ids",
            "required": false,
            "schema": {
              "description": "Filter members to only those who used these specific promo codes.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "most_recent_actions",
            "required": false,
            "schema": {
              "description": "Filter members by their most recent activity type.",
              "items": {
                "$ref": "#/components/schemas/MemberMostRecentActions"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search members by name, username, or email. Email filtering requires the member:email:read permission.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for CompanyMember.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MemberListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "member:basic:read",
              "member:email:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "List members",
        "tags": [
          "Members"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const memberListResponse of client.members.list()) {\n  console.log(memberListResponse.id);\n}"
          }
        ]
      }
    },
    "/members/{id}": {
      "get": {
        "description": "Retrieves the details of an existing member.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `member:phone:read`",
        "operationId": "retrieveMember",
        "parameters": [
          {
            "description": "The unique identifier of the member to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Member"
                }
              }
            },
            "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:basic:read",
              "member:email:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve member",
        "tags": [
          "Members"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst member = await client.members.retrieve('id');\n\nconsole.log(member.id);"
          }
        ]
      }
    },
    "/memberships": {
      "get": {
        "description": "Returns a paginated list of memberships, with optional filtering by product, plan, status, and user.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "listMembership",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list memberships for. Required when using an API key.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to sort results by. Null uses the default sort order.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MembershipsSortableColumns"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter to only memberships matching these statuses.",
              "items": {
                "$ref": "#/components/schemas/MembershipStatus"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "cancel_options",
            "required": false,
            "schema": {
              "description": "Filter to only memberships matching these cancellation reasons.",
              "items": {
                "$ref": "#/components/schemas/CancelOptions"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships belonging to these user identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "promo_code_ids",
            "required": false,
            "schema": {
              "description": "Filter to only memberships that used these promo code identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return memberships created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return memberships created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicMembership.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MembershipListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List memberships",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const membershipListResponse of client.memberships.list()) {\n  console.log(membershipListResponse.id);\n}"
          }
        ]
      }
    },
    "/memberships/{id}": {
      "get": {
        "description": "Retrieves the details of an existing membership.\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "retrieveMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership, or a license key.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "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:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.retrieve('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a membership's metadata or other mutable properties.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `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"
            ]
          }
        ],
        "summary": "Update membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.update('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/add_free_days": {
      "post": {
        "description": "Add free days to extend a membership's current billing period, expiration date, or Stripe trial.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "addFreeDaysMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for AddFreeDaysToMembership",
                "properties": {
                  "free_days": {
                    "description": "The number of free days to add (1-1095). Extends the billing period, expiration date, or Stripe trial depending on plan type.",
                    "example": 42,
                    "type": "integer"
                  }
                },
                "required": [
                  "free_days"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "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"
            ]
          }
        ],
        "summary": "Add free days membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.addFreeDays('mem_xxxxxxxxxxxxxx', { free_days: 42 });\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/cancel": {
      "post": {
        "description": "Cancel a membership either immediately or at the end of the current billing period. Immediate cancellation revokes access right away.\n\nRequired permissions:\n - `membership:cancel`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "cancelMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to cancel.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CancelMembership",
                "properties": {
                  "cancellation_mode": {
                    "description": "Whether to cancel immediately or at the end of the current billing period. Defaults to at_period_end.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/MembershipCancellationModes"
                      },
                      {
                        "type": "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": [
              "membership:cancel",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Cancel membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.cancel('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/pause": {
      "post": {
        "description": "Pause a membership's recurring payments. The customer retains access but will not be charged until the membership is resumed.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "pauseMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to pause.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for PauseMembership",
                "properties": {
                  "resumes_at": {
                    "description": "When the membership should automatically resume payment collection. If not provided, the membership stays paused until manually resumed.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "void_payments": {
                    "description": "Whether to void any outstanding past-due payments on this membership, preventing future collection attempts.",
                    "type": [
                      "boolean",
                      "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"
            ]
          }
        ],
        "summary": "Pause membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.pause('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/resume": {
      "post": {
        "description": "Resume a previously paused membership's recurring payments. Billing resumes on the next cycle.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "resumeMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to resume.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "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"
            ]
          }
        ],
        "summary": "Resume membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.resume('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/resync_access": {
      "post": {
        "description": "Re-run access fulfillment for a membership. Recomputes the member's content access on Whop, re-validates their Discord link (re-adding them to the server and re-assigning roles if needed), and re-fulfills TradingView indicator access. Telegram access is invite-based and cannot be resynced here. The outcome is written to the membership's logs.\n\nRequired permissions:\n - `membership:resync_access`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "resyncAccessMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to resync access for.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "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": [
              "membership:resync_access",
              "member:email:read",
              "member:basic:read"
            ]
          }
        ],
        "summary": "Resync access membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.resyncAccess('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/memberships/{id}/uncancel": {
      "post": {
        "description": "Reverse a pending cancellation for a membership that was scheduled to cancel at period end.\n\nRequired permissions:\n - `member:manage`\n - `member:email:read`\n - `member:basic:read`",
        "operationId": "uncancelMembership",
        "parameters": [
          {
            "description": "The unique identifier of the membership to uncancel.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "mem_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "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"
            ]
          }
        ],
        "summary": "Uncancel membership",
        "tags": [
          "Memberships"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst membership = await client.memberships.uncancel('mem_xxxxxxxxxxxxxx');\n\nconsole.log(membership.id);"
          }
        ]
      }
    },
    "/messages": {
      "get": {
        "description": "Returns a paginated list of messages within a specific experience chat, DM, or group chat channel, sorted by creation time.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "listMessage",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "channel_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the channel or experience to list messages for.",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for messages by creation time. Use 'asc' for oldest first or 'desc' for newest first.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsPost.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/MessageListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "List messages",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const messageListResponse of client.messages.list({ channel_id: 'channel_id' })) {\n  console.log(messageListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Send a new message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies.\n\nRequired permissions:\n - `chat:message:create`",
        "operationId": "createMessage",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateMessage",
                "properties": {
                  "attachments": {
                    "description": "A list of file attachments to include with the message, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "auto_detect_links": {
                    "description": "Automatically detect URLs in the message and generate link previews.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "channel_id": {
                    "description": "The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'.",
                    "type": "string"
                  },
                  "content": {
                    "description": "The body of the message in Markdown format. For example, 'Hello **world**'.",
                    "type": "string"
                  },
                  "poll": {
                    "description": "A poll to attach to this message, allowing recipients to vote on options.",
                    "properties": {
                      "options": {
                        "description": "The options for the poll. Must have sequential IDs starting from 1",
                        "items": {
                          "description": "Input type for a single poll option",
                          "properties": {
                            "id": {
                              "description": "Sequential ID for the poll option (starting from '1')",
                              "type": "string"
                            },
                            "text": {
                              "description": "The text of the poll option",
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "options"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "replying_to_message_id": {
                    "description": "The unique identifier of the message this is replying to, creating a threaded reply.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "channel_id",
                  "content"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "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": [
              "chat:message:create"
            ]
          }
        ],
        "summary": "Create message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.create({ channel_id: 'channel_id', content: 'content' });\n\nconsole.log(message.id);"
          }
        ]
      }
    },
    "/messages/{id}": {
      "delete": {
        "description": "Permanently delete a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message.\n\nRequired permissions:\n - `chat:message:create`",
        "operationId": "deleteMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "chat:message:create"
            ]
          }
        ],
        "summary": "Delete message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.delete('id');\n\nconsole.log(message);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing message.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "retrieveMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "Retrieve message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.retrieve('id');\n\nconsole.log(message.id);"
          }
        ]
      },
      "patch": {
        "description": "Edit the content, attachments, or pinned status of an existing message in an experience chat, DM, or group chat channel.",
        "operationId": "updateMessage",
        "parameters": [
          {
            "description": "The unique identifier of the message to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateMessage",
                "properties": {
                  "attachments": {
                    "description": "A replacement list of file attachments for this message, such as images or videos.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "content": {
                    "description": "The updated body of the message in Markdown format. For example, 'Hello **world**'.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "is_pinned": {
                    "description": "Whether this message should be pinned to the top of the channel.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Update message",
        "tags": [
          "Messages"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst message = await client.messages.update('id');\n\nconsole.log(message.id);"
          }
        ]
      }
    },
    "/notifications": {
      "post": {
        "description": "Send a push notification to users in an experience or company team. The notification is processed asynchronously and supports targeting specific users.\n\nRequired permissions:\n - `notification:create`",
        "operationId": "createNotification",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for SendNotificationV2",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of SendNotificationV2",
                    "properties": {
                      "company_id": {
                        "description": "The unique identifier of the company to target. Only team members of this company will receive the notification. Clicking the notification opens your dashboard app view.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "content": {
                        "description": "The main body text of the notification displayed to the user.",
                        "type": "string"
                      },
                      "icon_user_id": {
                        "description": "The unique identifier of a user whose profile picture will be used as the notification icon. Defaults to the experience or company avatar when not provided.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rest_path": {
                        "description": "A path segment appended to the generated deep link that opens your app. Use [restPath] in your app path configuration to read this parameter. For example, '/settings/billing'.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtitle": {
                        "description": "An optional secondary line of text displayed below the title in the notification.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The headline text of the notification, displayed prominently to the user.",
                        "type": "string"
                      },
                      "user_ids": {
                        "description": "An optional list of user IDs to narrow the audience. When provided, only these users receive the notification, provided they are in the targeted experience or company.",
                        "items": {
                          "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                          "type": "string"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "content",
                      "title",
                      "company_id"
                    ],
                    "title": "SendNotificationV2InputWithCompanyId",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of SendNotificationV2",
                    "properties": {
                      "content": {
                        "description": "The main body text of the notification displayed to the user.",
                        "type": "string"
                      },
                      "experience_id": {
                        "description": "The unique identifier of the experience to target. All users with access to this experience will receive the notification. Clicking the notification opens the experience view.",
                        "example": "exp_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "icon_user_id": {
                        "description": "The unique identifier of a user whose profile picture will be used as the notification icon. Defaults to the experience or company avatar when not provided.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "rest_path": {
                        "description": "A path segment appended to the generated deep link that opens your app. Use [restPath] in your app path configuration to read this parameter. For example, '/settings/billing'.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "subtitle": {
                        "description": "An optional secondary line of text displayed below the title in the notification.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "title": {
                        "description": "The headline text of the notification, displayed prominently to the user.",
                        "type": "string"
                      },
                      "user_ids": {
                        "description": "An optional list of user IDs to narrow the audience. When provided, only these users receive the notification, provided they are in the targeted experience or company.",
                        "items": {
                          "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                          "type": "string"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "content",
                      "title",
                      "experience_id"
                    ],
                    "title": "SendNotificationV2InputWithExperienceId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Response from queuing a notification",
                  "properties": {
                    "success": {
                      "description": "Whether the notification was successfully queued for delivery",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "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": [
              "notification:create"
            ]
          }
        ],
        "summary": "Create notification",
        "tags": [
          "Notifications"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst notification = await client.notifications.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  content: 'content',\n  title: 'title',\n});\n\nconsole.log(notification.success);"
          }
        ]
      }
    },
    "/payment_methods": {
      "get": {
        "description": "Returns a paginated list of payment methods for a member or company, with optional filtering by creation date. A payment method is a stored representation of how a customer intends to pay, such as a card, bank account, or digital wallet.\n\nRequired permissions:\n - `member:payment_methods:read`",
        "operationId": "listPaymentMethod",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member to list payment methods for.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return payment methods created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return payment methods created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PaymentMethodInterface.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PaymentMethodListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "member:payment_methods:read"
            ]
          }
        ],
        "summary": "List payment methods",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentMethodListResponse of client.paymentMethods.list()) {\n  console.log(paymentMethodListResponse);\n}"
          }
        ]
      }
    },
    "/payment_methods/{id}": {
      "delete": {
        "description": "Delete a saved payment method. Cannot delete a payment method attached to an active subscription.\n\nRequired permissions:\n - `member:payment_methods:manage`",
        "operationId": "deletePaymentMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payment method to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "payt_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member. Provide either this or company_id, not both.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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:payment_methods:manage"
            ]
          }
        ],
        "summary": "Delete payment method",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins"
      },
      "get": {
        "description": "Retrieves the details of an existing payment method.\n\nRequired permissions:\n - `member:payment_methods:read`",
        "operationId": "retrievePaymentMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payment method.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "payt_xxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company. Provide either this or member_id, not both.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "member_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the member. Provide either this or company_id, not both.",
              "example": "mber_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentMethod"
                }
              }
            },
            "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:payment_methods:read"
            ]
          }
        ],
        "summary": "Retrieve payment method",
        "tags": [
          "Payment methods"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst paymentMethod = await client.paymentMethods.retrieve('payt_xxxxxxxxxxxxx');\n\nconsole.log(paymentMethod);"
          }
        ]
      }
    },
    "/payments": {
      "get": {
        "description": "Returns a paginated list of payments for the actor in context, with optional filtering by product, plan, status, billing reason, currency, and creation date.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`",
        "operationId": "listPayment",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list payments for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to order results by, such as creation date.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ReceiptV2Order"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter payments to only those associated with these specific product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "billing_reasons",
            "required": false,
            "schema": {
              "description": "Filter payments by their billing reason.",
              "items": {
                "$ref": "#/components/schemas/BillingReasons"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "currencies",
            "required": false,
            "schema": {
              "description": "Filter payments by their currency code.",
              "items": {
                "$ref": "#/components/schemas/Currencies"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter payments to only those associated with these specific plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter payments by their current status.",
              "items": {
                "$ref": "#/components/schemas/ReceiptStatus"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "substatuses",
            "required": false,
            "schema": {
              "description": "Filter payments by their current substatus for more granular filtering.",
              "items": {
                "$ref": "#/components/schemas/FriendlyReceiptStatus"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "include_free",
            "required": false,
            "schema": {
              "description": "Whether to include payments with a zero amount.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return payments created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return payments created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "updated_before",
            "required": false,
            "schema": {
              "description": "Only return payments last updated before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "updated_after",
            "required": false,
            "schema": {
              "description": "Only return payments last updated after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "description": "Search payments by user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "checkout_configuration_ids",
            "required": false,
            "schema": {
              "description": "Only return payments from these checkout configurations.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Receipt.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PaymentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read"
            ]
          }
        ],
        "summary": "List payments",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentListResponse of client.payments.list()) {\n  console.log(paymentListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Charge an existing member off-session using one of their stored payment methods. You can provide an existing plan, or create a new one in-line. This endpoint will respond with a payment object immediately, but the payment is processed asynchronously in the background. Use webhooks to be notified when the payment succeeds or fails.\n\nRequired permissions:\n - `payment:charge`\n - `plan:create`\n - `access_pass:create`\n - `access_pass:update`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "createPayment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreatePayment",
                "oneOf": [
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "company_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "member_id": {
                        "description": "The ID of the member to create the payment for.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "plan": {
                        "description": "Pass this object to create a new plan for this payment",
                        "properties": {
                          "application_fee_amount": {
                            "description": "The application fee amount collected by the platform from this connected account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less than the total payment amount. Only valid for connected accounts with a parent company.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "billing_period": {
                            "description": "The interval in days at which the plan charges (renewal plans). For example, 30 for monthly billing.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The respective currency identifier for the plan."
                          },
                          "description": {
                            "description": "The description of the plan.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "expiration_days": {
                            "description": "The number of days until the membership expires and revokes access (expiration plans). For example, 365 for one year.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "force_create_new_plan": {
                            "description": "Whether to force the creation of a new plan even if one with the same attributes already exists.",
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "initial_price": {
                            "description": "An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "internal_notes": {
                            "description": "A personal description or notes section for the business.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "plan_type": {
                            "description": "Indicates if the plan is a one time payment or recurring.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/PlanTypes"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "product": {
                            "description": "Pass this object to create a new product for this plan. We will use the product external identifier to find or create an existing product.",
                            "properties": {
                              "collect_shipping_address": {
                                "description": "Whether or not to collect shipping information at checkout from the customer.",
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "custom_statement_descriptor": {
                                "description": "The custom statement descriptor for the product i.e. WHOP*SPORTS, must be between 5 and 22 characters, contain at least one letter, and not contain any of the following characters: <, >, \\, ', \"",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "description": {
                                "description": "A written description of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "external_identifier": {
                                "description": "A unique ID used to find or create a product. When provided during creation, we will look for an existing product with this external identifier — if found, it will be updated; otherwise, a new product will be created.",
                                "type": "string"
                              },
                              "global_affiliate_percentage": {
                                "description": "The percentage of the revenue that goes to the global affiliate program.",
                                "example": 6.9,
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "global_affiliate_status": {
                                "description": "The status of the global affiliate program for this product.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "headline": {
                                "description": "The headline of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "product_tax_code_id": {
                                "description": "The ID of the product tax code to apply to this product.",
                                "example": "ptc_xxxxxxxxxxxxxx",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "redirect_purchase_url": {
                                "description": "The URL to redirect the customer to after a purchase.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "route": {
                                "description": "The route of the product.",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "title": {
                                "description": "The title of the product.",
                                "type": "string"
                              },
                              "visibility": {
                                "description": "This product will/will not be displayed publicly - default hidden.",
                                "oneOf": [
                                  {
                                    "$ref": "#/components/schemas/Visibility"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "external_identifier",
                              "title"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "product_id": {
                            "description": "The product the plan is related to. Either this or product is required.",
                            "example": "prod_xxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "renewal_price": {
                            "description": "The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                            "example": 6.9,
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "title": {
                            "description": "The title of the plan. This will be visible on the product page to customers.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "trial_period_days": {
                            "description": "The number of free trial days added before a renewal plan.",
                            "example": 42,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "visibility": {
                            "description": "Shows or hides the plan from public/business view.",
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/Visibility"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "currency"
                        ],
                        "type": "object"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "company_id",
                      "member_id",
                      "payment_method_id",
                      "plan"
                    ],
                    "title": "CreatePaymentInputWithPlan",
                    "type": "object"
                  },
                  {
                    "description": "Autogenerated input type of CreatePayment",
                    "properties": {
                      "company_id": {
                        "description": "The ID of the company to create the payment for.",
                        "example": "biz_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "member_id": {
                        "description": "The ID of the member to create the payment for.",
                        "example": "mber_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "metadata": {
                        "additionalProperties": true,
                        "description": "Custom metadata to attach to the payment.",
                        "type": [
                          "object",
                          "null"
                        ]
                      },
                      "payment_method_id": {
                        "description": "The ID of the payment method to use for the payment. It must be connected to the Member being charged.",
                        "example": "pmt_xxxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "plan_id": {
                        "description": "An ID of an existing plan to use for the payment.",
                        "example": "plan_xxxxxxxxxxxxx",
                        "type": "string"
                      },
                      "promo_code_id": {
                        "description": "The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.",
                        "example": "promo_xxxxxxxxxxxx",
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "company_id",
                      "member_id",
                      "payment_method_id",
                      "plan_id"
                    ],
                    "title": "CreatePaymentInputWithPlanId",
                    "type": "object"
                  }
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "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": [
              "payment:charge",
              "plan:create",
              "access_pass:create",
              "access_pass:update",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Create payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  member_id: 'mber_xxxxxxxxxxxxx',\n  payment_method_id: 'pmt_xxxxxxxxxxxxxx',\n  plan: { currency: 'usd' },\n});\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payment.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "retrievePayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "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": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retrieve payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.retrieve('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/fees": {
      "get": {
        "description": "Returns the list of fees associated with a specific payment, including platform fees and processing fees.\n\nRequired permissions:\n - `payment:basic:read`",
        "operationId": "feesPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to list fees for.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Fee.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "description": "Represents a fee related to a payment",
                        "properties": {
                          "amount": {
                            "description": "The value or amount to display for the fee.",
                            "example": 6.9,
                            "type": "number"
                          },
                          "currency": {
                            "$ref": "#/components/schemas/Currencies",
                            "description": "The currency of the fee."
                          },
                          "name": {
                            "description": "The label to display for the fee.",
                            "type": "string"
                          },
                          "type": {
                            "$ref": "#/components/schemas/SpecificFeeOrigins",
                            "description": "The specific origin of the fee, if applicable."
                          }
                        },
                        "required": [
                          "name",
                          "amount",
                          "currency",
                          "type"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List fees",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const paymentListFeesResponse of client.payments.listFees('pay_xxxxxxxxxxxxxx')) {\n  console.log(paymentListFeesResponse.amount);\n}"
          }
        ]
      }
    },
    "/payments/{id}/refund": {
      "post": {
        "description": "Issue a full or partial refund for a payment. The refund is processed through the original payment processor and the membership status is updated accordingly.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "refundPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to refund.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for RefundPayment",
                "properties": {
                  "partial_amount": {
                    "description": "The amount to refund. For multi-currency payments, this is in the charge currency (what the buyer paid). For single-currency, this is in the payment currency. If omitted, the full payment amount is refunded.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "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": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Refund payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.refund('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/retry": {
      "post": {
        "description": "Retry a failed or pending payment. This re-attempts the charge using the original payment method and plan details.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "retryPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to retry.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "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": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retry payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.retry('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payments/{id}/void": {
      "post": {
        "description": "Void a payment that has not yet been settled. Voiding cancels the payment before it is captured by the payment processor.\n\nRequired permissions:\n - `payment:manage`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`",
        "operationId": "voidPayment",
        "parameters": [
          {
            "description": "The unique identifier of the payment to void.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "pay_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            },
            "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": [
              "payment:manage",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read",
              "promo_code:basic:read",
              "payment:dispute:read",
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Void payment",
        "tags": [
          "Payments"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payment = await client.payments.void('pay_xxxxxxxxxxxxxx');\n\nconsole.log(payment.id);"
          }
        ]
      }
    },
    "/payout_accounts/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payout account.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrievePayoutAccount",
        "parameters": [
          {
            "description": "The unique identifier of the payout account to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "poact_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutAccount"
                }
              }
            },
            "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": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve payout account",
        "tags": [
          "Payout accounts"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst payoutAccount = await client.payoutAccounts.retrieve('poact_xxxxxxxxxxxx');\n\nconsole.log(payoutAccount.id);"
          }
        ]
      }
    },
    "/payout_methods": {
      "get": {
        "description": "Returns a list of active payout methods configured for a company, ordered by most recently created.\n\nRequired permissions:\n - `payout:destination:read`",
        "operationId": "listPayoutMethod",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list payout methods for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PayoutToken.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PayoutMethodListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payout:destination:read"
            ]
          }
        ],
        "summary": "List payout methods",
        "tags": [
          "Payout methods"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/payout_methods/{id}": {
      "get": {
        "description": "Retrieves the details of an existing payout method.\n\nRequired permissions:\n - `payout:destination:read`",
        "operationId": "retrievePayoutMethod",
        "parameters": [
          {
            "description": "The unique identifier of the payout method to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "potk_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayoutMethod"
                }
              }
            },
            "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": [
              "payout:destination:read"
            ]
          }
        ],
        "summary": "Retrieve payout method",
        "tags": [
          "Payout methods"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/products": {
      "get": {
        "description": "Returns a paginated list of products belonging to a company, with optional filtering by type, visibility, and creation date.\n\nRequired permissions:\n - `access_pass:basic:read`",
        "operationId": "listProduct",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list products for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_types",
            "required": false,
            "schema": {
              "description": "Filter to only products matching these type classifications.",
              "items": {
                "$ref": "#/components/schemas/AccessPassTypes"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "visibilities",
            "required": false,
            "schema": {
              "description": "Filter to only products matching these visibility states.",
              "items": {
                "$ref": "#/components/schemas/VisibilityFilter"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to sort results by. Defaults to created_at.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AccessPassOrder"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return products created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return products created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicAccessPass.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ProductListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "List products",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const productListItem of client.products.list({ company_id: 'company_id' })) {\n  console.log(productListItem.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new product for a company. The product serves as the top-level container for plans and experiences.\n\nRequired permissions:\n - `access_pass:create`\n - `access_pass:basic:read`",
        "operationId": "createProduct",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateAccessPass",
                "properties": {
                  "collect_shipping_address": {
                    "description": "Whether the checkout flow collects a shipping address from the customer.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "company_id": {
                    "description": "The unique identifier of the company to create this product for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "custom_cta": {
                    "description": "The call-to-action button label displayed on the product's purchase page (e.g., join, buy, subscribe).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CustomCtas"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_cta_url": {
                    "description": "A URL that the call-to-action button links to instead of the default checkout flow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_statement_descriptor": {
                    "description": "A custom text label that appears on the customer's bank statement. Must be 5-22 characters, contain at least one letter, and not contain <, >, \\, ', or \" characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A written description of the product displayed on its product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "experience_ids": {
                    "description": "The unique identifiers of experiences to connect to this product.",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "global_affiliate_percentage": {
                    "description": "The commission rate as a percentage that affiliates earn through the global affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "global_affiliate_status": {
                    "description": "The enrollment status of this product in the global affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headline": {
                    "description": "A short marketing headline displayed prominently on the product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_affiliate_percentage": {
                    "description": "The commission rate as a percentage that members earn through the member affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "member_affiliate_status": {
                    "description": "The enrollment status of this product in the member affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs to store on the product. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "plan_options": {
                    "description": "Configuration for an automatically generated plan to attach to this product.",
                    "properties": {
                      "base_currency": {
                        "description": "The respective currency identifier for the plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Currencies"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "billing_period": {
                        "description": "The interval at which the plan charges (renewal plans).",
                        "example": 42,
                        "type": [
                          "integer",
                          "null"
                        ]
                      },
                      "custom_fields": {
                        "description": "An array of custom field objects.",
                        "items": {
                          "properties": {
                            "field_type": {
                              "$ref": "#/components/schemas/CustomFieldTypes",
                              "description": "The type of the custom field."
                            },
                            "id": {
                              "description": "The ID of the custom field (if being updated)",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "name": {
                              "description": "The name of the custom field.",
                              "type": "string"
                            },
                            "order": {
                              "description": "The order of the field.",
                              "example": 42,
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "placeholder": {
                              "description": "The placeholder value of the field.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "required": {
                              "description": "Whether or not the field is required.",
                              "type": [
                                "boolean",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "field_type",
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      },
                      "initial_price": {
                        "description": "An additional amount charged upon first purchase. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "plan_type": {
                        "description": "Indicates if the plan is a one time payment or recurring.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/PlanTypes"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "release_method": {
                        "description": "The method by which the plan is released to the public.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/ReleaseMethod"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "renewal_price": {
                        "description": "The amount the customer is charged every billing period. Provided as a number in the specified currency. Eg: 10.43 for $10.43 USD.",
                        "example": 6.9,
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "visibility": {
                        "description": "The visibility of the plan.",
                        "oneOf": [
                          {
                            "$ref": "#/components/schemas/Visibility"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_tax_code_id": {
                    "description": "The unique identifier of the tax classification code to apply to this product.",
                    "example": "ptc_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_purchase_url": {
                    "description": "A URL to redirect the customer to after completing a purchase.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The URL slug for the product's public link.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_welcome_message": {
                    "description": "Whether to send an automated welcome message via support chat when a user joins this product. Defaults to true.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the product. Maximum 80 characters.",
                    "type": "string"
                  },
                  "visibility": {
                    "description": "Whether the product is visible to customers. When set to hidden, the product is only accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Visibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "company_id",
                  "title"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "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": [
              "access_pass:create",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Create product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.create({ title: 'title' });\n\nconsole.log(product.id);"
          }
        ]
      }
    },
    "/products/{id}": {
      "delete": {
        "description": "Permanently delete a product and remove it from the company's catalog.\n\nRequired permissions:\n - `access_pass:delete`",
        "operationId": "deleteProduct",
        "parameters": [
          {
            "description": "The unique identifier of the product to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "access_pass:delete"
            ]
          }
        ],
        "summary": "Delete product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.delete('id');\n\nconsole.log(product);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing product.\n\nRequired permissions:\n - `access_pass:basic:read`",
        "operationId": "retrieveProduct",
        "parameters": [
          {
            "description": "The unique identifier or route slug of the product.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "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": [
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Retrieve product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.retrieve('id');\n\nconsole.log(product.id);"
          }
        ]
      },
      "patch": {
        "description": "Update a product's title, description, visibility, and other settings.\n\nRequired permissions:\n - `access_pass:update`\n - `access_pass:basic:read`",
        "operationId": "updateProduct",
        "parameters": [
          {
            "description": "The unique identifier of the product to update.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateAccessPass",
                "properties": {
                  "collect_shipping_address": {
                    "description": "Whether the checkout flow collects a shipping address from the customer.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "custom_cta": {
                    "description": "The call-to-action button label displayed on the product's purchase page (e.g., join, buy, subscribe).",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/CustomCtas"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "custom_cta_url": {
                    "description": "A URL that the call-to-action button links to instead of the default checkout flow.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "custom_statement_descriptor": {
                    "description": "A custom text label that appears on the customer's bank statement. Must be 5-22 characters, contain at least one letter, and not contain <, >, \\, ', or \" characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "description": {
                    "description": "A written description of the product displayed on its product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "gallery_images": {
                    "description": "The gallery images for the product.",
                    "items": {
                      "description": "Input for an attachment",
                      "properties": {
                        "id": {
                          "description": "The ID of an existing file object.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "title": "FileInputWithId",
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "global_affiliate_percentage": {
                    "description": "The commission rate as a percentage that affiliates earn through the global affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "global_affiliate_status": {
                    "description": "The enrollment status of this product in the global affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headline": {
                    "description": "A short marketing headline displayed prominently on the product page.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "member_affiliate_percentage": {
                    "description": "The commission rate as a percentage that members earn through the member affiliate program.",
                    "example": 6.9,
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "member_affiliate_status": {
                    "description": "The enrollment status of this product in the member affiliate program.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/GlobalAffiliateStatuses"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "metadata": {
                    "additionalProperties": true,
                    "description": "Custom key-value pairs to store on the product. Included in webhook payloads for payment and membership events. Max 50 keys, 100 chars per key, 500 chars per string value.",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "product_tax_code_id": {
                    "description": "The unique identifier of the tax classification code to apply to this product.",
                    "example": "ptc_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "redirect_purchase_url": {
                    "description": "A URL to redirect the customer to after completing a purchase.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "route": {
                    "description": "The URL slug for the product's public link.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "send_welcome_message": {
                    "description": "Whether to send an automated welcome message via support chat when a user joins this product.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "store_page_config": {
                    "description": "Layout and display configuration for this product on the company's store page.",
                    "properties": {
                      "custom_cta": {
                        "description": "Custom call-to-action text for the product's store page.",
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "show_price": {
                        "description": "Whether or not to show the price on the product's store page.",
                        "type": [
                          "boolean",
                          "null"
                        ]
                      }
                    },
                    "required": [],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "title": {
                    "description": "The display name of the product. Maximum 80 characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "visibility": {
                    "description": "Whether the product is visible to customers. When set to hidden, the product is only accessible via direct link.",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/Visibility"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                }
              }
            },
            "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": [
              "access_pass:update",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Update product",
        "tags": [
          "Products"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst product = await client.products.update('id');\n\nconsole.log(product.id);"
          }
        ]
      }
    },
    "/promo_codes": {
      "get": {
        "description": "Returns a paginated list of promo codes belonging to a company, with optional filtering by product, plan, and status.\n\nRequired permissions:\n - `promo_code:basic:read`\n - `access_pass:basic:read`",
        "operationId": "listPromoCode",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list promo codes for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_ids",
            "required": false,
            "schema": {
              "description": "Filter to only promo codes scoped to these product identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "plan_ids",
            "required": false,
            "schema": {
              "description": "Filter to only promo codes scoped to these plan identifiers.",
              "items": {
                "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "description": "Filter to only promo codes matching this status.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/PromoCodeStatus"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return promo codes created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return promo codes created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PromoCode.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/PromoCodeListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "promo_code:basic:read",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "List promo codes",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const promoCodeListResponse of client.promoCodes.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(promoCodeListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new promo code that applies a discount at checkout. Can be scoped to specific products or plans.\n\nRequired permissions:\n - `promo_code:create`\n - `access_pass:basic:read`",
        "operationId": "createPromoCode",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreatePromoCode",
                "properties": {
                  "amount_off": {
                    "description": "The discount amount. When promo_type is percentage, this is the percent off (e.g., 20 for 20% off). When promo_type is flat_amount, this is the currency amount off (e.g., 10.00 for $10.00 off).",
                    "example": 6.9,
                    "type": "number"
                  },
                  "base_currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The three-letter ISO currency code for the promo code discount."
                  },
                  "churned_users_only": {
                    "description": "Whether to restrict this promo code to only users who have previously churned from the company.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "code": {
                    "description": "The alphanumeric code customers enter at checkout to apply the discount.",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The unique identifier of the company to create this promo code for.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "existing_memberships_only": {
                    "description": "Whether this promo code can only be applied to existing memberships, such as for cancellation retention offers.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "expires_at": {
                    "description": "The datetime when the promo code expires and can no longer be used. Null means it never expires.",
                    "example": "2023-12-01T05:00:00.401Z",
                    "format": "date-time",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "new_users_only": {
                    "description": "Whether to restrict this promo code to only users who have never purchased from the company before.",
                    "type": "boolean"
                  },
                  "one_per_customer": {
                    "description": "Whether each customer can only use this promo code once.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "plan_ids": {
                    "description": "The identifiers of plans this promo code applies to. When product_id is also provided, only plans attached to that product are included.",
                    "items": {
                      "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.",
                      "type": "string"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "product_id": {
                    "description": "The identifier of the product to scope this promo code to. When provided, the promo code only applies to plans attached to this product.",
                    "example": "prod_xxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "promo_duration_months": {
                    "description": "The number of billing months the discount remains active. For example, 3 means the discount applies to the first 3 billing cycles.",
                    "example": 42,
                    "type": "integer"
                  },
                  "promo_type": {
                    "$ref": "#/components/schemas/PromoTypes",
                    "description": "The discount type, either percentage or flat_amount."
                  },
                  "stock": {
                    "description": "The maximum number of times this promo code can be used. Ignored when unlimited_stock is true.",
                    "example": 42,
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "unlimited_stock": {
                    "description": "Whether the promo code can be used an unlimited number of times.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  }
                },
                "required": [
                  "amount_off",
                  "base_currency",
                  "code",
                  "company_id",
                  "new_users_only",
                  "promo_duration_months",
                  "promo_type"
                ],
                "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:create",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Create promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.create({\n  amount_off: 6.9,\n  base_currency: 'usd',\n  code: 'code',\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  new_users_only: true,\n  promo_duration_months: 42,\n  promo_type: 'percentage',\n});\n\nconsole.log(promoCode.id);"
          }
        ]
      }
    },
    "/promo_codes/{id}": {
      "delete": {
        "description": "Archive a promo code, preventing it from being used in future checkouts. Existing memberships are not affected.\n\nRequired permissions:\n - `promo_code:delete`",
        "operationId": "deletePromoCode",
        "parameters": [
          {
            "description": "The unique identifier of the promo code to archive.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "promo_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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:delete"
            ]
          }
        ],
        "summary": "Delete promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.delete('promo_xxxxxxxxxxxx');\n\nconsole.log(promoCode);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing promo code.\n\nRequired permissions:\n - `promo_code:basic:read`\n - `access_pass:basic:read`",
        "operationId": "retrievePromoCode",
        "parameters": [
          {
            "description": "The unique identifier of the promo code.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "promo_xxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "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:basic:read",
              "access_pass:basic:read"
            ]
          }
        ],
        "summary": "Retrieve promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst promoCode = await client.promoCodes.retrieve('promo_xxxxxxxxxxxx');\n\nconsole.log(promoCode.id);"
          }
        ]
      },
      "patch": {
        "description": "Update whether a promo code can be used at checkout.\n\nRequired permissions:\n - `promo_code:update`\n - `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"
            ]
          }
        ],
        "summary": "Update promo code",
        "tags": [
          "Promo codes"
        ],
        "x-group-title": "Payins"
      }
    },
    "/reactions": {
      "get": {
        "description": "Returns a paginated list of emoji reactions on a specific message or forum post, sorted by most recent.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "listReaction",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "resource_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the message or forum post to list reactions for.",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Reaction.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ReactionListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "List reactions",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const reactionListResponse of client.reactions.list({ resource_id: 'resource_id' })) {\n  console.log(reactionListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Add an emoji reaction or poll vote to a message or forum post. In forums, the reaction is always a like.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "createReaction",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateReaction",
                "properties": {
                  "emoji": {
                    "description": "The emoji to react with, in shortcode or unicode format. For example, ':heart:' or a unicode emoji. Ignored in forums where reactions are always likes.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "poll_option_id": {
                    "description": "The unique identifier of a poll option to vote for. Only valid when the target message or post contains a poll.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "resource_id": {
                    "description": "The unique identifier of the message or forum post to react to.",
                    "type": "string"
                  }
                },
                "required": [
                  "resource_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            },
            "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "Create reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.create({ resource_id: 'resource_id' });\n\nconsole.log(reaction.id);"
          }
        ]
      }
    },
    "/reactions/{id}": {
      "delete": {
        "description": "Remove an emoji reaction from a message or forum post. Only the reaction author or a channel admin can remove a reaction.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "deleteReaction",
        "parameters": [
          {
            "description": "The unique identifier of the reaction to remove, or the identifier of the message or forum post to remove a reaction from. When passing a message or post ID, you must also provide the emoji argument.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "explode": true,
            "in": "query",
            "name": "emoji",
            "required": false,
            "schema": {
              "description": "The emoji to remove, in shortcode or unicode format. For example, ':heart:' or a unicode emoji. Required when the id refers to a message or post instead of a reaction.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "Delete reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.delete('reac_xxxxxxxxxxxxxxxxxxxxxx');\n\nconsole.log(reaction);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing reaction.\n\nRequired permissions:\n - `chat:read`",
        "operationId": "retrieveReaction",
        "parameters": [
          {
            "description": "The unique identifier of the reaction to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reac_xxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reaction"
                }
              }
            },
            "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": [
              "chat:read"
            ]
          }
        ],
        "summary": "Retrieve reaction",
        "tags": [
          "Reactions"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst reaction = await client.reactions.retrieve('reac_xxxxxxxxxxxxxxxxxxxxxx');\n\nconsole.log(reaction.id);"
          }
        ]
      }
    },
    "/refunds": {
      "get": {
        "description": "Returns a paginated list of refunds, with optional filtering by payment, company, user, and creation date.\n\nRequired permissions:\n - `payment:basic:read`",
        "operationId": "listRefund",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payment_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to only those associated with this specific payment.",
              "example": "pay_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to only those belonging to this company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter refunds to only those associated with this specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return refunds created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return refunds created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Refund.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/RefundListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List refunds",
        "tags": [
          "Refunds"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const refundListResponse of client.refunds.list()) {\n  console.log(refundListResponse.id);\n}"
          }
        ]
      }
    },
    "/refunds/{id}": {
      "get": {
        "description": "Retrieves the details of an existing refund.\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`",
        "operationId": "retrieveRefund",
        "parameters": [
          {
            "description": "The unique identifier of the refund.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "rf_xxxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refund"
                }
              }
            },
            "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": [
              "payment:basic:read",
              "plan:basic:read",
              "access_pass:basic:read",
              "member:email:read",
              "member:basic:read",
              "member:phone:read"
            ]
          }
        ],
        "summary": "Retrieve refund",
        "tags": [
          "Refunds"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst refund = await client.refunds.retrieve('rf_xxxxxxxxxxxxxxx');\n\nconsole.log(refund.id);"
          }
        ]
      }
    },
    "/resolution_center_cases": {
      "get": {
        "description": "Returns a paginated list of resolution center cases, with optional filtering by company, status, and creation date.\n\nRequired permissions:\n - `payment:resolution_center_case:read`",
        "operationId": "listResolutionCenterCase",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list resolution center cases for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "statuses",
            "required": false,
            "schema": {
              "description": "Filter by resolution center case status.",
              "items": {
                "$ref": "#/components/schemas/ResolutionCenterCaseStatuses"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return cases created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return cases created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicResolution.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ResolutionCenterCaseListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "List resolution center cases",
        "tags": [
          "Resolution center cases"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const resolutionCenterCaseListResponse of client.resolutionCenterCases.list()) {\n  console.log(resolutionCenterCaseListResponse.id);\n}"
          }
        ]
      }
    },
    "/resolution_center_cases/{id}": {
      "get": {
        "description": "Retrieves the details of an existing resolution center case.\n\nRequired permissions:\n - `payment:resolution_center_case:read`",
        "operationId": "retrieveResolutionCenterCase",
        "parameters": [
          {
            "description": "The unique identifier of the resolution center case.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "reso_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResolutionCenterCase"
                }
              }
            },
            "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": [
              "payment:resolution_center_case:read"
            ]
          }
        ],
        "summary": "Retrieve resolution center case",
        "tags": [
          "Resolution center cases"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst resolutionCenterCase = await client.resolutionCenterCases.retrieve('reso_xxxxxxxxxxxxx');\n\nconsole.log(resolutionCenterCase.id);"
          }
        ]
      }
    },
    "/reviews": {
      "get": {
        "description": "Returns a paginated list of customer reviews for a specific product, with optional filtering by star rating and creation date.",
        "operationId": "listReview",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "product_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the product to list reviews for.",
              "example": "prod_xxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "min_stars",
            "required": false,
            "schema": {
              "description": "The minimum star rating to include in results, from 1 to 5 inclusive.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "max_stars",
            "required": false,
            "schema": {
              "description": "The maximum star rating to include in results, from 1 to 5 inclusive.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return reviews created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return reviews created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Review.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ReviewListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": []
          }
        ],
        "summary": "List reviews",
        "tags": [
          "Reviews"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const reviewListResponse of client.reviews.list({ product_id: 'prod_xxxxxxxxxxxxx' })) {\n  console.log(reviewListResponse.id);\n}"
          }
        ]
      }
    },
    "/reviews/{id}": {
      "get": {
        "description": "Retrieves the details of an existing review.",
        "operationId": "retrieveReview",
        "parameters": [
          {
            "description": "The unique identifier of the review to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "rev_xxxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Review"
                }
              }
            },
            "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": []
          }
        ],
        "summary": "Retrieve review",
        "tags": [
          "Reviews"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst review = await client.reviews.retrieve('rev_xxxxxxxxxxxxxx');\n\nconsole.log(review.id);"
          }
        ]
      }
    },
    "/setup_intents": {
      "get": {
        "description": "Returns a paginated list of setup intents for a company, with optional filtering by creation date. A setup intent securely collects and stores a member's payment method for future use without charging them immediately.\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "listSetupIntent",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list setup intents for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for ordering results, either ascending or descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return setup intents created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return setup intents created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for SetupIntent.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/SetupIntentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payment:setup_intent:read",
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "List setup intents",
        "tags": [
          "Setup intents"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const setupIntentListResponse of client.setupIntents.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(setupIntentListResponse.id);\n}"
          }
        ]
      }
    },
    "/setup_intents/{id}": {
      "get": {
        "description": "Retrieves the details of an existing setup intent.\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`",
        "operationId": "retrieveSetupIntent",
        "parameters": [
          {
            "description": "The unique identifier of the setup intent.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "sint_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupIntent"
                }
              }
            },
            "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": [
              "payment:setup_intent:read",
              "member:basic:read",
              "member:email:read"
            ]
          }
        ],
        "summary": "Retrieve setup intent",
        "tags": [
          "Setup intents"
        ],
        "x-group-title": "Payins",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst setupIntent = await client.setupIntents.retrieve('sint_xxxxxxxxxxxxx');\n\nconsole.log(setupIntent.id);"
          }
        ]
      }
    },
    "/shipments": {
      "get": {
        "description": "Returns a paginated list of shipments, with optional filtering by payment, company, or user.\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`",
        "operationId": "listShipment",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payment_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those associated with this specific payment.",
              "example": "pay_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those belonging to this company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Filter shipments to only those for this specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Shipment.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/ShipmentListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "shipment:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "List shipments",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const shipmentListResponse of client.shipments.list()) {\n  console.log(shipmentListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Create a new shipment with a tracking code for a specific payment within a company.\n\nRequired permissions:\n - `shipment:create`\n - `payment:basic:read`",
        "operationId": "createShipment",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateShipment",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to create the shipment for, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "payment_id": {
                    "description": "The unique identifier of the payment to associate the shipment with.",
                    "example": "pay_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "tracking_code": {
                    "description": "The carrier tracking code for the shipment, such as a USPS, UPS, or FedEx tracking number.",
                    "type": "string"
                  }
                },
                "required": [
                  "company_id",
                  "payment_id",
                  "tracking_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "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": [
              "shipment:create",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Create shipment",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst shipment = await client.shipments.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  payment_id: 'pay_xxxxxxxxxxxxxx',\n  tracking_code: 'tracking_code',\n});\n\nconsole.log(shipment.id);"
          }
        ]
      }
    },
    "/shipments/{id}": {
      "get": {
        "description": "Retrieves the details of an existing shipment.\n\nRequired permissions:\n - `shipment:basic:read`\n - `payment:basic:read`",
        "operationId": "retrieveShipment",
        "parameters": [
          {
            "description": "The unique identifier of the shipment to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "ship_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Shipment"
                }
              }
            },
            "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": [
              "shipment:basic:read",
              "payment:basic:read"
            ]
          }
        ],
        "summary": "Retrieve shipment",
        "tags": [
          "Shipments"
        ],
        "x-group-title": "CRM",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst shipment = await client.shipments.retrieve('ship_xxxxxxxxxxxxx');\n\nconsole.log(shipment.id);"
          }
        ]
      }
    },
    "/stats/describe": {
      "get": {
        "description": "Describe available stats schema. Without resource returns root nodes and metrics. With resource returns node columns, associations, and available metrics.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "describeStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": false,
            "schema": {
              "description": "Resource path using : as separator (e.g., 'receipts', 'payments:membership', 'receipts:gross_revenue').",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "discriminator": {
                    "propertyName": "typename"
                  },
                  "oneOf": [
                    {
                      "description": "Root schema description showing available nodes, views, and metrics.",
                      "properties": {
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "metrics": {
                          "description": "Available metrics.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "nodes": {
                          "description": "Available root nodes.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeRoot",
                          "description": "The typename of this object",
                          "type": "string"
                        },
                        "views": {
                          "description": "Available API resource views.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "typename",
                        "nodes",
                        "views",
                        "metrics",
                        "debug"
                      ],
                      "title": "DescribeRoot",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of a node (model) including its columns and associations.",
                      "properties": {
                        "associations": {
                          "description": "Available associations or child paths.",
                          "items": {
                            "description": "An association or child path available for navigation.",
                            "properties": {
                              "event_name": {
                                "description": "The event name (for event type).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "model": {
                                "description": "The associated model class name (for model associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "description": "The association name.",
                                "type": "string"
                              },
                              "path": {
                                "description": "The full path (for event associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "description": "The type (belongs_to, has_many, has_one, event, namespace).",
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "type",
                              "model",
                              "path",
                              "event_name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "columns": {
                          "description": "Available columns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "metrics": {
                          "description": "Available metrics for this node.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "node": {
                          "description": "The node path being described.",
                          "type": "string"
                        },
                        "sample": {
                          "description": "Sample data rows.",
                          "items": {
                            "additionalProperties": true,
                            "description": "Represents untyped JSON",
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "sortable_columns": {
                          "description": "Columns that can be used for sorting.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeNode",
                          "description": "The typename of this object",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "node",
                        "engine",
                        "columns",
                        "sortable_columns",
                        "associations",
                        "metrics",
                        "sample",
                        "debug"
                      ],
                      "title": "DescribeNode",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of a metric including its configuration and SQL.",
                      "properties": {
                        "breakdownable_columns": {
                          "description": "Columns that can be used for breakdowns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "filterable_columns": {
                          "description": "Columns that can be used for filtering.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "metric": {
                          "description": "The metric name.",
                          "type": "string"
                        },
                        "node": {
                          "description": "The node path this metric operates on.",
                          "type": "string"
                        },
                        "sql": {
                          "description": "The generated SQL query.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "supported_engines": {
                          "description": "Query engines that support this metric.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "timestamp_column": {
                          "description": "The timestamp column used for time filtering.",
                          "type": "string"
                        },
                        "typename": {
                          "const": "DescribeMetric",
                          "description": "The typename of this object",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "metric",
                        "node",
                        "engine",
                        "timestamp_column",
                        "supported_engines",
                        "filterable_columns",
                        "breakdownable_columns",
                        "sql",
                        "debug"
                      ],
                      "title": "DescribeMetric",
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    {
                      "description": "Description of an API resource view including its columns and associations.",
                      "properties": {
                        "associations": {
                          "description": "Available associations.",
                          "items": {
                            "description": "An association or child path available for navigation.",
                            "properties": {
                              "event_name": {
                                "description": "The event name (for event type).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "model": {
                                "description": "The associated model class name (for model associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "description": "The association name.",
                                "type": "string"
                              },
                              "path": {
                                "description": "The full path (for event associations).",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "type": {
                                "description": "The type (belongs_to, has_many, has_one, event, namespace).",
                                "type": "string"
                              }
                            },
                            "required": [
                              "name",
                              "type",
                              "model",
                              "path",
                              "event_name"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "columns": {
                          "description": "Available columns.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "debug": {
                          "description": "Debug information.",
                          "properties": {
                            "request_id": {
                              "description": "Unique request identifier for debugging.",
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          },
                          "required": [
                            "request_id"
                          ],
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "engine": {
                          "description": "The query engine being used.",
                          "type": "string"
                        },
                        "metrics": {
                          "description": "Available metrics.",
                          "items": {
                            "description": "A metric available for querying.",
                            "properties": {
                              "name": {
                                "description": "The metric name.",
                                "type": "string"
                              },
                              "node_path": {
                                "description": "The node path this metric operates on.",
                                "type": "string"
                              },
                              "supported_engines": {
                                "description": "Query engines that support this metric.",
                                "items": {
                                  "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "name",
                              "node_path",
                              "supported_engines"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "model": {
                          "description": "The underlying model class.",
                          "type": "string"
                        },
                        "resource": {
                          "description": "The API resource name.",
                          "type": "string"
                        },
                        "sample": {
                          "description": "Sample data rows.",
                          "items": {
                            "additionalProperties": true,
                            "description": "Represents untyped JSON",
                            "type": "object"
                          },
                          "type": [
                            "array",
                            "null"
                          ]
                        },
                        "sortable_columns": {
                          "description": "Columns that can be used for sorting.",
                          "items": {
                            "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "typename": {
                          "const": "DescribeView",
                          "description": "The typename of this object",
                          "type": "string"
                        },
                        "view": {
                          "description": "The view name being described.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "typename",
                        "view",
                        "resource",
                        "model",
                        "engine",
                        "columns",
                        "sortable_columns",
                        "associations",
                        "metrics",
                        "sample",
                        "debug"
                      ],
                      "title": "DescribeView",
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  ],
                  "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": [
              "stats:read"
            ]
          }
        ],
        "summary": "Describe stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/stats/metric": {
      "get": {
        "description": "Query an aggregated metric. Returns data grouped by period with optional breakdowns.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "metricStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Metric resource using : as separator (e.g., 'receipts:gross_revenue', 'members:new_users').",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "granularity",
            "required": false,
            "schema": {
              "description": "Time granularity (daily, weekly, monthly).",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "breakdowns",
            "required": false,
            "schema": {
              "description": "Columns to break down the metric by.",
              "items": {
                "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                "type": "string"
              },
              "type": [
                "array",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "filters",
            "required": false,
            "schema": {
              "additionalProperties": true,
              "description": "Key-value pairs to filter the data.",
              "type": [
                "object",
                "null"
              ]
            },
            "style": "deepObject"
          },
          {
            "explode": true,
            "in": "query",
            "name": "time_zone",
            "required": false,
            "schema": {
              "description": "IANA timezone for period bucketing (e.g. 'America/New_York'). Defaults to UTC. Only applies to ClickHouse metrics.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "description": "Start of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "description": "End of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Result from a stats query (raw, metric, or SQL).",
                  "properties": {
                    "columns": {
                      "description": "Column names in the order they appear in each data row.",
                      "items": {
                        "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "data": {
                      "description": "Array of data rows, where each row is an array of values matching the columns order.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents untyped JSON",
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "debug": {
                      "description": "Debug information including engine and SQL.",
                      "properties": {
                        "engine": {
                          "description": "The query engine used.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "request_id": {
                          "description": "Unique request identifier for debugging.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sql": {
                          "description": "The generated SQL query (with IDs sanitized).",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "engine",
                        "request_id",
                        "sql"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "node": {
                      "description": "The node path that was queried.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pagination": {
                      "description": "Pagination information.",
                      "properties": {
                        "next_cursor": {
                          "description": "Cursor for the next page of results.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "next_cursor"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "typename": {
                      "const": "Result",
                      "description": "The typename of this object",
                      "type": "string"
                    }
                  },
                  "required": [
                    "columns",
                    "data",
                    "debug",
                    "node",
                    "pagination",
                    "typename"
                  ],
                  "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": [
              "stats:read"
            ]
          }
        ],
        "summary": "Metric stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/stats/raw": {
      "get": {
        "description": "Query raw data from a resource. Returns paginated rows with all columns.\n\nRequired permissions:\n - `stats:read`",
        "operationId": "rawStats",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "resource",
            "required": true,
            "schema": {
              "description": "Resource path using : as separator (e.g., 'members', 'payments:membership').",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "description": "Start of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "description": "End of time range (unix timestamp).",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "description": "Number of records to return (max 10000).",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "description": "Pagination cursor for next page.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "description": "Column to sort by.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "sort_direction",
            "required": false,
            "schema": {
              "description": "Sort direction (asc or desc).",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific company.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "user_id",
            "required": false,
            "schema": {
              "description": "Scope query to a specific user.",
              "example": "user_xxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Result from a stats query (raw, metric, or SQL).",
                  "properties": {
                    "columns": {
                      "description": "Column names in the order they appear in each data row.",
                      "items": {
                        "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.",
                        "type": "string"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "data": {
                      "description": "Array of data rows, where each row is an array of values matching the columns order.",
                      "items": {
                        "additionalProperties": true,
                        "description": "Represents untyped JSON",
                        "type": "object"
                      },
                      "type": [
                        "array",
                        "null"
                      ]
                    },
                    "debug": {
                      "description": "Debug information including engine and SQL.",
                      "properties": {
                        "engine": {
                          "description": "The query engine used.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "request_id": {
                          "description": "Unique request identifier for debugging.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "sql": {
                          "description": "The generated SQL query (with IDs sanitized).",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "engine",
                        "request_id",
                        "sql"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "node": {
                      "description": "The node path that was queried.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "pagination": {
                      "description": "Pagination information.",
                      "properties": {
                        "next_cursor": {
                          "description": "Cursor for the next page of results.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "next_cursor"
                      ],
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "columns",
                    "data",
                    "debug",
                    "node",
                    "pagination"
                  ],
                  "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": [
              "stats:read"
            ]
          }
        ],
        "summary": "Raw stats",
        "tags": [
          "Stats"
        ],
        "x-group-title": "Stats"
      }
    },
    "/support_channels": {
      "get": {
        "description": "Returns a paginated list of support channels for a specific company, with optional filtering by resolution status and custom sorting.\n\nRequired permissions:\n - `support_chat:read`",
        "operationId": "listSupportChannel",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": false,
            "schema": {
              "description": "The unique identifier of the company to list support channels for. Includes channels of child companies. When omitted, returns support channels across all companies the user has access to.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "view",
            "required": false,
            "schema": {
              "description": "Filter support channels by the authenticated user's role. Defaults to admin. When the caller is a company API key (no user), only admin-visible channels are returned.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/SupportChannelView"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "open",
            "required": false,
            "schema": {
              "description": "Whether to filter by open or resolved support channels. Set to true to only return channels awaiting a response, or false for resolved channels.",
              "type": [
                "boolean",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for the results. Use 'asc' for oldest first or 'desc' for newest first.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "order",
            "required": false,
            "schema": {
              "description": "The field to sort the support channels by, such as creation date or last message time.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MessageChannelOrder"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for DmsFeed.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/SupportChannelListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "List support channels",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const supportChannelListResponse of client.supportChannels.list()) {\n  console.log(supportChannelListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Open a new support channel between a company team member and a customer. Returns the existing channel if one already exists for that user.\n\nRequired permissions:\n - `support_chat:create`",
        "operationId": "createSupportChannel",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateSupportChatForUser",
                "properties": {
                  "company_id": {
                    "description": "The unique identifier of the company to create the support channel in.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "custom_name": {
                    "description": "Optional custom display name for the support channel.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "user_id": {
                    "description": "The user ID (e.g. 'user_xxxxx') or username of the customer to open a support channel for.",
                    "example": "user_xxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "company_id",
                  "user_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportChannel"
                }
              }
            },
            "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": [
              "support_chat:create"
            ]
          }
        ],
        "summary": "Create support channel",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst supportChannel = await client.supportChannels.create({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  user_id: 'user_xxxxxxxxxxxxx',\n});\n\nconsole.log(supportChannel.id);"
          }
        ]
      }
    },
    "/support_channels/{id}": {
      "get": {
        "description": "Retrieves the details of an existing support channel.\n\nRequired permissions:\n - `support_chat:read`",
        "operationId": "retrieveSupportChannel",
        "parameters": [
          {
            "description": "The unique identifier of the support channel to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportChannel"
                }
              }
            },
            "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": [
              "support_chat:read"
            ]
          }
        ],
        "summary": "Retrieve support channel",
        "tags": [
          "Support channels"
        ],
        "x-group-title": "Engagement",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst supportChannel = await client.supportChannels.retrieve('id');\n\nconsole.log(supportChannel.id);"
          }
        ]
      }
    },
    "/topups": {
      "post": {
        "description": "Add funds to a company's platform balance by charging a stored payment method. Top-ups have no fees or taxes and do not count as revenue.\n\nRequired permissions:\n - `payment:charge`",
        "operationId": "createTopup",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateTopup",
                "properties": {
                  "amount": {
                    "description": "The amount to add to the balance in the specified currency. For example, 50.00 for $50.00 USD.",
                    "example": 6.9,
                    "type": "number"
                  },
                  "company_id": {
                    "description": "The unique identifier of the company to add funds to, starting with 'biz_'.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The currency for the top-up amount, such as 'usd'."
                  },
                  "payment_method_id": {
                    "description": "The unique identifier of the stored payment method to charge for the top-up.",
                    "example": "pmt_xxxxxxxxxxxxxx",
                    "type": "string"
                  }
                },
                "required": [
                  "amount",
                  "company_id",
                  "currency",
                  "payment_method_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Topup"
                }
              }
            },
            "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": [
              "payment:charge"
            ]
          }
        ],
        "summary": "Create topup",
        "tags": [
          "Topups"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst topup = await client.topups.create({\n  amount: 6.9,\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  currency: 'usd',\n  payment_method_id: 'pmt_xxxxxxxxxxxxxx',\n});\n\nconsole.log(topup.id);"
          }
        ]
      }
    },
    "/verifications": {
      "get": {
        "description": "Returns a list of identity verifications for a payout account, ordered by most recent first.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "listVerification",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "payout_account_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the payout account to list verifications for.",
              "example": "poact_xxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Verification.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/VerificationListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "List verifications",
        "tags": [
          "Verifications"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst verifications = await client.verifications.list({ account_id: 'account_id' });\n\nconsole.log(verifications.data);"
          }
        ]
      }
    },
    "/verifications/{id}": {
      "get": {
        "description": "Retrieves the details of an existing verification.\n\nRequired permissions:\n - `payout:account:read`",
        "operationId": "retrieveVerification",
        "parameters": [
          {
            "description": "The unique identifier of the verification to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "verf_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Verification"
                }
              }
            },
            "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": [
              "payout:account:read"
            ]
          }
        ],
        "summary": "Retrieve verification",
        "tags": [
          "Verifications"
        ],
        "x-group-title": "Payouts"
      }
    },
    "/webhooks": {
      "get": {
        "description": "Returns a paginated list of webhook endpoints configured for a company, ordered by most recently created.\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "listWebhook",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list webhooks for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for Webhook.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "List webhooks",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const webhookListResponse of client.webhooks.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(webhookListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a new webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "createWebhook",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateWebhook",
                "properties": {
                  "api_version": {
                    "description": "The API version for this webhook",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ApiVersion"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "child_resource_events": {
                    "description": "Whether or not to send events for child resources. For example, if the webhook is created for a Company, enabling this will only send events from the Company's sub-merchants (child companies).",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "enabled": {
                    "description": "Whether or not the webhook is enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "events": {
                    "description": "The events to send the webhook for.",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEvent"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "resource_id": {
                    "description": "The resource to create the webhook for. By default this will use current company",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "description": "The URL to send the webhook to.",
                    "example": "https://example.com/path",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A webhook endpoint that receives event notifications for a company via HTTP POST.",
                  "properties": {
                    "api_version": {
                      "$ref": "#/components/schemas/ApiVersion",
                      "description": "The API version used to format payloads sent to this webhook endpoint."
                    },
                    "child_resource_events": {
                      "description": "Whether events are sent for child resources. For example, if the webhook is on a company, enabling this sends events only from the company's sub-merchants (child companies).",
                      "type": "boolean"
                    },
                    "created_at": {
                      "description": "The datetime the webhook was created.",
                      "example": "2023-12-01T05:00:00.401Z",
                      "format": "date-time",
                      "type": "string"
                    },
                    "enabled": {
                      "description": "Whether this webhook endpoint is currently active and receiving events.",
                      "type": "boolean"
                    },
                    "events": {
                      "description": "The list of event types this webhook is subscribed to.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "type": "array"
                    },
                    "id": {
                      "description": "The unique identifier for the webhook.",
                      "example": "hook_xxxxxxxxxxxxx",
                      "type": "string"
                    },
                    "resource_id": {
                      "description": "The ID of the resource (company or product) this webhook is attached to.",
                      "type": "string"
                    },
                    "testable_events": {
                      "description": "The subset of subscribed event types that support sending test payloads.",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      },
                      "type": "array"
                    },
                    "url": {
                      "description": "The destination URL where webhook payloads are delivered via HTTP POST.",
                      "example": "https://example.com/path",
                      "type": "string"
                    },
                    "webhook_secret": {
                      "description": "The secret key used to sign webhook payloads for verification. Include this in your HMAC validation logic.",
                      "example": "whsec_abc123def456",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "url",
                    "enabled",
                    "events",
                    "api_version",
                    "created_at",
                    "child_resource_events",
                    "testable_events",
                    "resource_id",
                    "webhook_secret"
                  ],
                  "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": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Create webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.create({ url: 'https://example.com/path' });\n\nconsole.log(webhook.id);"
          }
        ]
      }
    },
    "/webhooks/{id}": {
      "delete": {
        "description": "Deletes a webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "description": "The ID of the webhook to delete.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Represents `true` or `false` values.",
                  "type": "boolean"
                }
              }
            },
            "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": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Delete webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.delete('hook_xxxxxxxxxxxxx');\n\nconsole.log(webhook);"
          }
        ]
      },
      "get": {
        "description": "Retrieves the details of an existing webhook.\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "retrieveWebhook",
        "parameters": [
          {
            "description": "The unique identifier of the webhook to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "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": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Retrieve webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.retrieve('hook_xxxxxxxxxxxxx');\n\nconsole.log(webhook.id);"
          }
        ]
      },
      "patch": {
        "description": "Updates a webhook\n\nRequired permissions:\n - `developer:manage_webhook`",
        "operationId": "updateWebhook",
        "parameters": [
          {
            "description": "The ID of the Webhook to update",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "hook_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for UpdateWebhook",
                "properties": {
                  "api_version": {
                    "description": "The API version for this webhook",
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ApiVersion"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "child_resource_events": {
                    "description": "Whether or not to send events for child resources.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "enabled": {
                    "description": "Whether or not the webhook is enabled.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "events": {
                    "description": "The events to send the webhook for.",
                    "items": {
                      "$ref": "#/components/schemas/WebhookEvent"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "url": {
                    "description": "The URL to send the webhook to.",
                    "example": "https://example.com/path",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [],
                "type": "object"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Webhook"
                }
              }
            },
            "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": [
              "developer:manage_webhook"
            ]
          }
        ],
        "summary": "Update webhook",
        "tags": [
          "Webhooks"
        ],
        "x-group-title": "Developer",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst webhook = await client.webhooks.update('hook_xxxxxxxxxxxxx');\n\nconsole.log(webhook.id);"
          }
        ]
      }
    },
    "/withdrawals": {
      "get": {
        "description": "Returns a paginated list of withdrawals for a company, with optional sorting and date filtering.\n\nRequired permissions:\n - `payout:withdrawal:read`",
        "operationId": "listWithdrawal",
        "parameters": [
          {
            "explode": true,
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come after the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "description": "Returns the elements in the list that come before the specified cursor.",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "first",
            "required": false,
            "schema": {
              "description": "Returns the first _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "last",
            "required": false,
            "schema": {
              "description": "Returns the last _n_ elements from the list.",
              "example": 42,
              "type": [
                "integer",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "company_id",
            "required": true,
            "schema": {
              "description": "The unique identifier of the company to list withdrawals for.",
              "example": "biz_xxxxxxxxxxxxxx",
              "type": "string"
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "direction",
            "required": false,
            "schema": {
              "description": "The sort direction for results. Defaults to descending.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/Direction"
                },
                {
                  "type": "null"
                }
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_before",
            "required": false,
            "schema": {
              "description": "Only return withdrawals created before this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          },
          {
            "explode": true,
            "in": "query",
            "name": "created_after",
            "required": false,
            "schema": {
              "description": "Only return withdrawals created after this timestamp.",
              "example": "2023-12-01T05:00:00.401Z",
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "style": "form"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "The connection type for PublicWithdrawal.",
                  "properties": {
                    "data": {
                      "description": "A list of nodes.",
                      "items": {
                        "$ref": "#/components/schemas/WithdrawalListItem"
                      },
                      "type": "array"
                    },
                    "page_info": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "data",
                    "page_info"
                  ],
                  "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": [
              "payout:withdrawal:read"
            ]
          }
        ],
        "summary": "List withdrawals",
        "tags": [
          "Withdrawals"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const withdrawalListResponse of client.withdrawals.list({\n  company_id: 'biz_xxxxxxxxxxxxxx',\n})) {\n  console.log(withdrawalListResponse.id);\n}"
          }
        ]
      },
      "post": {
        "description": "Creates a withdrawal request for a ledger account\n\nRequired permissions:\n - `payout:withdraw_funds`\n - `payout:destination:read`",
        "operationId": "createWithdrawal",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Parameters for CreateLedgerWithdrawal",
                "properties": {
                  "amount": {
                    "description": "The amount to withdraw in the specified currency",
                    "example": 6.9,
                    "type": "number"
                  },
                  "company_id": {
                    "description": "The ID of the company to withdraw from.",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currencies",
                    "description": "The currency that is being withdrawn."
                  },
                  "payout_method_id": {
                    "description": "The ID of the payout method to use for the withdrawal.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "platform_covers_fees": {
                    "description": "Whether the platform covers the payout fees.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "statement_descriptor": {
                    "description": "Custom statement descriptor for the withdrawal. Must be between 5 and 22 characters and contain only alphanumeric characters.",
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "amount",
                  "company_id",
                  "currency"
                ],
                "title": "CreateLedgerWithdrawalInputAndCompanyId",
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            },
            "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": [
              "payout:withdraw_funds",
              "payout:destination:read"
            ]
          }
        ],
        "summary": "Create withdrawal",
        "tags": [
          "Withdrawals"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst withdrawal = await client.withdrawals.create({\n  amount: 6.9,\n  company_id: 'biz_xxxxxxxxxxxxxx',\n  currency: 'usd',\n});\n\nconsole.log(withdrawal.id);"
          }
        ]
      }
    },
    "/withdrawals/{id}": {
      "get": {
        "description": "Retrieves the details of an existing withdrawal.\n\nRequired permissions:\n - `payout:withdrawal:read`\n - `payout:destination:read`",
        "operationId": "retrieveWithdrawal",
        "parameters": [
          {
            "description": "The unique identifier of the withdrawal to retrieve.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "example": "wdrl_xxxxxxxxxxxxx",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Withdrawal"
                }
              }
            },
            "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": [
              "payout:withdrawal:read",
              "payout:destination:read"
            ]
          }
        ],
        "summary": "Retrieve withdrawal",
        "tags": [
          "Withdrawals"
        ],
        "x-group-title": "Payouts",
        "x-codeSamples": [
          {
            "lang": "JavaScript",
            "source": "import Whop from '@whop/sdk';\n\nconst client = new Whop({\n  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted\n});\n\nconst withdrawal = await client.withdrawals.retrieve('wdrl_xxxxxxxxxxxxx');\n\nconsole.log(withdrawal.id);"
          }
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production Whop API",
      "url": "https://api.whop.com/api/v1"
    },
    {
      "description": "Sandbox Whop API",
      "url": "https://sandbox-api.whop.com/api/v1"
    }
  ],
  "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"
    }
  ],
  "webhooks": {
    "chat.message.created": {
      "post": {
        "description": "Sent when a chat event is created\n\nRequired permissions:\n - `webhook_receive:chat`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "properties": {
                      "audience": {
                        "properties": {
                          "type": {
                            "enum": [
                              "channel",
                              "users"
                            ],
                            "example": "channel",
                            "type": "string"
                          },
                          "user_ids": {
                            "items": {
                              "example": "user_xxxxxxxxxxxxxx",
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "channel": {
                        "properties": {
                          "experience_id": {
                            "example": "exp_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "example": "feed_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "chat",
                              "direct_message",
                              "support"
                            ],
                            "example": "chat",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ],
                        "type": "object"
                      },
                      "message": {
                        "$ref": "#/components/schemas/Message"
                      },
                      "reason": {
                        "example": "channel_message",
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason",
                      "audience",
                      "channel",
                      "message"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "chat.message.created",
                    "description": "The webhook event type",
                    "example": "chat.message.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Chat Message Created",
        "tags": [
          "Messages"
        ]
      }
    },
    "chat.reaction.created": {
      "post": {
        "description": "Sent when a chat event is created\n\nRequired permissions:\n - `webhook_receive:chat`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "properties": {
                      "audience": {
                        "properties": {
                          "type": {
                            "enum": [
                              "channel",
                              "users"
                            ],
                            "example": "channel",
                            "type": "string"
                          },
                          "user_ids": {
                            "items": {
                              "example": "user_xxxxxxxxxxxxxx",
                              "type": "string"
                            },
                            "type": [
                              "array",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "type"
                        ],
                        "type": "object"
                      },
                      "channel": {
                        "properties": {
                          "experience_id": {
                            "example": "exp_xxxxxxxxxxxxxx",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "example": "feed_xxxxxxxxxxxxxx",
                            "type": "string"
                          },
                          "type": {
                            "enum": [
                              "chat",
                              "direct_message",
                              "support"
                            ],
                            "example": "chat",
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ],
                        "type": "object"
                      },
                      "message": {
                        "$ref": "#/components/schemas/Message"
                      },
                      "reaction": {
                        "$ref": "#/components/schemas/Reaction"
                      },
                      "reason": {
                        "example": "message_reaction",
                        "type": "string"
                      }
                    },
                    "required": [
                      "reason",
                      "audience",
                      "channel",
                      "message",
                      "reaction"
                    ],
                    "type": "object"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "chat.reaction.created",
                    "description": "The webhook event type",
                    "example": "chat.reaction.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Chat Reaction Created",
        "tags": [
          "Reactions"
        ]
      }
    },
    "course_lesson_interaction.completed": {
      "post": {
        "description": "Sent when a course lesson interaction is completed\n\nRequired permissions:\n - `courses:read`\n - `course_analytics:read`\n - `webhook_receive:courses`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/CourseLessonInteraction"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "course_lesson_interaction.completed",
                    "description": "The webhook event type",
                    "example": "course_lesson_interaction.completed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "CourseLessonInteraction Completed",
        "tags": [
          "Course lesson interactions"
        ]
      }
    },
    "dispute.created": {
      "post": {
        "description": "Sent when a dispute is created\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Dispute"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute.created",
                    "description": "The webhook event type",
                    "example": "dispute.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Dispute Created",
        "tags": [
          "Disputes"
        ]
      }
    },
    "dispute.updated": {
      "post": {
        "description": "Sent when a dispute is updated\n\nRequired permissions:\n - `payment:dispute:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `company:basic:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Dispute"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute.updated",
                    "description": "The webhook event type",
                    "example": "dispute.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Dispute Updated",
        "tags": [
          "Disputes"
        ]
      }
    },
    "dispute_alert.created": {
      "post": {
        "description": "Sent when a dispute alert is created\n\nRequired permissions:\n - `payment:dispute_alert:read`\n - `payment:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `payment:dispute:read`\n - `webhook_receive:disputes`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/DisputeAlert"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "dispute_alert.created",
                    "description": "The webhook event type",
                    "example": "dispute_alert.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "DisputeAlert Created",
        "tags": [
          "Dispute alerts"
        ]
      }
    },
    "entry.approved": {
      "post": {
        "description": "Sent when a entry is approved\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.approved",
                    "description": "The webhook event type",
                    "example": "entry.approved",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Approved",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.created": {
      "post": {
        "description": "Sent when a entry is created\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.created",
                    "description": "The webhook event type",
                    "example": "entry.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Created",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.deleted": {
      "post": {
        "description": "Sent when a entry is deleted\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.deleted",
                    "description": "The webhook event type",
                    "example": "entry.deleted",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Deleted",
        "tags": [
          "Entries"
        ]
      }
    },
    "entry.denied": {
      "post": {
        "description": "Sent when a entry is denied\n\nRequired permissions:\n - `plan:waitlist:read`\n - `member:email:read`\n - `webhook_receive:entries`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Entry"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "entry.denied",
                    "description": "The webhook event type",
                    "example": "entry.denied",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Entry Denied",
        "tags": [
          "Entries"
        ]
      }
    },
    "identity_profile.approved": {
      "post": {
        "description": "Sent when a identity profile is approved\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/IdentityProfile"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "identity_profile.approved",
                    "description": "The webhook event type",
                    "example": "identity_profile.approved",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "IdentityProfile Approved",
        "tags": [
          "Identity profiles"
        ]
      }
    },
    "identity_profile.needs_action": {
      "post": {
        "description": "Sent when a identity profile is needs action\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/IdentityProfile"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "identity_profile.needs_action",
                    "description": "The webhook event type",
                    "example": "identity_profile.needs_action",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "IdentityProfile Needs action",
        "tags": [
          "Identity profiles"
        ]
      }
    },
    "identity_profile.rejected": {
      "post": {
        "description": "Sent when a identity profile is rejected\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/IdentityProfile"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "identity_profile.rejected",
                    "description": "The webhook event type",
                    "example": "identity_profile.rejected",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "IdentityProfile Rejected",
        "tags": [
          "Identity profiles"
        ]
      }
    },
    "identity_profile.updated": {
      "post": {
        "description": "Sent when a identity profile is updated\n\nRequired permissions:\n - `identity:read`\n - `webhook_receive:identity_profiles`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/IdentityProfile"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "identity_profile.updated",
                    "description": "The webhook event type",
                    "example": "identity_profile.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "IdentityProfile Updated",
        "tags": [
          "Identity profiles"
        ]
      }
    },
    "invoice.created": {
      "post": {
        "description": "Sent when a invoice is created\n\nRequired permissions:\n - `invoice:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.created",
                    "description": "The webhook event type",
                    "example": "invoice.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Created",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.marked_uncollectible": {
      "post": {
        "description": "Sent when a invoice is marked uncollectible\n\nRequired permissions:\n - `invoice:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.marked_uncollectible",
                    "description": "The webhook event type",
                    "example": "invoice.marked_uncollectible",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Marked uncollectible",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.paid": {
      "post": {
        "description": "Sent when a invoice is paid\n\nRequired permissions:\n - `invoice:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.paid",
                    "description": "The webhook event type",
                    "example": "invoice.paid",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Paid",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.past_due": {
      "post": {
        "description": "Sent when a invoice is past due\n\nRequired permissions:\n - `invoice:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.past_due",
                    "description": "The webhook event type",
                    "example": "invoice.past_due",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Past due",
        "tags": [
          "Invoices"
        ]
      }
    },
    "invoice.voided": {
      "post": {
        "description": "Sent when a invoice is voided\n\nRequired permissions:\n - `invoice:basic:read`\n - `webhook_receive:invoices`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Invoice"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "invoice.voided",
                    "description": "The webhook event type",
                    "example": "invoice.voided",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Invoice Voided",
        "tags": [
          "Invoices"
        ]
      }
    },
    "ledger_account.funds_available": {
      "post": {
        "description": "Sent when a ledger account is funds available\n\nRequired permissions:\n - `company:balance:read`\n - `payout:account:read`\n - `webhook_receive:ledger_accounts`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/LedgerAccount"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "ledger_account.funds_available",
                    "description": "The webhook event type",
                    "example": "ledger_account.funds_available",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "LedgerAccount Funds available",
        "tags": [
          "Ledger accounts"
        ]
      }
    },
    "membership.activated": {
      "post": {
        "description": "Sent when a membership is activated\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.activated",
                    "description": "The webhook event type",
                    "example": "membership.activated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Activated",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.cancel_at_period_end_changed": {
      "post": {
        "description": "Sent when a membership is cancel at period end changed\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.cancel_at_period_end_changed",
                    "description": "The webhook event type",
                    "example": "membership.cancel_at_period_end_changed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Cancel at period end changed",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.deactivated": {
      "post": {
        "description": "Sent when a membership is deactivated\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.deactivated",
                    "description": "The webhook event type",
                    "example": "membership.deactivated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Deactivated",
        "tags": [
          "Memberships"
        ]
      }
    },
    "membership.trial_ending_soon": {
      "post": {
        "description": "Sent when a membership is trial ending soon\n\nRequired permissions:\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:memberships`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Membership"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "membership.trial_ending_soon",
                    "description": "The webhook event type",
                    "example": "membership.trial_ending_soon",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Membership Trial ending soon",
        "tags": [
          "Memberships"
        ]
      }
    },
    "payment.created": {
      "post": {
        "description": "Sent when a payment is created\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.created",
                    "description": "The webhook event type",
                    "example": "payment.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Created",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.failed": {
      "post": {
        "description": "Sent when a payment is failed\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.failed",
                    "description": "The webhook event type",
                    "example": "payment.failed",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Failed",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.pending": {
      "post": {
        "description": "Sent when a payment is pending\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.pending",
                    "description": "The webhook event type",
                    "example": "payment.pending",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Pending",
        "tags": [
          "Payments"
        ]
      }
    },
    "payment.succeeded": {
      "post": {
        "description": "Sent when a payment is succeeded\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `promo_code:basic:read`\n - `payment:dispute:read`\n - `payment:resolution_center_case:read`\n - `webhook_receive:payments`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Payment"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payment.succeeded",
                    "description": "The webhook event type",
                    "example": "payment.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Payment Succeeded",
        "tags": [
          "Payments"
        ]
      }
    },
    "payout_account.status_updated": {
      "post": {
        "description": "Sent when a payout account is status updated\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:payout_accounts`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutAccount"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payout_account.status_updated",
                    "description": "The webhook event type",
                    "example": "payout_account.status_updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "PayoutAccount Status updated",
        "tags": [
          "Payout accounts"
        ]
      }
    },
    "payout_method.created": {
      "post": {
        "description": "Sent when a payout method is created\n\nRequired permissions:\n - `payout:destination:read`\n - `webhook_receive:payout_methods`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/PayoutMethod"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "payout_method.created",
                    "description": "The webhook event type",
                    "example": "payout_method.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "PayoutMethod Created",
        "tags": [
          "Payout methods"
        ]
      }
    },
    "refund.created": {
      "post": {
        "description": "Sent when a refund is created\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:refunds`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Refund"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "refund.created",
                    "description": "The webhook event type",
                    "example": "refund.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Refund Created",
        "tags": [
          "Refunds"
        ]
      }
    },
    "refund.updated": {
      "post": {
        "description": "Sent when a refund is updated\n\nRequired permissions:\n - `payment:basic:read`\n - `plan:basic:read`\n - `access_pass:basic:read`\n - `member:email:read`\n - `member:basic:read`\n - `member:phone:read`\n - `webhook_receive:refunds`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Refund"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "refund.updated",
                    "description": "The webhook event type",
                    "example": "refund.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Refund Updated",
        "tags": [
          "Refunds"
        ]
      }
    },
    "resolution_center_case.created": {
      "post": {
        "description": "Sent when a resolution center case is created\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.created",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Created",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "resolution_center_case.decided": {
      "post": {
        "description": "Sent when a resolution center case is decided\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.decided",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.decided",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Decided",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "resolution_center_case.updated": {
      "post": {
        "description": "Sent when a resolution center case is updated\n\nRequired permissions:\n - `payment:resolution_center_case:read`\n - `webhook_receive:resolutions`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/ResolutionCenterCase"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "resolution_center_case.updated",
                    "description": "The webhook event type",
                    "example": "resolution_center_case.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "ResolutionCenterCase Updated",
        "tags": [
          "Resolution center cases"
        ]
      }
    },
    "setup_intent.canceled": {
      "post": {
        "description": "Sent when a setup intent is canceled\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.canceled",
                    "description": "The webhook event type",
                    "example": "setup_intent.canceled",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Canceled",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "setup_intent.requires_action": {
      "post": {
        "description": "Sent when a setup intent is requires action\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.requires_action",
                    "description": "The webhook event type",
                    "example": "setup_intent.requires_action",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Requires action",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "setup_intent.succeeded": {
      "post": {
        "description": "Sent when a setup intent is succeeded\n\nRequired permissions:\n - `payment:setup_intent:read`\n - `member:basic:read`\n - `member:email:read`\n - `webhook_receive:setup_intents`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/SetupIntent"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "setup_intent.succeeded",
                    "description": "The webhook event type",
                    "example": "setup_intent.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "SetupIntent Succeeded",
        "tags": [
          "Setup intents"
        ]
      }
    },
    "verification.succeeded": {
      "post": {
        "description": "Sent when a verification is succeeded\n\nRequired permissions:\n - `payout:account:read`\n - `webhook_receive:verifications`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Verification"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "verification.succeeded",
                    "description": "The webhook event type",
                    "example": "verification.succeeded",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Verification Succeeded",
        "tags": [
          "Verifications"
        ]
      }
    },
    "withdrawal.created": {
      "post": {
        "description": "Sent when a withdrawal is created\n\nRequired permissions:\n - `payout:withdrawal:read`\n - `payout:destination:read`\n - `webhook_receive:withdrawals`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Withdrawal"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "withdrawal.created",
                    "description": "The webhook event type",
                    "example": "withdrawal.created",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Withdrawal Created",
        "tags": [
          "Withdrawals"
        ]
      }
    },
    "withdrawal.updated": {
      "post": {
        "description": "Sent when a withdrawal is updated\n\nRequired permissions:\n - `payout:withdrawal:read`\n - `payout:destination:read`\n - `webhook_receive:withdrawals`",
        "parameters": [
          {
            "in": "header",
            "name": "webhook-id",
            "required": true,
            "schema": {
              "description": "A unique identifier for this webhook request",
              "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-signature",
            "required": true,
            "schema": {
              "description": "The signature of the webhook request with the webhook version prepended",
              "example": "v1,BASE64ENCODEDSIGNATURE",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "webhook-timestamp",
            "required": true,
            "schema": {
              "description": "The timestamp in seconds since the Unix epoch that the webhook was sent at on the server",
              "example": "1727606400",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "api_version": {
                    "const": "v1",
                    "description": "The API version for this webhook",
                    "example": "v1",
                    "type": "string"
                  },
                  "company_id": {
                    "description": "The company ID that this webhook event is associated with",
                    "example": "biz_xxxxxxxxxxxxxx",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "data": {
                    "$ref": "#/components/schemas/Withdrawal"
                  },
                  "id": {
                    "description": "A unique ID for every single webhook request",
                    "example": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
                    "type": "string"
                  },
                  "timestamp": {
                    "description": "The timestamp in ISO 8601 format that the webhook was sent at on the server",
                    "example": "2025-01-01T00:00:00.000Z",
                    "format": "date-time",
                    "type": "string"
                  },
                  "type": {
                    "const": "withdrawal.updated",
                    "description": "The webhook event type",
                    "example": "withdrawal.updated",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "api_version",
                  "timestamp",
                  "type",
                  "data"
                ],
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Return a 200 status to indicate that the data was received successfully"
          }
        },
        "summary": "Withdrawal Updated",
        "tags": [
          "Withdrawals"
        ]
      }
    }
  }
}