diff --git a/.fern/metadata.json b/.fern/metadata.json index 554a00b0e..014962256 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -15,7 +15,7 @@ "standardwebhooks": ">=1.0.1,<2" } }, - "originGitCommit": "373f83a186f277acbfe3660bc553b52a059007c5", + "originGitCommit": "c1fcedff5dab9491e3db5371f0d9e6acc3bd8446", "originGitCommitIsDirty": false, "invokedBy": "ci", "requestedVersion": "2.7.0", diff --git a/.fern/replay.lock b/.fern/replay.lock index 3a101a456..27c27ae78 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -4596,5 +4596,11 @@ generations: cli_version: unknown generator_versions: fernapi/fern-python-sdk: 5.39.2 -current_generation: f61e72337ff006559552f7658dbd6041e18abe63 + - commit_sha: 396fc1884a57c7de237ce2ca28d9cc7e6c200ea0 + tree_hash: fb3f9c2b2107172a71822e204df88a596539c2f9 + timestamp: 2026-11-07T09:21:59.282Z + cli_version: unknown + generator_versions: + fernapi/fern-python-sdk: 5.39.2 +current_generation: 396fc1884a57c7de237ce2ca28d9cc7e6c200ea0 patches: [] diff --git a/reference.md b/reference.md index 5ede2e7f4..137d0c684 100644 --- a/reference.md +++ b/reference.md @@ -13549,8 +13549,8 @@ client.cashback_rules.update( -## ChatChannels -
client.chat_channels.list(...) -> ListChatChannelsResponse +## Channel Members +
client.channel_members.list(...) -> ListChannelMembersResponse
@@ -13562,10 +13562,7 @@ client.cashback_rules.update(
-Lists the chat channels in an account. - -Required permissions: - - `chat:read` +List or search the people in a channel.
@@ -13588,11 +13585,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.chat_channels.list( - first=42, - last=42, - product_id="prod_xxxxxxxxxxxxx", - account_id="biz_xxxxxxxxxxxxxx", +client.channel_members.list( + channel_id="channel_id", ) ``` @@ -13609,7 +13603,7 @@ client.chat_channels.list(
-**account_id:** `str` — The unique identifier of the company to list chat channels for. +**channel_id:** `str` — The channel whose members to list.
@@ -13617,7 +13611,7 @@ client.chat_channels.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -13625,7 +13619,7 @@ client.chat_channels.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -13633,7 +13627,7 @@ client.chat_channels.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -13641,7 +13635,7 @@ client.chat_channels.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -13649,7 +13643,7 @@ client.chat_channels.list(
-**product_id:** `typing.Optional[str]` — The unique identifier of a product to filter by. When set, only chat channels connected to this product are returned. +**query:** `typing.Optional[str]` — Search by name or username.
@@ -13669,7 +13663,7 @@ client.chat_channels.list(
-
client.chat_channels.retrieve(...) -> ChatChannel +
client.channel_members.create(...) -> ChannelMember
@@ -13681,10 +13675,7 @@ client.chat_channels.list(
-Retrieves the details of an existing chat channel. - -Required permissions: - - `chat:read` +Add a member to a direct or support channel.
@@ -13707,8 +13698,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.chat_channels.retrieve( - id="id", +client.channel_members.create( + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxxx", ) ``` @@ -13725,7 +13717,15 @@ client.chat_channels.retrieve(
-**id:** `str` — The unique identifier of the chat channel or experience to retrieve. +**channel_id:** `str` — The channel to add the user to. + +
+
+ +
+
+ +**user_id:** `str` — The user to add.
@@ -13745,7 +13745,7 @@ client.chat_channels.retrieve(
-
client.chat_channels.update(...) -> ChatChannel +
client.channel_members.retrieve(...) -> ChannelMember
@@ -13757,10 +13757,7 @@ client.chat_channels.retrieve(
-Updates a chat channel's moderation settings, such as who can post, banned words, and media restrictions. - -Required permissions: - - `chat:moderate` +Retrieve a channel member and their read position.
@@ -13783,7 +13780,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.chat_channels.update( +client.channel_members.retrieve( id="id", ) @@ -13801,55 +13798,7 @@ client.chat_channels.update(
-**id:** `str` — The unique identifier of the chat channel to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a chat channel ID. - -
-
- -
-
- -**ban_media:** `typing.Optional[bool]` — Whether media uploads such as images and videos are banned in this chat channel. - -
-
- -
-
- -**ban_urls:** `typing.Optional[bool]` — Whether URLs and links are banned from being posted in this chat channel. - -
-
- -
-
- -**banned_words:** `typing.Optional[typing.List[str]]` — A list of words that are automatically blocked from messages in this chat channel. For example, ['spam', 'scam']. - -
-
- -
-
- -**user_posts_cooldown_seconds:** `typing.Optional[int]` — The minimum number of seconds a user must wait between sending messages in this chat channel. Pass null or 0 to remove the cooldown. - -
-
- -
-
- -**who_can_post:** `typing.Optional[WhoCanPostTypes]` — Controls which roles are allowed to send messages in this chat channel. - -
-
- -
-
- -**who_can_react:** `typing.Optional[WhoCanReactTypes]` — Controls which roles are allowed to add reactions to messages in this chat channel. +**id:** `str` — Public resource ID.
@@ -13869,8 +13818,7 @@ client.chat_channels.update(
-## Checkout Configurations -
client.checkout_configurations.list(...) -> ListCheckoutConfigurationsResponse +
client.channel_members.delete(...)
@@ -13882,7 +13830,7 @@ client.chat_channels.update(
-Lists checkout configurations for an account. +Remove a channel member, or leave the channel yourself. Requires dms:channel:manage and access to the channel. Removing someone else also requires permission to manage its members.
@@ -13905,8 +13853,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.checkout_configurations.list( - account_id="account_id", +client.channel_members.delete( + id="id", ) ``` @@ -13923,7 +13871,7 @@ client.checkout_configurations.list(
-**account_id:** `str` — Account ID, prefixed `biz_`. +**id:** `str` — Public resource ID.
@@ -13931,47 +13879,73 @@ client.checkout_configurations.list(
-**variant_id:** `typing.Optional[str]` — Only return checkout configurations for this variant ID, prefixed `plan_`. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**created_before:** `typing.Optional[str]` — Only return checkout configurations created before this ISO 8601 timestamp. -
+
+
client.channel_members.update(...) -> ChannelMember
-**created_after:** `typing.Optional[str]` — Only return checkout configurations created after this ISO 8601 timestamp. - -
-
+#### 📝 Description
-**order:** `typing.Optional[ListCheckoutConfigurationsRequestOrder]` — Field used to sort checkout configurations. - +
+
+ +Update your notification preference using your stored membership ID in a private or support channel.
+
+
+ +#### 🔌 Usage
-**direction:** `typing.Optional[ListCheckoutConfigurationsRequestDirection]` — Sort direction. Defaults to `desc`. - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.channel_members.update( + id="id", + notification_preference="all", +) + +``` +
+
+#### ⚙️ Parameters +
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +
+
+ +**id:** `str` — Public resource ID.
@@ -13979,7 +13953,7 @@ client.checkout_configurations.list(
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**notification_preference:** `UpdateChannelMembersRequestNotificationPreference`
@@ -13999,7 +13973,8 @@ client.checkout_configurations.list(
-
client.checkout_configurations.create(...) -> CreateCheckoutConfigurationsResponse +## Channels +
client.channels.list(...) -> ListChannelsResponse
@@ -14011,7 +13986,7 @@ client.checkout_configurations.list(
-Creates a reusable checkout configuration for an existing or inline variant. Send customers to its `purchase_url` to check out. +List channels you can access.
@@ -14034,9 +14009,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.checkout_configurations.create( - account_id="biz_xxxxxxxxxxxxxx", - variant_id="plan_xxxxxxxxxxxxx", +client.channels.list( + kind=[ + "private" + ], ) ``` @@ -14053,7 +14029,7 @@ client.checkout_configurations.create(
-**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -14061,7 +14037,7 @@ client.checkout_configurations.create(
-**affiliate_code:** `typing.Optional[str]` — Affiliate code to apply to the checkout. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -14069,7 +14045,7 @@ client.checkout_configurations.create(
-**currency:** `typing.Optional[str]` — Currency used for setup-mode payment method availability. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -14077,7 +14053,7 @@ client.checkout_configurations.create(
-**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Custom key-value metadata copied to payments and memberships. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -14085,7 +14061,7 @@ client.checkout_configurations.create(
-**mode:** `typing.Optional[CreateCheckoutConfigurationsRequestMode]` — Controls whether checkout charges the buyer immediately or saves payment details for later. Defaults to `payment`. +**include_total_count:** `typing.Optional[bool]` — Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results.
@@ -14093,7 +14069,7 @@ client.checkout_configurations.create(
-**payment_method_configuration:** `typing.Optional[CreateCheckoutConfigurationsRequestPaymentMethodConfiguration]` — Payment method overrides for this checkout. `null` uses the variant or platform defaults. +**kind:** `typing.Optional[typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]]]` — Channel kinds to return. Combine `private` and `support`, or pass `community` alone. `private` includes one-to-one and group direct messages.
@@ -14101,7 +14077,7 @@ client.checkout_configurations.create(
-**redirect_url:** `typing.Optional[str]` — URL customers are sent to after checkout. +**support_role:** `typing.Optional[ListChannelsRequestSupportRole]` — Which support channels to return. `customer` returns support chats you opened, including when `account_id` is set. `staff` returns the support inbox of the account in `account_id`, and requires permission to read that account's support chats. Applies only to `support` channels.
@@ -14109,7 +14085,7 @@ client.checkout_configurations.create(
-**three_ds_level:** `typing.Optional[CreateCheckoutConfigurationsRequestThreeDsLevel]` — 3D Secure behavior for supported on-session card payments. `mandate_challenge` requires a 3DS challenge before payment processing; `mandate_if_required` mandates a challenge only when the payment processor requires it; `frictionless_if_required` uses the regular frictionless 3DS flow. Payments of $1,000 or more use `mandate_if_required` unless `mandate_challenge` is selected. Risk and authentication recovery requirements can override the preference. Applies in setup mode; `null` uses frictionless 3DS. Payment mode uses the variant policy. +**account_id:** `typing.Optional[str]` — Filter channels by their owning account, prefixed `biz_`. Applies to private, community and support channels.
@@ -14117,7 +14093,7 @@ client.checkout_configurations.create(
-**variant:** `typing.Optional[CreateCheckoutConfigurationsRequestVariant]` — Variant attributes used to create or find a variant for this checkout configuration. Mutually exclusive with `variant_id`. +**query:** `typing.Optional[str]` — Return only channels whose name contains this text. Private and support channels also match a member's username or name. `%` and `_` match literally.
@@ -14125,7 +14101,7 @@ client.checkout_configurations.create(
-**variant_id:** `typing.Optional[str]` — Existing variant ID, prefixed `plan_`. Mutually exclusive with `variant`. +**status:** `typing.Optional[ListChannelsRequestStatus]` — Return only support channels with this resolution. Requires `kind` to be `support` alone.
@@ -14133,72 +14109,39 @@ client.checkout_configurations.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**awaiting_reply:** `typing.Optional[bool]` — `true` returns unresolved support channels whose last message came from the customer; `false` returns the other support channels. Other channel kinds are returned either way.
- -
- - - -
- -
client.checkout_configurations.retrieve(...) -> RetrieveCheckoutConfigurationsResponse
-#### 📝 Description - -
-
+**unread:** `typing.Optional[bool]` — `true` returns channels with messages you have not read; `false` returns the rest. Requires authenticating as a user. + +
+
-Retrieves a checkout configuration by ID. This endpoint is public so a checkout page can load from the configuration URL. -
-
+**pinned:** `typing.Optional[bool]` — `true` returns private and support channels you have pinned; `false` returns those you have not. Requires authenticating as a user. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.checkout_configurations.retrieve( - id="id", -) - -``` -
-
+**viewed:** `typing.Optional[bool]` — `true` returns community channels you have opened; `false` returns those you never have. Requires authenticating as a user. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` — The ID of the checkout configuration. +**requested:** `typing.Optional[bool]` — `true` returns your pending direct-message requests; `false` returns your accepted private channels. Requires `private` in `kind` and authenticating as a user. With `support` also in `kind`, `false` keeps support channels and `true` returns only pending requests.
@@ -14206,72 +14149,47 @@ client.checkout_configurations.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**order:** `typing.Optional[ListChannelsRequestOrder]` — The field to sort by. Defaults to `last_viewed_at` for community channels and `last_message_at` for private and support channels. Ties sort in a stable order.
-
-
+
+
+**include_members:** `typing.Optional[bool]` — Include the current members of private and support channels, including you, with their public profiles. +
-
-
client.checkout_configurations.delete(...) -> DeleteCheckoutConfigurationsResponse
-#### 📝 Description - -
-
+**include_last_message:** `typing.Optional[bool]` — Include the most recent message you can see, with its author. + +
+
-Deletes a checkout configuration so its checkout URL can no longer be used. -
-
+**direction:** `typing.Optional[ListChannelsRequestDirection]` — The sort direction. Defaults to `desc`. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.checkout_configurations.delete( - id="id", -) - -``` -
-
+**created_before:** `typing.Optional[str]` — Return only channels created before this ISO 8601 timestamp. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The ID of the checkout configuration. +**created_after:** `typing.Optional[str]` — Return only channels created after this ISO 8601 timestamp.
@@ -14291,8 +14209,7 @@ client.checkout_configurations.delete(
-## ClaimLinks -
client.claim_links.retrieve(...) -> RetrieveClaimLinksResponse +
client.channels.create(...) -> Channel
@@ -14304,7 +14221,7 @@ client.checkout_configurations.delete(
-Retrieves a funded claim link by ID or by its public claim code. By ID, the caller needs `airdrop_link:basic:read` on the funding account, or must own the funding personal account; `code` and `claim_url` are `null` without `airdrop_link:manage` on the funding account or `payout:withdraw_funds` on the personal account. A claim code previews the sender, amount, expiry, and claim availability without authentication. Treat codes as secrets: anyone holding one can claim after signing in. +Create a private, community or support channel. Returns an existing private or support channel unchanged with `200`, or a new channel with `201`.
@@ -14327,8 +14244,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.claim_links.retrieve( - id="id", +client.channels.create( + kind="private", ) ``` @@ -14345,7 +14262,7 @@ client.claim_links.retrieve(
-**id:** `str` — A claim-link ID (`airdrp_…`), or the public claim code from the `c` parameter in the claim URL. +**kind:** `CreateChannelsRequestKind` — Channel kind. `private` is a one-to-one or group conversation, `community` creates a Chat experience on the account, and `support` opens a conversation between the account and a customer.
@@ -14353,72 +14270,55 @@ client.claim_links.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**account_id:** `typing.Optional[str]` — Owning account ID, prefixed `biz_`. Accepted for all channel kinds. Required for community and support channels unless supplied by the credential's account context.
- -
+
+
+**customer_user_id:** `typing.Optional[str]` — Customer ID, prefixed `user_`. Support channels only; requires support management permission. Omit to open your own support conversation. +
-
-
client.claim_links.claim(...) -> ClaimClaimLinksResponse
-#### 📝 Description - -
-
+**name:** `typing.Optional[str]` — Channel display name, accepted for all channel kinds. Used only when a channel is created. For community channels, names the new Chat experience; defaults to the Chat app's name. + +
+
-Claims a funded link into the authenticated user's personal balance and returns the updated link. Requires a signed-in user and the public claim code; account API keys cannot claim on a recipient's behalf. Each user can claim a link once. Reuse the same `Idempotency-Key` when retrying the same request. On-chain claims may take several minutes to complete. -
-
+**notifications_enabled:** `typing.Optional[bool]` — Whether app notifications are on for any channel kind. Webhooks fire either way. Defaults to `true`. Used only when a channel is created; change an existing channel with `PATCH /channels/:id`. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.claim_links.claim( - id="id", -) - -``` -
-
+**participant_user_ids:** `typing.Optional[typing.List[str]]` — Other participant IDs, prefixed `user_`, excluding the sender. Required for private channels and accepted only for them. One ID creates a one-to-one conversation; more create a group. +
-#### ⚙️ Parameters -
+**product_id:** `typing.Optional[str]` — Product ID, prefixed `prod_`, to attach the new community channel to. Accepted only for community channels. Must belong to the owning account and requires the `experience:attach` permission on it. Omit to leave the channel unattached. + +
+
+
-**id:** `str` — The public claim code from the `c` parameter in the claim URL. A claim-link ID does not authorize redemption. +**sender_user_id:** `typing.Optional[str]` — Sender ID, prefixed `user_`. Private channels only. Required for account API keys; omit when authenticating as a user. Requires channel management permission on the account.
@@ -14438,8 +14338,7 @@ client.claim_links.claim(
-## CompanyTokenTransactions -
client.company_token_transactions.list(...) -> ListCompanyTokenTransactionsResponse +
client.channels.retrieve(...) -> Channel
@@ -14451,12 +14350,7 @@ client.claim_links.claim(
-Lists an account's token transactions, newest first. - -Required permissions: - - `company_token_transaction:read` - - `member:basic:read` - - `company:basic:read` +Retrieve a channel.
@@ -14479,11 +14373,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.company_token_transactions.list( - first=42, - last=42, - user_id="user_xxxxxxxxxxxxx", - account_id="biz_xxxxxxxxxxxxxx", +client.channels.retrieve( + id="id", ) ``` @@ -14500,55 +14391,7 @@ client.company_token_transactions.list(
-**account_id:** `str` — The unique identifier of the company to list token transactions for. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. - -
-
- -
-
- -**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — Filter transactions to only those involving this specific user. - -
-
- -
-
- -**transaction_type:** `typing.Optional[CompanyTokenTransactionTypes]` +**id:** `str` — Public resource ID.
@@ -14568,7 +14411,7 @@ client.company_token_transactions.list(
-
client.company_token_transactions.create(...) -> CompanyTokenTransaction +
client.channels.delete(...)
@@ -14580,12 +14423,7 @@ client.company_token_transactions.list(
-Creates a token transaction that adds, subtracts, or transfers tokens for a member of an account. - -Required permissions: - - `company_token_transaction:create` - - `member:basic:read` - - `company:basic:read` +Delete a channel. Deleting a support channel requires `support_chat:create` on the account. Community channels delete their backing experience and accept account API keys with the `experience:delete` permission. Private and support channels require a user identity with channel management permission; account API keys cannot act as a channel participant.
@@ -14602,20 +14440,14 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.company_token_transactions import CreateCompanyTokenTransactionsRequest_Transfer client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.company_token_transactions.create( - request=CreateCompanyTokenTransactionsRequest_Transfer( - account_id="biz_xxxxxxxxxxxxxx", - amount=6.9, - destination_user_id="destination_user_id", - user_id="user_xxxxxxxxxxxxx", - ), +client.channels.delete( + id="id", ) ``` @@ -14632,7 +14464,7 @@ client.company_token_transactions.create(
-**request:** `CreateCompanyTokenTransactionsRequest` — Parameters for CreateCompanyTokenTransaction +**id:** `str` — Public resource ID.
@@ -14652,7 +14484,7 @@ client.company_token_transactions.create(
-
client.company_token_transactions.retrieve(...) -> CompanyTokenTransaction +
client.channels.update(...) -> Channel
@@ -14664,12 +14496,7 @@ client.company_token_transactions.create(
-Retrieves a token transaction. - -Required permissions: - - `company_token_transaction:read` - - `member:basic:read` - - `company:basic:read` +Update a channel. Community icon changes update the experience logo and require `experience:update`. Support rename and notification changes require `support_chat:create`. Private and support writes require a user identity with channel management permission; account API keys can update community channels only.
@@ -14692,7 +14519,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.company_token_transactions.retrieve( +client.channels.update( id="id", ) @@ -14710,7 +14537,39 @@ client.company_token_transactions.retrieve(
-**id:** `str` — The unique identifier of the token transaction to retrieve. +**id:** `str` — Public resource ID. + +
+
+ +
+
+ +**icon:** `typing.Optional[UpdateChannelsRequestIcon]` — Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + +
+
+ +
+
+ +**moderation:** `typing.Optional[UpdateChannelsRequestModeration]` — Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — Replacement display name for any channel kind. Send `null` to clear a private or support channel name. Community channels require a name and also rename the experience. + +
+
+ +
+
+ +**notifications_enabled:** `typing.Optional[bool]` — Whether app notifications are on for any channel kind. Webhooks fire either way. Omit to preserve the current setting.
@@ -14730,8 +14589,7 @@ client.company_token_transactions.retrieve(
-## Confirmation Tokens -
client.confirmation_tokens.retrieve(...) -> ConfirmationToken +
client.channels.accept(...) -> ChannelMember
@@ -14743,7 +14601,7 @@ client.company_token_transactions.retrieve(
-Retrieves a confirmation token's payment method and billing details, never the underlying payment credential, to display what the buyer chose or check that the token is still usable. Requires no authentication and is rate-limited. +Accept a direct-message request.
@@ -14766,9 +14624,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.confirmation_tokens.retrieve( +client.channels.accept( id="id", - account_id="account_id", ) ``` @@ -14785,15 +14642,7 @@ client.confirmation_tokens.retrieve(
-**id:** `str` — Confirmation token ID, prefixed `ctok_`. - -
-
- -
-
- -**account_id:** `str` — The account the token was minted for, prefixed `biz_`. It must match the token's account. +**id:** `str` — Public resource ID.
@@ -14813,8 +14662,7 @@ client.confirmation_tokens.retrieve(
-## CourseChapters -
client.course_chapters.list(...) -> ListCourseChaptersResponse +
client.channels.hide(...) -> ChannelMember
@@ -14826,10 +14674,7 @@ client.confirmation_tokens.retrieve(
-Returns a paginated list of chapters within a course, ordered by position. - -Required permissions: - - `courses:read` +Decline a DM request by hiding the channel from your inbox.
@@ -14852,10 +14697,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_chapters.list( - first=42, - last=42, - course_id="cors_xxxxxxxxxxxxx", +client.channels.hide( + id="id", ) ``` @@ -14872,39 +14715,7 @@ client.course_chapters.list(
-**course_id:** `str` — The unique identifier of the course to list chapters for. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. - -
-
- -
-
- -**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**id:** `str` — Public resource ID.
@@ -14924,7 +14735,7 @@ client.course_chapters.list(
-
client.course_chapters.create(...) -> CourseChapter +
client.channels.mark_read(...) -> ChannelMember
@@ -14936,10 +14747,7 @@ client.course_chapters.list(
-Create a new chapter within a course to organize lessons into sections. - -Required permissions: - - `courses:update` +Mark a channel as read and optionally record viewed messages.
@@ -14962,8 +14770,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_chapters.create( - course_id="cors_xxxxxxxxxxxxx", +client.channels.mark_read( + id="id", ) ``` @@ -14980,7 +14788,7 @@ client.course_chapters.create(
-**course_id:** `str` — The unique identifier of the course to create the chapter in (e.g., "course_XXXXX"). +**id:** `str` — Public resource ID.
@@ -14988,7 +14796,15 @@ client.course_chapters.create(
-**title:** `typing.Optional[str]` — The display title of the chapter (e.g., "Module 1: Introduction"). +**last_viewed_at:** `typing.Optional[datetime.datetime]` — Required for DM-backed kinds; not accepted for experience. + +
+
+ +
+
+ +**viewed_message_ids:** `typing.Optional[typing.List[str]]` — Messages actually seen in this channel. Optional for all channel kinds; up to 100 IDs. Omitted or empty records no message views. Experience view counts update asynchronously.
@@ -15008,7 +14824,7 @@ client.course_chapters.create(
-
client.course_chapters.retrieve(...) -> CourseChapter +
client.channels.mark_unread(...) -> ChannelMember
@@ -15020,10 +14836,7 @@ client.course_chapters.create(
-Retrieves the details of an existing course chapter. - -Required permissions: - - `courses:read` +Mark a channel as unread for the authenticated user. Experience channels are unchanged.
@@ -15046,8 +14859,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_chapters.retrieve( - id="chap_xxxxxxxxxxxxx", +client.channels.mark_unread( + id="id", ) ``` @@ -15064,7 +14877,7 @@ client.course_chapters.retrieve(
-**id:** `str` — The unique identifier of the chapter to retrieve. +**id:** `str` — Public resource ID.
@@ -15084,7 +14897,7 @@ client.course_chapters.retrieve(
-
client.course_chapters.delete(...) -> bool +
client.channels.pin(...)
@@ -15096,10 +14909,7 @@ client.course_chapters.retrieve(
-Permanently delete a chapter and all of its lessons from a course. - -Required permissions: - - `courses:update` +Pin a private or support channel for yourself. Omit position to append a new pin or keep an existing pin in place. An explicit zero-based position inserts or moves the pin and shifts the rest. At most 12 channels can be pinned.
@@ -15122,8 +14932,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_chapters.delete( - id="chap_xxxxxxxxxxxxx", +client.channels.pin( + id="id", ) ``` @@ -15140,7 +14950,15 @@ client.course_chapters.delete(
-**id:** `str` — The unique identifier of the chapter to delete (e.g., "chap_XXXXX"). +**id:** `str` — The channel ID, prefixed `feed_`. + +
+
+ +
+
+ +**position:** `typing.Optional[int]` — Zero-based position in the resulting list. Must not exceed the last index after insertion. Omit to append a new pin or preserve an existing position.
@@ -15160,7 +14978,7 @@ client.course_chapters.delete(
-
client.course_chapters.update(...) -> CourseChapter +
client.channels.reopen(...) -> Channel
@@ -15172,10 +14990,7 @@ client.course_chapters.delete(
-Update a chapter's title within a course. - -Required permissions: - - `courses:update` +Reopen a resolved support channel.
@@ -15198,9 +15013,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_chapters.update( - id="chap_xxxxxxxxxxxxx", - title="title", +client.channels.reopen( + id="id", ) ``` @@ -15217,7 +15031,7 @@ client.course_chapters.update(
-**id:** `str` — The unique identifier of the chapter to update (e.g., "chap_XXXXX"). +**id:** `str` — Public resource ID.
@@ -15225,7 +15039,72 @@ client.course_chapters.update(
-**title:** `str` — The new display title of the chapter (e.g., "Module 1: Introduction"). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+ +
+ + + + +
+ +
client.channels.resolve(...) -> Channel +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Resolve a support channel. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.channels.resolve( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Public resource ID.
@@ -15245,8 +15124,7 @@ client.course_chapters.update(
-## CourseLessonInteractions -
client.course_lesson_interactions.list(...) -> ListCourseLessonInteractionsResponse +
client.channels.unpin(...)
@@ -15258,11 +15136,7 @@ client.course_chapters.update(
-Returns a paginated list of lesson interactions for a lesson or course. Callers without admin access to the course's experience see only their own interactions. - -Required permissions: - - `courses:read` - - `course_analytics:read` +Remove a channel from your pins and compact the remaining order. Your discarded memberships and inaccessible channels can be unpinned. Does not return channel data or grant read access.
@@ -15285,12 +15159,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lesson_interactions.list( - first=42, - last=42, - user_id="user_xxxxxxxxxxxxx", - lesson_id="lesn_xxxxxxxxxxxxx", - course_id="cors_xxxxxxxxxxxxx", +client.channels.unpin( + id="id", ) ``` @@ -15307,7 +15177,7 @@ client.course_lesson_interactions.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**id:** `str` — The channel ID, prefixed `feed_`.
@@ -15315,15 +15185,79 @@ client.course_lesson_interactions.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## ChatChannels +
client.chat_channels.list(...) -> ListChatChannelsResponse
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +#### 📝 Description + +
+
+ +
+
+ +Lists the chat channels in an account. + +Required permissions: + - `chat:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.chat_channels.list( + first=42, + last=42, + product_id="prod_xxxxxxxxxxxxx", + account_id="biz_xxxxxxxxxxxxxx", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `str` — The unique identifier of the company to list chat channels for.
@@ -15331,7 +15265,7 @@ client.course_lesson_interactions.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -15339,7 +15273,7 @@ client.course_lesson_interactions.list(
-**user_id:** `typing.Optional[str]` — The unique identifier of the user to filter lesson interactions for. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -15347,7 +15281,7 @@ client.course_lesson_interactions.list(
-**lesson_id:** `typing.Optional[str]` — The unique identifier of the lesson to filter interactions for. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -15355,7 +15289,7 @@ client.course_lesson_interactions.list(
-**course_id:** `typing.Optional[str]` — The unique identifier of the course to filter interactions for. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -15363,7 +15297,7 @@ client.course_lesson_interactions.list(
-**completed:** `typing.Optional[bool]` — Whether to filter for completed or in-progress lesson interactions. +**product_id:** `typing.Optional[str]` — The unique identifier of a product to filter by. When set, only chat channels connected to this product are returned.
@@ -15383,7 +15317,7 @@ client.course_lesson_interactions.list(
-
client.course_lesson_interactions.retrieve(...) -> CourseLessonInteraction +
client.chat_channels.retrieve(...) -> ChatChannel
@@ -15395,11 +15329,10 @@ client.course_lesson_interactions.list(
-Retrieves the details of an existing course lesson interaction. +Retrieves the details of an existing chat channel. Required permissions: - - `courses:read` - - `course_analytics:read` + - `chat:read`
@@ -15422,8 +15355,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lesson_interactions.retrieve( - id="crsli_xxxxxxxxxxxx", +client.chat_channels.retrieve( + id="id", ) ``` @@ -15440,7 +15373,7 @@ client.course_lesson_interactions.retrieve(
-**id:** `str` — The unique identifier of the lesson interaction to retrieve. +**id:** `str` — The unique identifier of the chat channel or experience to retrieve.
@@ -15460,8 +15393,7 @@ client.course_lesson_interactions.retrieve(
-## CourseLessons -
client.course_lessons.list(...) -> ListCourseLessonsResponse +
client.chat_channels.update(...) -> ChatChannel
@@ -15473,10 +15405,10 @@ client.course_lesson_interactions.retrieve(
-Returns a paginated list of lessons within a course or chapter, ordered by position. +Updates a chat channel's moderation settings, such as who can post, banned words, and media restrictions. Required permissions: - - `courses:read` + - `chat:moderate`
@@ -15499,11 +15431,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.list( - first=42, - last=42, - course_id="cors_xxxxxxxxxxxxx", - chapter_id="chap_xxxxxxxxxxxxx", +client.chat_channels.update( + id="id", ) ``` @@ -15520,7 +15449,7 @@ client.course_lessons.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**id:** `str` — The unique identifier of the chat channel to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a chat channel ID.
@@ -15528,7 +15457,7 @@ client.course_lessons.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**ban_media:** `typing.Optional[bool]` — Whether media uploads such as images and videos are banned in this chat channel.
@@ -15536,7 +15465,7 @@ client.course_lessons.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**ban_urls:** `typing.Optional[bool]` — Whether URLs and links are banned from being posted in this chat channel.
@@ -15544,7 +15473,7 @@ client.course_lessons.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**banned_words:** `typing.Optional[typing.List[str]]` — A list of words that are automatically blocked from messages in this chat channel. For example, ['spam', 'scam'].
@@ -15552,7 +15481,7 @@ client.course_lessons.list(
-**course_id:** `typing.Optional[str]` — The unique identifier of the course to return all lessons across all chapters. +**user_posts_cooldown_seconds:** `typing.Optional[int]` — The minimum number of seconds a user must wait between sending messages in this chat channel. Pass null or 0 to remove the cooldown.
@@ -15560,7 +15489,15 @@ client.course_lessons.list(
-**chapter_id:** `typing.Optional[str]` — The unique identifier of a chapter to return only its lessons. +**who_can_post:** `typing.Optional[WhoCanPostTypes]` — Controls which roles are allowed to send messages in this chat channel. + +
+
+ +
+
+ +**who_can_react:** `typing.Optional[WhoCanReactTypes]` — Controls which roles are allowed to add reactions to messages in this chat channel.
@@ -15580,7 +15517,8 @@ client.course_lessons.list(
-
client.course_lessons.create(...) -> CourseLesson +## Checkout Configurations +
client.checkout_configurations.list(...) -> ListCheckoutConfigurationsResponse
@@ -15592,10 +15530,7 @@ client.course_lessons.list(
-Create a new lesson within a course chapter. Lessons can contain video, text, or assessment content. - -Required permissions: - - `courses:update` +Lists checkout configurations for an account.
@@ -15618,9 +15553,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.create( - chapter_id="chap_xxxxxxxxxxxxx", - lesson_type="text", +client.checkout_configurations.list( + account_id="account_id", ) ``` @@ -15637,7 +15571,7 @@ client.course_lessons.create(
-**chapter_id:** `str` — The unique identifier of the chapter to create the lesson in (e.g., "chap_XXXXX"). +**account_id:** `str` — Account ID, prefixed `biz_`.
@@ -15645,7 +15579,7 @@ client.course_lessons.create(
-**lesson_type:** `LessonTypes` — The content type of the lesson, such as video, text, quiz, or knowledge check. +**variant_id:** `typing.Optional[str]` — Only return checkout configurations for this variant ID, prefixed `plan_`.
@@ -15653,7 +15587,7 @@ client.course_lessons.create(
-**content:** `typing.Optional[str]` — The Markdown content body of the lesson. +**created_before:** `typing.Optional[str]` — Only return checkout configurations created before this ISO 8601 timestamp.
@@ -15661,7 +15595,7 @@ client.course_lessons.create(
-**days_from_course_start_until_unlock:** `typing.Optional[int]` — The number of days after a student starts the course before this lesson becomes accessible. +**created_after:** `typing.Optional[str]` — Only return checkout configurations created after this ISO 8601 timestamp.
@@ -15669,7 +15603,7 @@ client.course_lessons.create(
-**embed_id:** `typing.Optional[str]` — The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID). +**order:** `typing.Optional[ListCheckoutConfigurationsRequestOrder]` — Field used to sort checkout configurations.
@@ -15677,7 +15611,7 @@ client.course_lessons.create(
-**embed_type:** `typing.Optional[EmbedTypes]` — The type of video embed for this lesson, such as YouTube or Loom. +**direction:** `typing.Optional[ListCheckoutConfigurationsRequestDirection]` — Sort direction. Defaults to `desc`.
@@ -15685,7 +15619,7 @@ client.course_lessons.create(
-**thumbnail:** `typing.Optional[CreateCourseLessonsRequestThumbnail]` — The thumbnail image for the lesson in PNG, JPEG, or GIF format. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -15693,7 +15627,7 @@ client.course_lessons.create(
-**title:** `typing.Optional[str]` — The display title of the lesson (e.g., "Getting Started with APIs"). +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -15713,7 +15647,7 @@ client.course_lessons.create(
-
client.course_lessons.retrieve(...) -> CourseLesson +
client.checkout_configurations.create(...) -> CreateCheckoutConfigurationsResponse
@@ -15725,10 +15659,7 @@ client.course_lessons.create(
-Retrieves the details of an existing course lesson. - -Required permissions: - - `courses:read` +Creates a reusable checkout configuration for an existing or inline variant. Send customers to its `purchase_url` to check out.
@@ -15751,8 +15682,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.retrieve( - id="lesn_xxxxxxxxxxxxx", +client.checkout_configurations.create( + account_id="biz_xxxxxxxxxxxxxx", + variant_id="plan_xxxxxxxxxxxxx", ) ``` @@ -15769,7 +15701,7 @@ client.course_lessons.retrieve(
-**id:** `str` — The unique identifier of the lesson to retrieve. +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`.
@@ -15777,75 +15709,71 @@ client.course_lessons.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**affiliate_code:** `typing.Optional[str]` — Affiliate code to apply to the checkout.
- -
+
+
+**currency:** `typing.Optional[str]` — Currency used for setup-mode payment method availability. +
-
-
client.course_lessons.delete(...) -> bool
-#### 📝 Description +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Custom key-value metadata copied to payments and memberships. + +
+
+**mode:** `typing.Optional[CreateCheckoutConfigurationsRequestMode]` — Controls whether checkout charges the buyer immediately or saves payment details for later. Defaults to `payment`. + +
+
+
-Permanently delete a lesson and remove it from its chapter. - -Required permissions: - - `courses:update` -
-
+**payment_method_configuration:** `typing.Optional[CreateCheckoutConfigurationsRequestPaymentMethodConfiguration]` — Payment method overrides for this checkout. `null` uses the variant or platform defaults. + -#### 🔌 Usage -
+**redirect_url:** `typing.Optional[str]` — URL customers are sent to after checkout. + +
+
+
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.course_lessons.delete( - id="lesn_xxxxxxxxxxxxx", -) - -``` -
-
+**three_ds_level:** `typing.Optional[CreateCheckoutConfigurationsRequestThreeDsLevel]` — 3D Secure behavior for supported on-session card payments. `mandate_challenge` requires a 3DS challenge before payment processing; `mandate_if_required` mandates a challenge only when the payment processor requires it; `frictionless_if_required` uses the regular frictionless 3DS flow. Payments of $1,000 or more use `mandate_if_required` unless `mandate_challenge` is selected. Risk and authentication recovery requirements can override the preference. Applies in setup mode; `null` uses frictionless 3DS. Payment mode uses the variant policy. + -#### ⚙️ Parameters -
+**variant:** `typing.Optional[CreateCheckoutConfigurationsRequestVariant]` — Variant attributes used to create or find a variant for this checkout configuration. Mutually exclusive with `variant_id`. + +
+
+
-**id:** `str` — The unique identifier of the lesson to delete (e.g., "les_XXXXX"). +**variant_id:** `typing.Optional[str]` — Existing variant ID, prefixed `plan_`. Mutually exclusive with `variant`.
@@ -15865,7 +15793,7 @@ client.course_lessons.delete(
-
client.course_lessons.update(...) -> CourseLesson +
client.checkout_configurations.retrieve(...) -> RetrieveCheckoutConfigurationsResponse
@@ -15877,10 +15805,7 @@ client.course_lessons.delete(
-Update a lesson's content, type, visibility, assessment questions, or media attachments. - -Required permissions: - - `courses:update` +Retrieves a checkout configuration by ID. This endpoint is public so a checkout page can load from the configuration URL.
@@ -15903,8 +15828,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.update( - id="lesn_xxxxxxxxxxxxx", +client.checkout_configurations.retrieve( + id="id", ) ``` @@ -15921,119 +15846,7 @@ client.course_lessons.update(
-**id:** `str` — The unique identifier of the lesson to update (e.g., "les_XXXXX"). - -
-
- -
-
- -**assessment_completion_requirement:** `typing.Optional[UpdateCourseLessonsRequestAssessmentCompletionRequirement]` — The passing criteria for quiz or knowledge check lessons, such as minimum grade or correct answers. - -
-
- -
-
- -**assessment_questions:** `typing.Optional[typing.List[UpdateCourseLessonsRequestAssessmentQuestionsItem]]` — The full list of assessment questions for quiz or knowledge check lessons. Replaces all existing questions. - -
-
- -
-
- -**attachments:** `typing.Optional[typing.List[UpdateCourseLessonsRequestAttachmentsItem]]` — File attachments for the lesson such as PDFs or documents. Replaces all existing attachments. - -
-
- -
-
- -**content:** `typing.Optional[str]` — The Markdown content body of the lesson. - -
-
- -
-
- -**days_from_course_start_until_unlock:** `typing.Optional[int]` — The number of days after a student starts the course before this lesson becomes accessible. - -
-
- -
-
- -**embed_id:** `typing.Optional[str]` — The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID). - -
-
- -
-
- -**embed_type:** `typing.Optional[EmbedTypes]` — The type of video embed for this lesson, such as YouTube or Loom. - -
-
- -
-
- -**lesson_type:** `typing.Optional[LessonTypes]` — The content type of the lesson, such as video, text, quiz, or knowledge check. - -
-
- -
-
- -**main_pdf:** `typing.Optional[UpdateCourseLessonsRequestMainPdf]` — The primary PDF document attached to this lesson for student reference. - -
-
- -
-
- -**max_attempts:** `typing.Optional[int]` — The maximum number of attempts a student is allowed for assessment lessons. - -
-
- -
-
- -**mux_asset_id:** `typing.Optional[str]` — The identifier of a Mux video asset to attach to this lesson (e.g., "mux_XXXXX"). - -
-
- -
-
- -**thumbnail:** `typing.Optional[UpdateCourseLessonsRequestThumbnail]` — The thumbnail image for the lesson in PNG, JPEG, or GIF format. - -
-
- -
-
- -**title:** `typing.Optional[str]` — The display title of the lesson (e.g., "Getting Started with APIs"). - -
-
- -
-
- -**visibility:** `typing.Optional[LessonVisibilities]` — Controls whether this lesson is visible to students or hidden as a draft. +**id:** `str` — The ID of the checkout configuration.
@@ -16053,7 +15866,7 @@ client.course_lessons.update(
-
client.course_lessons.mark_as_completed(...) -> bool +
client.checkout_configurations.delete(...) -> DeleteCheckoutConfigurationsResponse
@@ -16065,7 +15878,7 @@ client.course_lessons.update(
-Mark a lesson as completed for the current user after they finish the content. +Deletes a checkout configuration so its checkout URL can no longer be used.
@@ -16088,8 +15901,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.mark_as_completed( - lesson_id="lesson_id", +client.checkout_configurations.delete( + id="id", ) ``` @@ -16106,7 +15919,7 @@ client.course_lessons.mark_as_completed(
-**lesson_id:** `str` — The unique identifier of the lesson to mark as completed (e.g., "les_XXXXX"). +**id:** `str` — The ID of the checkout configuration.
@@ -16126,7 +15939,8 @@ client.course_lessons.mark_as_completed(
-
client.course_lessons.start(...) -> bool +## ClaimLinks +
client.claim_links.retrieve(...) -> RetrieveClaimLinksResponse
@@ -16138,7 +15952,7 @@ client.course_lessons.mark_as_completed(
-Record that the current user has started viewing a lesson, creating progress tracking records. +Retrieves a funded claim link by ID or by its public claim code. By ID, the caller needs `airdrop_link:basic:read` on the funding account, or must own the funding personal account; `code` and `claim_url` are `null` without `airdrop_link:manage` on the funding account or `payout:withdraw_funds` on the personal account. A claim code previews the sender, amount, expiry, and claim availability without authentication. Treat codes as secrets: anyone holding one can claim after signing in.
@@ -16161,8 +15975,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.start( - lesson_id="lesson_id", +client.claim_links.retrieve( + id="id", ) ``` @@ -16179,7 +15993,7 @@ client.course_lessons.start(
-**lesson_id:** `str` — The unique identifier of the lesson the user is starting (e.g., "les_XXXXX"). +**id:** `str` — A claim-link ID (`airdrp_…`), or the public claim code from the `c` parameter in the claim URL.
@@ -16199,7 +16013,7 @@ client.course_lessons.start(
-
client.course_lessons.submit_assessment(...) -> SubmitAssessmentCourseLessonsResponse +
client.claim_links.claim(...) -> ClaimClaimLinksResponse
@@ -16211,7 +16025,7 @@ client.course_lessons.start(
-Submit answers for a quiz or knowledge check lesson and receive a graded result. +Claims a funded link into the authenticated user's personal balance and returns the updated link. Requires a signed-in user and the public claim code; account API keys cannot claim on a recipient's behalf. Each user can claim a link once. Reuse the same `Idempotency-Key` when retrying the same request. On-chain claims may take several minutes to complete.
@@ -16228,20 +16042,14 @@ Submit answers for a quiz or knowledge check lesson and receive a graded result. ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.course_lessons import SubmitAssessmentCourseLessonsRequestAnswersItem client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.course_lessons.submit_assessment( - lesson_id="lesson_id", - answers=[ - SubmitAssessmentCourseLessonsRequestAnswersItem( - question_id="question_id", - ) - ], +client.claim_links.claim( + id="id", ) ``` @@ -16258,15 +16066,7 @@ client.course_lessons.submit_assessment(
-**lesson_id:** `str` — The unique identifier of the quiz or knowledge check lesson to submit answers for (e.g., "les_XXXXX"). - -
-
- -
-
- -**answers:** `typing.List[SubmitAssessmentCourseLessonsRequestAnswersItem]` — The list of answers to submit for each assessment question. +**id:** `str` — The public claim code from the `c` parameter in the claim URL. A claim-link ID does not authorize redemption.
@@ -16286,8 +16086,8 @@ client.course_lessons.submit_assessment(
-## CourseStudents -
client.course_students.list(...) -> ListCourseStudentsResponse +## CompanyTokenTransactions +
client.company_token_transactions.list(...) -> ListCompanyTokenTransactionsResponse
@@ -16299,11 +16099,12 @@ client.course_lessons.submit_assessment(
-Returns a paginated list of students enrolled in a course, with optional name filtering. +Lists an account's token transactions, newest first. Required permissions: - - `courses:read` - - `course_analytics:read` + - `company_token_transaction:read` + - `member:basic:read` + - `company:basic:read`
@@ -16326,10 +16127,11 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.course_students.list( +client.company_token_transactions.list( first=42, last=42, - course_id="cors_xxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxx", + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -16346,7 +16148,7 @@ client.course_students.list(
-**course_id:** `str` — The unique identifier of the course to list enrolled students for. +**account_id:** `str` — The unique identifier of the company to list token transactions for.
@@ -16386,7 +16188,15 @@ client.course_students.list(
-**keyword:** `typing.Optional[str]` — A search term to filter students by name or username. +**user_id:** `typing.Optional[str]` — Filter transactions to only those involving this specific user. + +
+
+ +
+
+ +**transaction_type:** `typing.Optional[CompanyTokenTransactionTypes]`
@@ -16406,7 +16216,7 @@ client.course_students.list(
-
client.course_students.retrieve(...) -> CourseStudent +
client.company_token_transactions.create(...) -> CompanyTokenTransaction
@@ -16418,11 +16228,12 @@ client.course_students.list(
-Retrieves the details of an existing course student. +Creates a token transaction that adds, subtracts, or transfers tokens for a member of an account. Required permissions: - - `courses:read` - - `course_analytics:read` + - `company_token_transaction:create` + - `member:basic:read` + - `company:basic:read`
@@ -16439,14 +16250,20 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +from whop_sdk.company_token_transactions import CreateCompanyTokenTransactionsRequest_Transfer client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.course_students.retrieve( - id="id", +client.company_token_transactions.create( + request=CreateCompanyTokenTransactionsRequest_Transfer( + account_id="biz_xxxxxxxxxxxxxx", + amount=6.9, + destination_user_id="destination_user_id", + user_id="user_xxxxxxxxxxxxx", + ), ) ``` @@ -16463,7 +16280,7 @@ client.course_students.retrieve(
-**id:** `str` — The unique identifier of the course student record to retrieve. +**request:** `CreateCompanyTokenTransactionsRequest` — Parameters for CreateCompanyTokenTransaction
@@ -16483,8 +16300,7 @@ client.course_students.retrieve(
-## Courses -
client.courses.list(...) -> ListCoursesResponse +
client.company_token_transactions.retrieve(...) -> CompanyTokenTransaction
@@ -16496,10 +16312,12 @@ client.course_students.retrieve(
-Returns a paginated list of the courses in an experience or an account. `hidden` courses are included only for callers with `courses:update`. +Retrieves a token transaction. Required permissions: - - `courses:read` + - `company_token_transaction:read` + - `member:basic:read` + - `company:basic:read`
@@ -16522,11 +16340,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.courses.list( - first=42, - last=42, - experience_id="exp_xxxxxxxxxxxxxx", - account_id="biz_xxxxxxxxxxxxxx", +client.company_token_transactions.retrieve( + id="id", ) ``` @@ -16543,7 +16358,7 @@ client.courses.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**id:** `str` — The unique identifier of the token transaction to retrieve.
@@ -16551,31 +16366,74 @@ client.courses.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+## Confirmation Tokens +
client.confirmation_tokens.retrieve(...) -> ConfirmationToken
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. - +#### 📝 Description + +
+
+ +
+
+ +Retrieves a confirmation token's payment method and billing details, never the underlying payment credential, to display what the buyer chose or check that the token is still usable. Requires no authentication and is rate-limited.
+
+
+ +#### 🔌 Usage
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.confirmation_tokens.retrieve( + id="id", + account_id="account_id", +) + +``` +
+
+#### ⚙️ Parameters +
-**experience_id:** `typing.Optional[str]` — The unique identifier of the experience to list courses for. +
+
+ +**id:** `str` — Confirmation token ID, prefixed `ctok_`.
@@ -16583,7 +16441,7 @@ client.courses.list(
-**account_id:** `typing.Optional[str]` — The unique identifier of the company to list courses for. +**account_id:** `str` — The account the token was minted for, prefixed `biz_`. It must match the token's account.
@@ -16603,7 +16461,8 @@ client.courses.list(
-
client.courses.create(...) -> Course +## CourseChapters +
client.course_chapters.list(...) -> ListCourseChaptersResponse
@@ -16615,10 +16474,10 @@ client.courses.list(
-Create a new course within an experience, with optional chapters, lessons, and a certificate. +Returns a paginated list of chapters within a course, ordered by position. Required permissions: - - `courses:update` + - `courses:read`
@@ -16641,9 +16500,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.courses.create( - experience_id="exp_xxxxxxxxxxxxxx", - title="title", +client.course_chapters.list( + first=42, + last=42, + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -16660,31 +16520,7 @@ client.courses.create(
-**experience_id:** `str` — The unique identifier of the experience to create the course in (e.g., "exp_XXXXX"). - -
-
- -
-
- -**title:** `str` — The display title of the course (e.g., "Introduction to Web Development"). - -
-
- -
-
- -**certificate_after_completion_enabled:** `typing.Optional[bool]` — Whether the course awards students a PDF certificate after completing all lessons. - -
-
- -
-
- -**order:** `typing.Optional[str]` — The decimal order position of the course within its experience. Use fractional values (e.g., "1.5") to place between existing courses. +**course_id:** `str` — The unique identifier of the course to list chapters for.
@@ -16692,7 +16528,7 @@ client.courses.create(
-**require_completing_lessons_in_order:** `typing.Optional[bool]` — Whether students must complete each lesson sequentially before advancing to the next one. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -16700,7 +16536,7 @@ client.courses.create(
-**tagline:** `typing.Optional[str]` — A short tagline displayed beneath the course title (e.g., "Master the fundamentals of design"). +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -16708,7 +16544,7 @@ client.courses.create(
-**thumbnail:** `typing.Optional[CreateCoursesRequestThumbnail]` — The thumbnail image for the course in PNG, JPEG, or GIF format. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -16716,7 +16552,7 @@ client.courses.create(
-**visibility:** `typing.Optional[CourseVisibilities]` — Controls whether this course is visible to students or hidden as a draft. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -16736,7 +16572,7 @@ client.courses.create(
-
client.courses.retrieve(...) -> Course +
client.course_chapters.create(...) -> CourseChapter
@@ -16748,10 +16584,10 @@ client.courses.create(
-Retrieves the details of an existing course. A `hidden` course is returned only to callers with `courses:update`. +Create a new chapter within a course to organize lessons into sections. Required permissions: - - `courses:read` + - `courses:update`
@@ -16774,8 +16610,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.courses.retrieve( - id="cors_xxxxxxxxxxxxx", +client.course_chapters.create( + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -16792,7 +16628,15 @@ client.courses.retrieve(
-**id:** `str` — The unique identifier of the course to retrieve. +**course_id:** `str` — The unique identifier of the course to create the chapter in (e.g., "course_XXXXX"). + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — The display title of the chapter (e.g., "Module 1: Introduction").
@@ -16812,7 +16656,7 @@ client.courses.retrieve(
-
client.courses.delete(...) -> bool +
client.course_chapters.retrieve(...) -> CourseChapter
@@ -16824,10 +16668,10 @@ client.courses.retrieve(
-Permanently delete a course and all of its chapters, lessons, and student progress. +Retrieves the details of an existing course chapter. Required permissions: - - `courses:update` + - `courses:read`
@@ -16850,8 +16694,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.courses.delete( - id="cors_xxxxxxxxxxxxx", +client.course_chapters.retrieve( + id="chap_xxxxxxxxxxxxx", ) ``` @@ -16868,7 +16712,7 @@ client.courses.delete(
-**id:** `str` — The unique identifier of the course to delete (e.g., "course_XXXXX"). +**id:** `str` — The unique identifier of the chapter to retrieve.
@@ -16888,7 +16732,7 @@ client.courses.delete(
-
client.courses.update(...) -> Course +
client.course_chapters.delete(...) -> bool
@@ -16900,7 +16744,7 @@ client.courses.delete(
-Update a course's title, description, visibility, thumbnail, or chapter ordering. +Permanently delete a chapter and all of its lessons from a course. Required permissions: - `courses:update` @@ -16926,8 +16770,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.courses.update( - id="cors_xxxxxxxxxxxxx", +client.course_chapters.delete( + id="chap_xxxxxxxxxxxxx", ) ``` @@ -16944,7 +16788,7 @@ client.courses.update(
-**id:** `str` — The unique identifier of the course to update (e.g., "course_XXXXX"). +**id:** `str` — The unique identifier of the chapter to delete (e.g., "chap_XXXXX").
@@ -16952,71 +16796,76 @@ client.courses.update(
-**certificate_after_completion_enabled:** `typing.Optional[bool]` — Whether the course awards students a PDF certificate after completing all lessons. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**chapters:** `typing.Optional[typing.List[UpdateCoursesRequestChaptersItem]]` — A list of chapters with nested lessons to reorder or rename in bulk. -
+
+
client.course_chapters.update(...) -> CourseChapter
-**description:** `typing.Optional[str]` — A short description of the course displayed to students on the course page. - -
-
+#### 📝 Description
-**language:** `typing.Optional[Languages]` — The primary language spoken in the video content of the course. - -
-
-
-**order:** `typing.Optional[str]` — The decimal order position of the course within its experience. Use fractional values (e.g., "1.5") to place between existing courses. - +Update a chapter's title within a course. + +Required permissions: + - `courses:update`
+ + + +#### 🔌 Usage
-**require_completing_lessons_in_order:** `typing.Optional[bool]` — Whether students must complete each lesson sequentially before advancing to the next one. - -
-
-
-**tagline:** `typing.Optional[str]` — A short tagline displayed beneath the course title (e.g., "Master the fundamentals of design"). - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.course_chapters.update( + id="chap_xxxxxxxxxxxxx", + title="title", +) + +```
+ + + +#### ⚙️ Parameters
-**thumbnail:** `typing.Optional[UpdateCoursesRequestThumbnail]` — The thumbnail image for the course in PNG, JPEG, or GIF format. - -
-
-
-**title:** `typing.Optional[str]` — The display title of the course (e.g., "Introduction to Web Development"). +**id:** `str` — The unique identifier of the chapter to update (e.g., "chap_XXXXX").
@@ -17024,7 +16873,7 @@ client.courses.update(
-**visibility:** `typing.Optional[CourseVisibilities]` — Controls whether this course is visible to students or hidden as a draft. +**title:** `str` — The new display title of the chapter (e.g., "Module 1: Introduction").
@@ -17044,8 +16893,8 @@ client.courses.update(
-## Deposits -
client.deposits.create(...) -> CreateDepositsResponse +## CourseLessonInteractions +
client.course_lesson_interactions.list(...) -> ListCourseLessonInteractionsResponse
@@ -17057,7 +16906,11 @@ client.courses.update(
-Returns the deposit methods for an account or user, including crypto addresses, bank transfer instructions, and, for a business, a hosted deposit page. Bitcoin deposits are converted to USDT on Plasma in the destination's wallet. Business destinations require no authentication. Pass `payment_method_id` to also charge a business's saved payment method for `amount` in USD and add it to the business's balance; that requires authentication with the `payment:charge` scope. The charge has no fees or taxes and does not count as revenue. +Returns a paginated list of lesson interactions for a lesson or course. Callers without admin access to the course's experience see only their own interactions. + +Required permissions: + - `courses:read` + - `course_analytics:read`
@@ -17080,8 +16933,12 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.deposits.create( - destination="biz_xxxxxxxxxxxxxx", +client.course_lesson_interactions.list( + first=42, + last=42, + user_id="user_xxxxxxxxxxxxx", + lesson_id="lesn_xxxxxxxxxxxxx", + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -17098,7 +16955,7 @@ client.deposits.create(
-**destination:** `str` — Account ID to fund, `biz_` or `user_`. Any business resolves without authentication; a user account resolves only for that same authenticated user. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -17106,7 +16963,7 @@ client.deposits.create(
-**amount:** `typing.Optional[float]` — Amount to prefill on hosted deposit page. Crypto deposits require a $10 minimum. With `payment_method_id`, the amount in USD to charge, and required. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -17114,7 +16971,7 @@ client.deposits.create(
-**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[CreateDepositsRequestMetadataValue]]]` — Custom metadata to attach to the payment the charge creates. Ignored unless `payment_method_id` is provided. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -17122,7 +16979,7 @@ client.deposits.create(
-**origin_bic:** `typing.Optional[str]` — SWIFT/BIC of the bank the funds are sent from, 8 or 11 characters. Fills each bank currency's `swift_bic` with the intermediary bank to route the wire through. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -17130,7 +16987,31 @@ client.deposits.create(
-**payment_method_id:** `typing.Optional[str]` — A saved payment method of the business to charge for `amount`, prefixed `payt_`. Save one with Create setup intent and `owner_id` set to the account. Only for a `biz_` destination, and requires authentication with the `payment:charge` scope. A declined charge fails the request with 400. +**user_id:** `typing.Optional[str]` — The unique identifier of the user to filter lesson interactions for. + +
+
+ +
+
+ +**lesson_id:** `typing.Optional[str]` — The unique identifier of the lesson to filter interactions for. + +
+
+ +
+
+ +**course_id:** `typing.Optional[str]` — The unique identifier of the course to filter interactions for. + +
+
+ +
+
+ +**completed:** `typing.Optional[bool]` — Whether to filter for completed or in-progress lesson interactions.
@@ -17150,7 +17031,7 @@ client.deposits.create(
-
client.deposits.reverse(...) -> LedgerActivity +
client.course_lesson_interactions.retrieve(...) -> CourseLessonInteraction
@@ -17162,10 +17043,11 @@ client.deposits.create(
-Sends a deposit back where it came from. If the available balance doesn't cover it, nothing is sent. +Retrieves the details of an existing course lesson interaction. -- **Bank deposit:** pass its `vbt_` ID. The deposit fee is returned, so the balance only has to cover the rest. Returns a `topup_reversal` row. -- **Card deposit:** pass its `pay_` ID. It's refunded to the card, and its fees aren't returned. Returns a `payment_refund` row. +Required permissions: + - `courses:read` + - `course_analytics:read`
@@ -17188,8 +17070,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.deposits.reverse( - id="vbt_xxxxxxxxxxxxxx", +client.course_lesson_interactions.retrieve( + id="crsli_xxxxxxxxxxxx", ) ``` @@ -17206,31 +17088,7 @@ client.deposits.reverse(
-**id:** `str` — A bank deposit ID, prefixed `vbt_`, or a card deposit's payment ID, prefixed `pay_`. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — The business that received the deposit, prefixed `biz_`. Pass this or `user_id`. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[ReverseDepositsRequestMetadataValue]]]` — Custom metadata to store with the reversal. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — The user that received the deposit, prefixed `user_`. Pass this or `account_id`. +**id:** `str` — The unique identifier of the lesson interaction to retrieve.
@@ -17250,8 +17108,8 @@ client.deposits.reverse(
-## Dispute alerts -
client.dispute_alerts.list(...) -> ListDisputeAlertsResponse +## CourseLessons +
client.course_lessons.list(...) -> ListCourseLessonsResponse
@@ -17263,7 +17121,10 @@ client.deposits.reverse(
-Lists the dispute alerts and early fraud warnings across the accounts you can read. +Returns a paginated list of lessons within a course or chapter, ordered by position. + +Required permissions: + - `courses:read`
@@ -17286,7 +17147,12 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dispute_alerts.list() +client.course_lessons.list( + first=42, + last=42, + course_id="cors_xxxxxxxxxxxxx", + chapter_id="chap_xxxxxxxxxxxxx", +) ``` @@ -17302,7 +17168,7 @@ client.dispute_alerts.list()
-**account_id:** `typing.Optional[str]` — Only alerts on this account's payments (`biz_` tag). Omit it to cover every account you can read. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -17310,7 +17176,7 @@ client.dispute_alerts.list()
-**payment_id:** `typing.Optional[str]` — Only alerts on this payment (`pay_` tag). A payment can carry several. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -17318,7 +17184,7 @@ client.dispute_alerts.list()
-**type:** `typing.Optional[ListDisputeAlertsRequestType]` — Only alerts of this kind. `early_fraud_warning` for issuer fraud reports, `dispute_alert` for pre-dispute notices, `rapid_dispute_resolution` for Visa RDR cases the network already closed. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -17326,7 +17192,7 @@ client.dispute_alerts.list()
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -17334,7 +17200,7 @@ client.dispute_alerts.list()
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**course_id:** `typing.Optional[str]` — The unique identifier of the course to return all lessons across all chapters.
@@ -17342,7 +17208,7 @@ client.dispute_alerts.list()
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**chapter_id:** `typing.Optional[str]` — The unique identifier of a chapter to return only its lessons.
@@ -17350,15 +17216,76 @@ client.dispute_alerts.list()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.course_lessons.create(...) -> CourseLesson
-**order:** `typing.Optional[ListDisputeAlertsRequestOrder]` — The field to sort alerts by. +#### 📝 Description + +
+
+ +
+
+ +Create a new lesson within a course chapter. Lessons can contain video, text, or assessment content. + +Required permissions: + - `courses:update` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.course_lessons.create( + chapter_id="chap_xxxxxxxxxxxxx", + lesson_type="text", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**chapter_id:** `str` — The unique identifier of the chapter to create the lesson in (e.g., "chap_XXXXX").
@@ -17366,7 +17293,7 @@ client.dispute_alerts.list()
-**direction:** `typing.Optional[ListDisputeAlertsRequestDirection]` — Sort direction. +**lesson_type:** `LessonTypes` — The content type of the lesson, such as video, text, quiz, or knowledge check.
@@ -17374,7 +17301,7 @@ client.dispute_alerts.list()
-**created_before:** `typing.Optional[str]` — Only alerts Whop received before this ISO 8601 timestamp. +**content:** `typing.Optional[str]` — The Markdown content body of the lesson.
@@ -17382,7 +17309,39 @@ client.dispute_alerts.list()
-**created_after:** `typing.Optional[str]` — Only alerts Whop received after this ISO 8601 timestamp. +**days_from_course_start_until_unlock:** `typing.Optional[int]` — The number of days after a student starts the course before this lesson becomes accessible. + +
+
+ +
+
+ +**embed_id:** `typing.Optional[str]` — The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID). + +
+
+ +
+
+ +**embed_type:** `typing.Optional[EmbedTypes]` — The type of video embed for this lesson, such as YouTube or Loom. + +
+
+ +
+
+ +**thumbnail:** `typing.Optional[CreateCourseLessonsRequestThumbnail]` — The thumbnail image for the lesson in PNG, JPEG, or GIF format. + +
+
+ +
+
+ +**title:** `typing.Optional[str]` — The display title of the lesson (e.g., "Getting Started with APIs").
@@ -17402,7 +17361,7 @@ client.dispute_alerts.list()
-
client.dispute_alerts.retrieve(...) -> DisputeAlert +
client.course_lessons.retrieve(...) -> CourseLesson
@@ -17414,7 +17373,10 @@ client.dispute_alerts.list()
-Retrieves a single dispute alert or early fraud warning by ID. +Retrieves the details of an existing course lesson. + +Required permissions: + - `courses:read`
@@ -17437,8 +17399,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dispute_alerts.retrieve( - id="id", +client.course_lessons.retrieve( + id="lesn_xxxxxxxxxxxxx", ) ``` @@ -17455,7 +17417,7 @@ client.dispute_alerts.retrieve(
-**id:** `str` — The dispute alert ID, prefixed `dspa_`. +**id:** `str` — The unique identifier of the lesson to retrieve.
@@ -17475,8 +17437,7 @@ client.dispute_alerts.retrieve(
-## Disputes -
client.disputes.list(...) -> ListDisputesResponse +
client.course_lessons.delete(...) -> bool
@@ -17488,7 +17449,10 @@ client.dispute_alerts.retrieve(
-Lists the disputes across the accounts you can read. +Permanently delete a lesson and remove it from its chapter. + +Required permissions: + - `courses:update`
@@ -17511,7 +17475,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.disputes.list() +client.course_lessons.delete( + id="lesn_xxxxxxxxxxxxx", +) ``` @@ -17527,7 +17493,7 @@ client.disputes.list()
-**account_id:** `typing.Optional[str]` — Only disputes filed against this account (`biz_` tag). Omit it to cover every account you can read. +**id:** `str` — The unique identifier of the lesson to delete (e.g., "les_XXXXX").
@@ -17535,71 +17501,75 @@ client.disputes.list()
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. -
+
+
client.course_lessons.update(...) -> CourseLesson
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. - -
-
+#### 📝 Description
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. - -
-
-
-**order:** `typing.Optional[ListDisputesRequestOrder]` — The field to sort disputes by. - +Update a lesson's content, type, visibility, assessment questions, or media attachments. + +Required permissions: + - `courses:update` +
+
+#### 🔌 Usage +
-**direction:** `typing.Optional[ListDisputesRequestDirection]` — Sort direction. - -
-
-
-**status:** `typing.Optional[typing.Union[ListDisputesRequestStatusItem, typing.Sequence[ListDisputesRequestStatusItem]]]` — Only disputes in these statuses. Repeat the parameter to pass several — one paginated list covers all of them. Inquiries match only the `warning_` statuses. A `needs_response` dispute whose evidence deadline has passed reports and filters as `under_review` instead. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.course_lessons.update( + id="lesn_xxxxxxxxxxxxx", +) + +``` +
+
+#### ⚙️ Parameters +
-**currency:** `typing.Optional[str]` — Only disputes in this three-letter ISO currency. - -
-
-
-**created_before:** `typing.Optional[str]` — Only disputes opened before this ISO 8601 timestamp. +**id:** `str` — The unique identifier of the lesson to update (e.g., "les_XXXXX").
@@ -17607,7 +17577,7 @@ client.disputes.list()
-**created_after:** `typing.Optional[str]` — Only disputes opened after this ISO 8601 timestamp. +**assessment_completion_requirement:** `typing.Optional[UpdateCourseLessonsRequestAssessmentCompletionRequirement]` — The passing criteria for quiz or knowledge check lessons, such as minimum grade or correct answers.
@@ -17615,7 +17585,7 @@ client.disputes.list()
-**query:** `typing.Optional[str]` — Search disputes by dispute ID, payment ID, user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission. +**assessment_questions:** `typing.Optional[typing.List[UpdateCourseLessonsRequestAssessmentQuestionsItem]]` — The full list of assessment questions for quiz or knowledge check lessons. Replaces all existing questions.
@@ -17623,7 +17593,7 @@ client.disputes.list()
-**include_subaccounts:** `typing.Optional[bool]` — Also cover the account's subaccounts. Requires `account_id`, and is a 400 without it. Without `query`, covers the disputes of the account and every subaccount, in any order. The listing is cut off after 10 seconds; add a `query` to narrow it. With `query`, matches on dispute, payment, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (`424242 4242`); free-text queries such as a name search only the named account. Subaccounts' disputes are returned only for subaccounts you can read disputes on. +**attachments:** `typing.Optional[typing.List[UpdateCourseLessonsRequestAttachmentsItem]]` — File attachments for the lesson such as PDFs or documents. Replaces all existing attachments.
@@ -17631,70 +17601,31 @@ client.disputes.list()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**content:** `typing.Optional[str]` — The Markdown content body of the lesson.
- - - - - - -
- -
client.disputes.summary(...) -> SummaryDisputesResponse -
-
- -#### 📝 Description - -
-
-Totals up the same disputes the list returns, so you can build status tabs and totals without paging through them. -
-
+**days_from_course_start_until_unlock:** `typing.Optional[int]` — The number of days after a student starts the course before this lesson becomes accessible. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.disputes.summary() - -``` -
-
+**embed_id:** `typing.Optional[str]` — The external video identifier for embedded content (e.g., a YouTube video ID or Loom share ID). +
-#### ⚙️ Parameters - -
-
-
-**groups:** `typing.Optional[typing.Union[SummaryDisputesRequestGroupsItem, typing.Sequence[SummaryDisputesRequestGroupsItem]]]` — Which breakdowns to return, keyed by these names under `groups`. Repeat the parameter to ask for several; omit it for all of them. +**embed_type:** `typing.Optional[EmbedTypes]` — The type of video embed for this lesson, such as YouTube or Loom.
@@ -17702,7 +17633,7 @@ client.disputes.summary()
-**account_id:** `typing.Optional[str]` — Only disputes filed against this account (`biz_` tag). Omit it to cover every account you can read. +**lesson_type:** `typing.Optional[LessonTypes]` — The content type of the lesson, such as video, text, quiz, or knowledge check.
@@ -17710,7 +17641,7 @@ client.disputes.summary()
-**status:** `typing.Optional[typing.Union[SummaryDisputesRequestStatusItem, typing.Sequence[SummaryDisputesRequestStatusItem]]]` — Only disputes in these statuses. Repeat the parameter to pass several. A `needs_response` dispute whose evidence deadline has passed reports and filters as `under_review` instead. +**main_pdf:** `typing.Optional[UpdateCourseLessonsRequestMainPdf]` — The primary PDF document attached to this lesson for student reference.
@@ -17718,7 +17649,7 @@ client.disputes.summary()
-**currency:** `typing.Optional[str]` — Only disputes in this three-letter ISO currency. +**max_attempts:** `typing.Optional[int]` — The maximum number of attempts a student is allowed for assessment lessons.
@@ -17726,7 +17657,7 @@ client.disputes.summary()
-**created_before:** `typing.Optional[str]` — Only disputes opened before this ISO 8601 timestamp. +**mux_asset_id:** `typing.Optional[str]` — The identifier of a Mux video asset to attach to this lesson (e.g., "mux_XXXXX").
@@ -17734,7 +17665,7 @@ client.disputes.summary()
-**created_after:** `typing.Optional[str]` — Only disputes opened after this ISO 8601 timestamp. +**thumbnail:** `typing.Optional[UpdateCourseLessonsRequestThumbnail]` — The thumbnail image for the lesson in PNG, JPEG, or GIF format.
@@ -17742,7 +17673,7 @@ client.disputes.summary()
-**query:** `typing.Optional[str]` — Search disputes by dispute ID, payment ID, user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission. +**title:** `typing.Optional[str]` — The display title of the lesson (e.g., "Getting Started with APIs").
@@ -17750,7 +17681,7 @@ client.disputes.summary()
-**include_subaccounts:** `typing.Optional[bool]` — Also cover the account's subaccounts. Requires `account_id`, and is a 400 without it. Without `query`, covers the disputes of the account and every subaccount, in any order. The listing is cut off after 10 seconds; add a `query` to narrow it. With `query`, matches on dispute, payment, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (`424242 4242`); free-text queries such as a name search only the named account. Subaccounts' disputes are returned only for subaccounts you can read disputes on. +**visibility:** `typing.Optional[LessonVisibilities]` — Controls whether this lesson is visible to students or hidden as a draft.
@@ -17770,7 +17701,7 @@ client.disputes.summary()
-
client.disputes.retrieve(...) -> Dispute +
client.course_lessons.mark_as_completed(...) -> bool
@@ -17782,7 +17713,7 @@ client.disputes.summary()
-Retrieves a single dispute. +Mark a lesson as completed for the current user after they finish the content.
@@ -17805,8 +17736,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.disputes.retrieve( - id="id", +client.course_lessons.mark_as_completed( + lesson_id="lesson_id", ) ``` @@ -17823,7 +17754,7 @@ client.disputes.retrieve(
-**id:** `str` — The dispute ID (`dspt_` tag). +**lesson_id:** `str` — The unique identifier of the lesson to mark as completed (e.g., "les_XXXXX").
@@ -17843,7 +17774,7 @@ client.disputes.retrieve(
-
client.disputes.update(...) -> Dispute +
client.course_lessons.start(...) -> bool
@@ -17855,7 +17786,7 @@ client.disputes.retrieve(
-Edits a dispute's evidence while it is still editable. When the evidence is ready, send it to the payment processor with `POST /disputes/:id/submit`. +Record that the current user has started viewing a lesson, creating progress tracking records.
@@ -17878,8 +17809,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.disputes.update( - id="id", +client.course_lessons.start( + lesson_id="lesson_id", ) ``` @@ -17896,15 +17827,7 @@ client.disputes.update(
-**id:** `str` — The dispute ID (`dspt_` tag). - -
-
- -
-
- -**evidence:** `typing.Optional[UpdateDisputesRequestEvidence]` — The evidence packet to send to the processor. Only the fields you provide are changed. +**lesson_id:** `str` — The unique identifier of the lesson the user is starting (e.g., "les_XXXXX").
@@ -17924,7 +17847,7 @@ client.disputes.update(
-
client.disputes.accept(...) -> Dispute +
client.course_lessons.submit_assessment(...) -> SubmitAssessmentCourseLessonsResponse
@@ -17936,7 +17859,7 @@ client.disputes.update(
-Accepts a chargeback, conceding it to the customer instead of contesting it. The payment processor closes the dispute as `lost`. This is final — the dispute cannot be contested afterwards. Only a dispute whose `acceptable` is true can be accepted. +Submit answers for a quiz or knowledge check lesson and receive a graded result.
@@ -17953,14 +17876,20 @@ Accepts a chargeback, conceding it to the customer instead of contesting it. The ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +from whop_sdk.course_lessons import SubmitAssessmentCourseLessonsRequestAnswersItem client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.disputes.accept( - id="id", +client.course_lessons.submit_assessment( + lesson_id="lesson_id", + answers=[ + SubmitAssessmentCourseLessonsRequestAnswersItem( + question_id="question_id", + ) + ], ) ``` @@ -17977,7 +17906,15 @@ client.disputes.accept(
-**id:** `str` — The dispute ID (`dspt_` tag). +**lesson_id:** `str` — The unique identifier of the quiz or knowledge check lesson to submit answers for (e.g., "les_XXXXX"). + +
+
+ +
+
+ +**answers:** `typing.List[SubmitAssessmentCourseLessonsRequestAnswersItem]` — The list of answers to submit for each assessment question.
@@ -17997,7 +17934,8 @@ client.disputes.accept(
-
client.disputes.submit(...) -> Dispute +## CourseStudents +
client.course_students.list(...) -> ListCourseStudentsResponse
@@ -18009,7 +17947,11 @@ client.disputes.accept(
-Sends a dispute's evidence to the payment processor. The packet is checked against the processor's limits first, so a file over a cap is refused here with the file and the limit named. Otherwise the dispute is returned as `generating_response` with its evidence locked and the filing completes in the background: the dispute moves to `under_review` with `evidence_submitted_at` set once the processor accepts it, or back to `needs_response` with `submission_failure_reason` set when the processor refuses it, so it can be fixed and sent again before `evidence_due_at`. Either move is sent as `dispute.updated`. +Returns a paginated list of students enrolled in a course, with optional name filtering. + +Required permissions: + - `courses:read` + - `course_analytics:read`
@@ -18032,8 +17974,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.disputes.submit( - id="id", +client.course_students.list( + first=42, + last=42, + course_id="cors_xxxxxxxxxxxxx", ) ``` @@ -18050,7 +17994,47 @@ client.disputes.submit(
-**id:** `str` — The dispute ID (`dspt_` tag). +**course_id:** `str` — The unique identifier of the course to list enrolled students for. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. + +
+
+ +
+
+ +**keyword:** `typing.Optional[str]` — A search term to filter students by name or username.
@@ -18070,7 +18054,7 @@ client.disputes.submit(
-
client.disputes.upload_evidence(...) -> Dispute +
client.course_students.retrieve(...) -> CourseStudent
@@ -18082,7 +18066,11 @@ client.disputes.submit(
-Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Prefer `PATCH /disputes/:id` with `evidence.documents`, which does the same replace alongside every other evidence field in one call. +Retrieves the details of an existing course student. + +Required permissions: + - `courses:read` + - `course_analytics:read`
@@ -18099,20 +18087,14 @@ Replaces the full set of uploaded evidence documents on a dispute, beyond the fo ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.disputes.upload_evidence( +client.course_students.retrieve( id="id", - documents=[ - UploadEvidenceDisputesRequestDocumentsItem( - document_type="return_policy", - ) - ], ) ``` @@ -18129,15 +18111,7 @@ client.disputes.upload_evidence(
-**id:** `str` — The dispute ID (`dspt_` tag). - -
-
- -
-
- -**documents:** `typing.List[UploadEvidenceDisputesRequestDocumentsItem]` — The full set of evidence documents the dispute should carry, beyond the four fixed evidence slots. Replaces all previously uploaded documents; an empty list removes them all. Send up to 10, 10MB each and 25MB in total. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Policy documents (`return_policy`, `shipping_policy`, `cancellation_policy`, `terms_of_service`) default from the account's own documents; uploading one here replaces the account copy for this dispute, and a `cancellation_policy` or `return_policy` upload also takes precedence over the matching fixed evidence slot. +**id:** `str` — The unique identifier of the course student record to retrieve.
@@ -18157,8 +18131,8 @@ client.disputes.upload_evidence(
-## DmChannels -
client.dm_channels.list(...) -> ListDmChannelsResponse +## Courses +
client.courses.list(...) -> ListCoursesResponse
@@ -18170,10 +18144,10 @@ client.disputes.upload_evidence(
-Lists the authenticated user's DM channels, most recently active first. +Returns a paginated list of the courses in an experience or an account. `hidden` courses are included only for callers with `courses:update`. Required permissions: - - `dms:read` + - `courses:read`
@@ -18196,9 +18170,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_channels.list( +client.courses.list( first=42, last=42, + experience_id="exp_xxxxxxxxxxxxxx", account_id="biz_xxxxxxxxxxxxxx", ) @@ -18248,7 +18223,15 @@ client.dm_channels.list(
-**account_id:** `typing.Optional[str]` — The unique identifier of a company to filter DM channels by. Only returns channels scoped to this company. +**experience_id:** `typing.Optional[str]` — The unique identifier of the experience to list courses for. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The unique identifier of the company to list courses for.
@@ -18268,7 +18251,7 @@ client.dm_channels.list(
-
client.dm_channels.create(...) -> DmChannel +
client.courses.create(...) -> Course
@@ -18280,10 +18263,10 @@ client.dm_channels.list(
-Creates a DM channel between two or more users, optionally scoped to an account. Returns the existing channel if one already exists. +Create a new course within an experience, with optional chapters, lessons, and a certificate. Required permissions: - - `dms:channel:manage` + - `courses:update`
@@ -18306,10 +18289,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_channels.create( - with_user_ids=[ - "with_user_ids" - ], +client.courses.create( + experience_id="exp_xxxxxxxxxxxxxx", + title="title", ) ``` @@ -18326,7 +18308,7 @@ client.dm_channels.create(
-**with_user_ids:** `typing.List[str]` — 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'). +**experience_id:** `str` — The unique identifier of the experience to create the course in (e.g., "exp_XXXXX").
@@ -18334,7 +18316,7 @@ client.dm_channels.create(
-**account_id:** `typing.Optional[str]` — The unique identifier of the company to scope this DM channel to. When set, the channel is visible only within that company context. +**title:** `str` — The display title of the course (e.g., "Introduction to Web Development").
@@ -18342,7 +18324,7 @@ client.dm_channels.create(
-**custom_name:** `typing.Optional[str]` — A custom display name for the DM channel. For example, 'Project Discussion'. +**certificate_after_completion_enabled:** `typing.Optional[bool]` — Whether the course awards students a PDF certificate after completing all lessons.
@@ -18350,7 +18332,7 @@ client.dm_channels.create(
-**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this direct message channel. Webhooks still fire. +**order:** `typing.Optional[str]` — The decimal order position of the course within its experience. Use fractional values (e.g., "1.5") to place between existing courses.
@@ -18358,76 +18340,31 @@ client.dm_channels.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**require_completing_lessons_in_order:** `typing.Optional[bool]` — Whether students must complete each lesson sequentially before advancing to the next one.
- -
- - - -
- -
client.dm_channels.retrieve(...) -> DmChannel
-#### 📝 Description - -
-
- -
-
- -Retrieves the details of an existing DM channel. - -Required permissions (one of): - - `dms:read` - - `support_chat:read` -
-
+**tagline:** `typing.Optional[str]` — A short tagline displayed beneath the course title (e.g., "Master the fundamentals of design"). +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.dm_channels.retrieve( - id="id", -) - -``` -
-
+**thumbnail:** `typing.Optional[CreateCoursesRequestThumbnail]` — The thumbnail image for the course in PNG, JPEG, or GIF format. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The unique identifier of the DM channel to retrieve. +**visibility:** `typing.Optional[CourseVisibilities]` — Controls whether this course is visible to students or hidden as a draft.
@@ -18447,7 +18384,7 @@ client.dm_channels.retrieve(
-
client.dm_channels.delete(...) -> bool +
client.courses.retrieve(...) -> Course
@@ -18459,11 +18396,10 @@ client.dm_channels.retrieve(
-Permanently deletes a DM channel and all of its messages. Only a channel admin can delete it. +Retrieves the details of an existing course. A `hidden` course is returned only to callers with `courses:update`. -Required permissions (one of): - - `dms:channel:manage` - - `support_chat:create` +Required permissions: + - `courses:read`
@@ -18486,8 +18422,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_channels.delete( - id="id", +client.courses.retrieve( + id="cors_xxxxxxxxxxxxx", ) ``` @@ -18504,7 +18440,7 @@ client.dm_channels.delete(
-**id:** `str` — The unique identifier of the DM channel to delete. +**id:** `str` — The unique identifier of the course to retrieve.
@@ -18524,7 +18460,7 @@ client.dm_channels.delete(
-
client.dm_channels.update(...) -> DmChannel +
client.courses.delete(...) -> bool
@@ -18536,11 +18472,10 @@ client.dm_channels.delete(
-Updates a DM channel's settings, such as its display name. Only a channel admin can update it. +Permanently delete a course and all of its chapters, lessons, and student progress. -Required permissions (one of): - - `dms:channel:manage` - - `support_chat:create` +Required permissions: + - `courses:update`
@@ -18563,8 +18498,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_channels.update( - id="id", +client.courses.delete( + id="cors_xxxxxxxxxxxxx", ) ``` @@ -18581,15 +18516,7 @@ client.dm_channels.update(
-**id:** `str` — The unique identifier of the DM channel to update. - -
-
- -
-
- -**custom_name:** `typing.Optional[str]` — A new custom display name for the DM channel. For example, 'Project Discussion'. +**id:** `str` — The unique identifier of the course to delete (e.g., "course_XXXXX").
@@ -18609,8 +18536,7 @@ client.dm_channels.update(
-## DmMembers -
client.dm_members.list(...) -> ListDmMembersResponse +
client.courses.update(...) -> Course
@@ -18622,11 +18548,10 @@ client.dm_channels.update(
-Returns a paginated list of members in a specific DM channel, sorted by the date they were added. +Update a course's title, description, visibility, thumbnail, or chapter ordering. -Required permissions (one of): - - `dms:read` - - `support_chat:read` +Required permissions: + - `courses:update`
@@ -18649,10 +18574,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_members.list( - first=42, - last=42, - channel_id="channel_id", +client.courses.update( + id="cors_xxxxxxxxxxxxx", ) ``` @@ -18669,7 +18592,7 @@ client.dm_members.list(
-**channel_id:** `str` — The unique identifier of the DM channel to list members for. +**id:** `str` — The unique identifier of the course to update (e.g., "course_XXXXX").
@@ -18677,7 +18600,7 @@ client.dm_members.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**certificate_after_completion_enabled:** `typing.Optional[bool]` — Whether the course awards students a PDF certificate after completing all lessons.
@@ -18685,7 +18608,7 @@ client.dm_members.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**chapters:** `typing.Optional[typing.List[UpdateCoursesRequestChaptersItem]]` — A list of chapters with nested lessons to reorder or rename in bulk.
@@ -18693,7 +18616,7 @@ client.dm_members.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**description:** `typing.Optional[str]` — A short description of the course displayed to students on the course page.
@@ -18701,7 +18624,7 @@ client.dm_members.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**language:** `typing.Optional[Languages]` — The primary language spoken in the video content of the course.
@@ -18709,77 +18632,39 @@ client.dm_members.list(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**order:** `typing.Optional[str]` — The decimal order position of the course within its experience. Use fractional values (e.g., "1.5") to place between existing courses.
- -
- - - -
- -
client.dm_members.create(...) -> DmMember
-#### 📝 Description - -
-
+**require_completing_lessons_in_order:** `typing.Optional[bool]` — Whether students must complete each lesson sequentially before advancing to the next one. + +
+
-Add a new user to an existing DM channel. Only an admin of the channel can add members. - -Required permissions (one of): - - `dms:message:manage` - - `support_chat:message:create` -
-
+**tagline:** `typing.Optional[str]` — A short tagline displayed beneath the course title (e.g., "Master the fundamentals of design"). +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.dm_members.create( - channel_id="channel_id", - user_id="user_xxxxxxxxxxxxx", -) - -``` -
-
+**thumbnail:** `typing.Optional[UpdateCoursesRequestThumbnail]` — The thumbnail image for the course in PNG, JPEG, or GIF format. +
-#### ⚙️ Parameters - -
-
-
-**channel_id:** `str` — The unique identifier of the DM channel to add the new member to. +**title:** `typing.Optional[str]` — The display title of the course (e.g., "Introduction to Web Development").
@@ -18787,7 +18672,7 @@ client.dm_members.create(
-**user_id:** `str` — The unique identifier of the user to add to the DM channel. For example, 'user_xxxxx'. +**visibility:** `typing.Optional[CourseVisibilities]` — Controls whether this course is visible to students or hidden as a draft.
@@ -18807,7 +18692,8 @@ client.dm_members.create(
-
client.dm_members.retrieve(...) -> DmMember +## Deposits +
client.deposits.create(...) -> CreateDepositsResponse
@@ -18819,11 +18705,7 @@ client.dm_members.create(
-Retrieves the details of an existing DM member. - -Required permissions (one of): - - `dms:read` - - `support_chat:read` +Returns the deposit methods for an account or user, including crypto addresses, bank transfer instructions, and, for a business, a hosted deposit page. Bitcoin deposits are converted to USDT on Plasma in the destination's wallet. Business destinations require no authentication. Pass `payment_method_id` to also charge a business's saved payment method for `amount` in USD and add it to the business's balance; that requires authentication with the `payment:charge` scope. The charge has no fees or taxes and does not count as revenue.
@@ -18846,8 +18728,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_members.retrieve( - id="id", +client.deposits.create( + destination="biz_xxxxxxxxxxxxxx", ) ``` @@ -18864,7 +18746,7 @@ client.dm_members.retrieve(
-**id:** `str` — The unique identifier of the DM channel member to retrieve. +**destination:** `str` — Account ID to fund, `biz_` or `user_`. Any business resolves without authentication; a user account resolves only for that same authenticated user.
@@ -18872,76 +18754,31 @@ client.dm_members.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**amount:** `typing.Optional[float]` — Amount to prefill on hosted deposit page. Crypto deposits require a $10 minimum. With `payment_method_id`, the amount in USD to charge, and required.
- -
- - - - -
- -
client.dm_members.delete(...) -> bool -
-
- -#### 📝 Description - -
-
-Remove a user from a DM channel. An admin can remove any member, and a member can remove themselves. - -Required permissions (one of): - - `dms:read` - - `support_chat:read` -
-
+**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[CreateDepositsRequestMetadataValue]]]` — Custom metadata to attach to the payment the charge creates. Ignored unless `payment_method_id` is provided. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.dm_members.delete( - id="id", -) - -``` -
-
+**origin_bic:** `typing.Optional[str]` — SWIFT/BIC of the bank the funds are sent from, 8 or 11 characters. Fills each bank currency's `swift_bic` with the intermediary bank to route the wire through. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` — The unique identifier of the DM channel member to remove. +**payment_method_id:** `typing.Optional[str]` — A saved payment method of the business to charge for `amount`, prefixed `payt_`. Save one with Create setup intent and `owner_id` set to the account. Only for a `biz_` destination, and requires authentication with the `payment:charge` scope. A declined charge fails the request with 400.
@@ -18961,7 +18798,7 @@ client.dm_members.delete(
-
client.dm_members.update(...) -> DmMember +
client.deposits.reverse(...) -> LedgerActivity
@@ -18973,11 +18810,10 @@ client.dm_members.delete(
-Update a DM channel member's settings, such as their notification preferences or membership status. +Sends a deposit back where it came from. If the available balance doesn't cover it, nothing is sent. -Required permissions (one of): - - `dms:read` - - `support_chat:read` +- **Bank deposit:** pass its `vbt_` ID. The deposit fee is returned, so the balance only has to cover the rest. Returns a `topup_reversal` row. +- **Card deposit:** pass its `pay_` ID. It's refunded to the card, and its fees aren't returned. Returns a `payment_refund` row.
@@ -19000,8 +18836,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.dm_members.update( - id="id", +client.deposits.reverse( + id="vbt_xxxxxxxxxxxxxx", ) ``` @@ -19018,7 +18854,7 @@ client.dm_members.update(
-**id:** `str` — The unique identifier of the DM channel member to update. +**id:** `str` — A bank deposit ID, prefixed `vbt_`, or a card deposit's payment ID, prefixed `pay_`.
@@ -19026,7 +18862,7 @@ client.dm_members.update(
-**notification_preference:** `typing.Optional[DmsFeedMemberNotificationPreferences]` — The notification setting for this member, controlling how they receive alerts for new messages in this channel. +**account_id:** `typing.Optional[str]` — The business that received the deposit, prefixed `biz_`. Pass this or `user_id`.
@@ -19034,7 +18870,15 @@ client.dm_members.update(
-**status:** `typing.Optional[DmsFeedMemberStatuses]` — The membership status for this member in the DM channel. +**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[ReverseDepositsRequestMetadataValue]]]` — Custom metadata to store with the reversal. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — The user that received the deposit, prefixed `user_`. Pass this or `account_id`.
@@ -19054,8 +18898,8 @@ client.dm_members.update(
-## Domains -
client.domains.list(...) -> ListDomainsResponse +## Dispute alerts +
client.dispute_alerts.list(...) -> ListDisputeAlertsResponse
@@ -19067,9 +18911,7 @@ client.dm_members.update(
-Lists your domains. Filter by account, app, status, hostname, or the state of a capability. - -Pass `search` to find domains to buy instead: the exact domain first, even when taken, then your name on popular extensions, then suggestions. Pass `tlds` to check only the extensions you choose. Results aren't reserved. +Lists the dispute alerts and early fraud warnings across the accounts you can read.
@@ -19092,11 +18934,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.domains.list( - tlds=[ - "com" - ], -) +client.dispute_alerts.list() ``` @@ -19112,7 +18950,7 @@ client.domains.list(
-**account_id:** `typing.Optional[str]` — Only domains belonging to this account, prefixed biz_. +**account_id:** `typing.Optional[str]` — Only alerts on this account's payments (`biz_` tag). Omit it to cover every account you can read.
@@ -19120,7 +18958,7 @@ client.domains.list(
-**app_id:** `typing.Optional[str]` — Only domains whose website serves this app, prefixed app_. +**payment_id:** `typing.Optional[str]` — Only alerts on this payment (`pay_` tag). A payment can carry several.
@@ -19128,7 +18966,7 @@ client.domains.list(
-**status:** `typing.Optional[ListDomainsRequestStatus]` — Only domains with this status: the most pressing state of their capabilities, or `idle` when they want nothing. +**type:** `typing.Optional[ListDisputeAlertsRequestType]` — Only alerts of this kind. `early_fraud_warning` for issuer fraud reports, `dispute_alert` for pre-dispute notices, `rapid_dispute_resolution` for Visa RDR cases the network already closed.
@@ -19136,7 +18974,7 @@ client.domains.list(
-**order:** `typing.Optional[ListDomainsRequestOrder]` — Field to sort by. Domains with the same value keep their creation order in the same direction. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -19144,7 +18982,7 @@ client.domains.list(
-**direction:** `typing.Optional[ListDomainsRequestDirection]` — Sort direction. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -19152,7 +18990,7 @@ client.domains.list(
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -19160,7 +18998,7 @@ client.domains.list(
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -19168,7 +19006,7 @@ client.domains.list(
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**order:** `typing.Optional[ListDisputeAlertsRequestOrder]` — The field to sort alerts by.
@@ -19176,7 +19014,7 @@ client.domains.list(
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**direction:** `typing.Optional[ListDisputeAlertsRequestDirection]` — Sort direction.
@@ -19184,7 +19022,7 @@ client.domains.list(
-**search:** `typing.Optional[str]` — A name or domain to find domains to buy, such as `example` or `example.com`; a subdomain or URL searches its registrable domain. Returns domains with `availability` instead of your domains, without other filters or pagination. +**created_before:** `typing.Optional[str]` — Only alerts Whop received before this ISO 8601 timestamp.
@@ -19192,7 +19030,7 @@ client.domains.list(
-**tlds:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — With `search`, check only these extensions, such as `com` or `co.uk`, returned in this order. Repeat for several, up to 100. +**created_after:** `typing.Optional[str]` — Only alerts Whop received after this ISO 8601 timestamp.
@@ -19200,79 +19038,72 @@ client.domains.list(
-**domain:** `typing.Optional[str]` — Only your domain with this hostname, such as `example.com`. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**verification:** `typing.Optional[ListDomainsRequestVerification]` — Only domains with verification in this state, such as `ready`, or `any` for every domain that has verification. -
-
-
-**registration:** `typing.Optional[ListDomainsRequestRegistration]` — Only domains with registration in this state, such as `ready`, or `any` for every domain that has registration. -
+
+
client.dispute_alerts.retrieve(...) -> DisputeAlert
-**platform:** `typing.Optional[ListDomainsRequestPlatform]` — Only domains with platform in this state, such as `ready`, or `any` for every domain that has platform. - -
-
+#### 📝 Description
-**subdomain:** `typing.Optional[ListDomainsRequestSubdomain]` — Only domains with subdomain in this state, such as `ready`, or `any` for every domain that has subdomain. - -
-
-
-**website:** `typing.Optional[ListDomainsRequestWebsite]` — Only domains with website in this state, such as `ready`, or `any` for every domain that has website. - +Retrieves a single dispute alert or early fraud warning by ID.
+ + + +#### 🔌 Usage
-**apple_pay:** `typing.Optional[ListDomainsRequestApplePay]` — Only domains with apple_pay in this state, such as `ready`, or `any` for every domain that has apple_pay. - -
-
-
-**pixel:** `typing.Optional[ListDomainsRequestPixel]` — Only domains with pixel in this state, such as `ready`, or `any` for every domain that has pixel. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.dispute_alerts.retrieve( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**email:** `typing.Optional[ListDomainsRequestEmail]` — Only domains with email in this state, such as `ready`, or `any` for every domain that has email. - -
-
-
-**transfer:** `typing.Optional[ListDomainsRequestTransfer]` — Only domains with transfer in this state, such as `ready`, or `any` for every domain that has transfer. +**id:** `str` — The dispute alert ID, prefixed `dspa_`.
@@ -19292,7 +19123,8 @@ client.domains.list(
-
client.domains.create(...) -> Domain +## Disputes +
client.disputes.list(...) -> ListDisputesResponse
@@ -19304,15 +19136,7 @@ client.domains.list(
-Adds a domain to your account with the capabilities you want. - -Pass `registration` to buy the domain through Whop; it's the default when you pass no capability. Pay its `amount_due` at `purchase_url`, or pass `registration.payment_method_id` to charge a saved card. Whop then registers it, runs its DNS, and renews it every year while `auto_renew` is on. - -Pass `registration.auth_code` to transfer in a domain you own at another registrar. The transfer starts once its `amount_due` is paid, or at once when `amount_due` is `null`. While `registration.phase` is `transferring`, its `issues` say what the transfer needs from you. - -Pass `verification` to connect a domain you registered elsewhere: its `issues` list the TXT and routing records to publish. A subdomain of a domain this account bought through Whop takes `subdomain` by default, and Whop publishes its DNS records itself. Pass `website` with an `app_id` to serve that app on the domain. - -To change a domain you already have, update it instead. Adding a domain this account deleted revives it under its original ID. +Lists the disputes across the accounts you can read.
@@ -19335,9 +19159,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.domains.create( - domain="www.bought.com", -) +client.disputes.list() ``` @@ -19353,7 +19175,7 @@ client.domains.create(
-**domain:** `str` — Bare hostname, such as example.com or checkout.example.com. A bought domain must be a root domain. Wildcards, paths, schemes, and ports are not accepted. +**account_id:** `typing.Optional[str]` — Only disputes filed against this account (`biz_` tag). Omit it to cover every account you can read.
@@ -19361,7 +19183,7 @@ client.domains.create(
-**account_id:** `typing.Optional[str]` — Account ID, prefixed biz_. Required for user credentials; otherwise defaults to the credential's account. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -19369,7 +19191,7 @@ client.domains.create(
-**apple_pay:** `typing.Optional[CreateDomainsRequestApplePay]` — Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -19377,7 +19199,7 @@ client.domains.create(
-**email:** `typing.Optional[CreateDomainsRequestEmail]` — Send and receive email on the domain. It needs `registration` or `subdomain`, so only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -19385,7 +19207,7 @@ client.domains.create(
-**metadata:** `typing.Optional[typing.Dict[str, str]]` — Custom string keys and values. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -19393,7 +19215,7 @@ client.domains.create(
-**pixel:** `typing.Optional[CreateDomainsRequestPixel]` — Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking. +**order:** `typing.Optional[ListDisputesRequestOrder]` — The field to sort disputes by.
@@ -19401,7 +19223,7 @@ client.domains.create(
-**registration:** `typing.Optional[CreateDomainsRequestRegistration]` — Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it. +**direction:** `typing.Optional[ListDisputesRequestDirection]` — Sort direction.
@@ -19409,7 +19231,7 @@ client.domains.create(
-**subdomain:** `typing.Optional[CreateDomainsRequestSubdomain]` — Use a subdomain of a domain this account bought through Whop, such as shop.example.com under example.com. It's the default when you add such a subdomain without a capability. Whop publishes its DNS records in the root domain's zone, so it needs nothing from you: it stays `pending` until the root domain is set up, then turns `ready`. Whop releases it, and its website, when the account no longer holds the root domain, and deletes it when the root domain leaves the account. Pass `null` to release it. Can't be combined with `verification` or `registration`. +**status:** `typing.Optional[typing.Union[ListDisputesRequestStatusItem, typing.Sequence[ListDisputesRequestStatusItem]]]` — Only disputes in these statuses. Repeat the parameter to pass several — one paginated list covers all of them. Inquiries match only the `warning_` statuses. A `needs_response` dispute whose evidence deadline has passed reports and filters as `under_review` instead.
@@ -19417,7 +19239,7 @@ client.domains.create(
-**transfer:** `typing.Optional[CreateDomainsRequestTransfer]` — Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. +**currency:** `typing.Optional[str]` — Only disputes in this three-letter ISO currency.
@@ -19425,7 +19247,7 @@ client.domains.create(
-**verification:** `typing.Optional[CreateDomainsRequestVerification]` — Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`. +**created_before:** `typing.Optional[str]` — Only disputes opened before this ISO 8601 timestamp.
@@ -19433,7 +19255,23 @@ client.domains.create(
-**website:** `typing.Optional[CreateDomainsRequestWebsite]` — Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities. +**created_after:** `typing.Optional[str]` — Only disputes opened after this ISO 8601 timestamp. + +
+
+ +
+
+ +**query:** `typing.Optional[str]` — Search disputes by dispute ID, payment ID, user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission. + +
+
+ +
+
+ +**include_subaccounts:** `typing.Optional[bool]` — Also cover the account's subaccounts. Requires `account_id`, and is a 400 without it. Without `query`, covers the disputes of the account and every subaccount, in any order. The listing is cut off after 10 seconds; add a `query` to narrow it. With `query`, matches on dispute, payment, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (`424242 4242`); free-text queries such as a name search only the named account. Subaccounts' disputes are returned only for subaccounts you can read disputes on.
@@ -19453,7 +19291,7 @@ client.domains.create(
-
client.domains.retrieve(...) -> Domain +
client.disputes.summary(...) -> SummaryDisputesResponse
@@ -19465,9 +19303,7 @@ client.domains.create(
-Retrieves a domain by ID or hostname. Both return the same domain, shown as fully as you can see it: everything for your own accounts, and only who has it and what it serves for anyone else. - -A hostname no domain on Whop has comes back with its `availability` instead. +Totals up the same disputes the list returns, so you can build status tabs and totals without paging through them.
@@ -19490,9 +19326,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.domains.retrieve( - id="id", -) +client.disputes.summary() ``` @@ -19508,7 +19342,7 @@ client.domains.retrieve(
-**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`. +**groups:** `typing.Optional[typing.Union[SummaryDisputesRequestGroupsItem, typing.Sequence[SummaryDisputesRequestGroupsItem]]]` — Which breakdowns to return, keyed by these names under `groups`. Repeat the parameter to ask for several; omit it for all of them.
@@ -19516,72 +19350,55 @@ client.domains.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**account_id:** `typing.Optional[str]` — Only disputes filed against this account (`biz_` tag). Omit it to cover every account you can read.
- -
+
+
+**status:** `typing.Optional[typing.Union[SummaryDisputesRequestStatusItem, typing.Sequence[SummaryDisputesRequestStatusItem]]]` — Only disputes in these statuses. Repeat the parameter to pass several. A `needs_response` dispute whose evidence deadline has passed reports and filters as `under_review` instead. +
-
-
client.domains.delete(...) -> Domain
-#### 📝 Description - -
-
+**currency:** `typing.Optional[str]` — Only disputes in this three-letter ISO currency. + +
+
-Removes the domain from your account and releases its capabilities in the background. Deleting an unpaid purchase cancels it, and deleting a transfer cancels it and refunds it while the current registrar can still stop it. A registered domain can't be deleted; turn off `auto_renew` and it's released after it expires. Adding the domain to this account again revives it under the same ID. -
-
+**created_before:** `typing.Optional[str]` — Only disputes opened before this ISO 8601 timestamp. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.domains.delete( - id="id", -) - -``` -
-
+**created_after:** `typing.Optional[str]` — Only disputes opened after this ISO 8601 timestamp. +
-#### ⚙️ Parameters -
+**query:** `typing.Optional[str]` — Search disputes by dispute ID, payment ID, user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission. + +
+
+
-**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`. +**include_subaccounts:** `typing.Optional[bool]` — Also cover the account's subaccounts. Requires `account_id`, and is a 400 without it. Without `query`, covers the disputes of the account and every subaccount, in any order. The listing is cut off after 10 seconds; add a `query` to narrow it. With `query`, matches on dispute, payment, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (`424242 4242`); free-text queries such as a name search only the named account. Subaccounts' disputes are returned only for subaccounts you can read disputes on.
@@ -19601,7 +19418,7 @@ client.domains.delete(
-
client.domains.update(...) -> Domain +
client.disputes.retrieve(...) -> Dispute
@@ -19613,7 +19430,7 @@ client.domains.delete(
-Changes a domain's capabilities or metadata. Pass a capability to add it or change its settings, or `null` to release it; capabilities you leave out don't change. Passing a capability that needs action again retries it. Releasing every capability keeps the domain, `idle`; delete it to remove it. +Retrieves a single dispute.
@@ -19636,7 +19453,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.domains.update( +client.disputes.retrieve( id="id", ) @@ -19654,7 +19471,7 @@ client.domains.update(
-**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`. +**id:** `str` — The dispute ID (`dspt_` tag).
@@ -19662,63 +19479,72 @@ client.domains.update(
-**apple_pay:** `typing.Optional[UpdateDomainsRequestApplePay]` — Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**email:** `typing.Optional[UpdateDomainsRequestEmail]` — Send and receive email on the domain. It needs `registration` or `subdomain`, so only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email. -
+
+
client.disputes.update(...) -> Dispute
-**metadata:** `typing.Optional[typing.Dict[str, str]]` — Replacement custom string keys and values. - -
-
+#### 📝 Description
-**pixel:** `typing.Optional[UpdateDomainsRequestPixel]` — Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking. - -
-
-
-**registration:** `typing.Optional[UpdateDomainsRequestRegistration]` — Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it. - +Edits a dispute's evidence while it is still editable. When the evidence is ready, send it to the payment processor with `POST /disputes/:id/submit`. +
+
+#### 🔌 Usage +
-**subdomain:** `typing.Optional[UpdateDomainsRequestSubdomain]` — Use a subdomain of a domain this account bought through Whop, such as shop.example.com under example.com. It's the default when you add such a subdomain without a capability. Whop publishes its DNS records in the root domain's zone, so it needs nothing from you: it stays `pending` until the root domain is set up, then turns `ready`. Whop releases it, and its website, when the account no longer holds the root domain, and deletes it when the root domain leaves the account. Pass `null` to release it. Can't be combined with `verification` or `registration`. - -
-
-
-**transfer:** `typing.Optional[UpdateDomainsRequestTransfer]` — Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.disputes.update( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**verification:** `typing.Optional[UpdateDomainsRequestVerification]` — Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`. +
+
+ +**id:** `str` — The dispute ID (`dspt_` tag).
@@ -19726,7 +19552,7 @@ client.domains.update(
-**website:** `typing.Optional[UpdateDomainsRequestWebsite]` — Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities. +**evidence:** `typing.Optional[UpdateDisputesRequestEvidence]` — The evidence packet to send to the processor. Only the fields you provide are changed.
@@ -19746,7 +19572,7 @@ client.domains.update(
-
client.domains.check(...) -> Domain +
client.disputes.accept(...) -> Dispute
@@ -19758,7 +19584,7 @@ client.domains.update(
-Checks the domain's DNS, payment, and provider state again now instead of at its next scheduled check. Returns the domain as saved; retrieve it again to see the result. +Accepts a chargeback, conceding it to the customer instead of contesting it. The payment processor closes the dispute as `lost`. This is final — the dispute cannot be contested afterwards. Only a dispute whose `acceptable` is true can be accepted.
@@ -19781,7 +19607,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.domains.check( +client.disputes.accept( id="id", ) @@ -19799,7 +19625,7 @@ client.domains.check(
-**id:** `str` — Domain ID, prefixed `dom_`. +**id:** `str` — The dispute ID (`dspt_` tag).
@@ -19819,8 +19645,7 @@ client.domains.check(
-## Economic Intelligence -
client.economic_intelligence.list(...) -> ListEconomicIntelligenceResponse +
client.disputes.submit(...) -> Dispute
@@ -19832,7 +19657,7 @@ client.domains.check(
-Lists an account's recommendations and generation requests, newest first by default. When no recommendations are ready or in progress and you have `company:update` permission, listing queues generation, with a ten-minute cooldown after an unsuccessful request; unsuccessful requests are not listed. An account's executed recommendations and runs stay listed after Economic Intelligence turns off, but new recommendations are offered only while it is on. For visitor countries, page views, ad impressions and clicks, or payment volume over a time range, use `GET /stats/time_series/:metric`. +Sends a dispute's evidence to the payment processor. The packet is checked against the processor's limits first, so a file over a cap is refused here with the file and the limit named. Otherwise the dispute is returned as `generating_response` with its evidence locked and the filing completes in the background: the dispute moves to `under_review` with `evidence_submitted_at` set once the processor accepts it, or back to `needs_response` with `submission_failure_reason` set when the processor refuses it, so it can be fixed and sent again before `evidence_due_at`. Either move is sent as `dispute.updated`.
@@ -19855,7 +19680,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.economic_intelligence.list() +client.disputes.submit( + id="id", +) ``` @@ -19871,7 +19698,7 @@ client.economic_intelligence.list()
-**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the API key's own account; omit for personal onboarding, where signed-out visitors receive a business-setup template and eligible users receive their saved setup recommendation. +**id:** `str` — The dispute ID (`dspt_` tag).
@@ -19879,63 +19706,78 @@ client.economic_intelligence.list()
-**status:** `typing.Optional[ListEconomicIntelligenceRequestStatus]` — Filter recommendations by their current status. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**input:** `typing.Optional[str]` — What you want recommendations for, in your own words. Up to 1000 characters. Narrows the list to the recommendations that address it. Without a `status` filter, when none do and you can update the account, new recommendations start generating for your input, and the list shows that request until they're ready. Repeating the same input while it generates doesn't start another. -
+
+
client.disputes.upload_evidence(...) -> Dispute
-**has_run:** `typing.Optional[bool]` — When true, only recommendations someone has started running, by any user. Without `account_id`, covers every account you can read that has Economic Intelligence. Can't be combined with `input`. - -
-
+#### 📝 Description
-**order:** `typing.Optional[ListEconomicIntelligenceRequestOrder]` — Sort field. - -
-
-
-**direction:** `typing.Optional[ListEconomicIntelligenceRequestDirection]` — Sort direction. - +Replaces the full set of uploaded evidence documents on a dispute, beyond the four fixed evidence slots. Prefer `PATCH /disputes/:id` with `evidence.documents`, which does the same replace alongside every other evidence field in one call. +
+
+#### 🔌 Usage +
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. - -
-
-
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.disputes.upload_evidence( + id="id", + documents=[ + UploadEvidenceDisputesRequestDocumentsItem( + document_type="return_policy", + ) + ], +) + +``` +
+
+#### ⚙️ Parameters +
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +
+
+ +**id:** `str` — The dispute ID (`dspt_` tag).
@@ -19943,7 +19785,7 @@ client.economic_intelligence.list()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**documents:** `typing.List[UploadEvidenceDisputesRequestDocumentsItem]` — The full set of evidence documents the dispute should carry, beyond the four fixed evidence slots. Replaces all previously uploaded documents; an empty list removes them all. Send up to 10, 10MB each and 25MB in total. Accepted content types: application/pdf, application/json, image/jpeg, image/png, image/webp — any other type is rejected. Upload files through `POST /files` and reference them by `id`, or send the files as multipart file parts to upload and attach in one call. Policy documents (`return_policy`, `shipping_policy`, `cancellation_policy`, `terms_of_service`) default from the account's own documents; uploading one here replaces the account copy for this dispute, and a `cancellation_policy` or `return_policy` upload also takes precedence over the matching fixed evidence slot.
@@ -19963,7 +19805,8 @@ client.economic_intelligence.list()
-
client.economic_intelligence.update(...) -> EconomicIntelligence +## DmChannels +
client.dm_channels.list(...) -> ListDmChannelsResponse
@@ -19975,7 +19818,10 @@ client.economic_intelligence.list()
-Updates a recommendation status, records feedback, or both. Send `sentiment` to rate it. Include `status: superseded` to retire a ready recommendation and request replacements; a rating alone leaves its status unchanged. To run a recommendation yourself, send `status: running` to start, then `status: executed` when it is carried out (with `result_id` naming what it changed, or `result_page` naming where it worked, so the result links there) or `status: incomplete` if the run ended without carrying it out. Whop AI reports its own runs the same way. Send `status: acknowledged` once an executed run's result has been seen. +Lists the authenticated user's DM channels, most recently active first. + +Required permissions: + - `dms:read`
@@ -19998,8 +19844,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.economic_intelligence.update( - id="id", +client.dm_channels.list( + first=42, + last=42, + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -20016,39 +19864,7 @@ client.economic_intelligence.update(
-**id:** `str` — Recommendation ID, prefixed `reca_`. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the API key's own account. - -
-
- -
-
- -**input:** `typing.Optional[str]` — What you want the replacement recommendation for, in your own words. Up to 1000 characters. Sent when superseding, it directs the generation that replaces the rejected recommendation. - -
-
- -
-
- -**result_id:** `typing.Optional[str]` — With `status: executed`, the ID of what the run produced or changed, and the recommendation's `result_url` becomes where to view it: an ad (`ad_`), ad group (`adgrp_`) or ad campaign (`adcamp_`), a website (`app_`), a product (`prod_`), a plan (`plan_`), a checkout link (`ch_`), a promo code (`promo_`), or an experience (`exp_`). Without `result_id` or `result_page`, `result_url` links to the resource the recommendation was about, when it names one. Send only one of `result_id`, `result_page` and `result_url`. - -
-
- -
-
- -**result_page:** `typing.Optional[UpdateEconomicIntelligenceRequestResultPage]` — With `status: executed`, the page where the run's result can be seen when it is not one resource, such as the checkout links list or the store page. The recommendation's `result_url` becomes that page on the account's dashboard, or its store page for `store_page`. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -20056,7 +19872,7 @@ client.economic_intelligence.update(
-**result_url:** `typing.Optional[str]` — With `status: executed`, where to view what was produced when it is outside Whop. An http or https URL. Prefer `result_id` for anything on Whop. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -20064,7 +19880,7 @@ client.economic_intelligence.update(
-**sentiment:** `typing.Optional[UpdateEconomicIntelligenceRequestSentiment]` — A signed-in user can rate a recommendation as `positive` or `negative`. Can be sent alone or together with status. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -20072,7 +19888,7 @@ client.economic_intelligence.update(
-**status:** `typing.Optional[UpdateEconomicIntelligenceRequestStatus]` — Use `running` to start a run of a ready recommendation, `executed` to record that it was carried out, `incomplete` to record that a running recommendation's run ended without carrying it out, `superseded` to reject a ready recommendation, or `acknowledged` to mark an executed run as seen; the recommendation stays `executed` and records `acknowledged_at`. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -20080,7 +19896,7 @@ client.economic_intelligence.update(
-**user_feedback:** `typing.Optional[str]` — An optional explanation of the rating or rejection. Negative feedback informs replacement recommendations. +**account_id:** `typing.Optional[str]` — The unique identifier of a company to filter DM channels by. Only returns channels scoped to this company.
@@ -20100,8 +19916,7 @@ client.economic_intelligence.update(
-## Email addresses -
client.email_addresses.list(...) -> ListEmailAddressesResponse +
client.dm_channels.create(...) -> DmChannel
@@ -20113,7 +19928,10 @@ client.economic_intelligence.update(
-Lists the email addresses of the accounts you can read, and the mailboxes you own. A password is included only for mailboxes you can use. +Creates a DM channel between two or more users, optionally scoped to an account. Returns the existing channel if one already exists. + +Required permissions: + - `dms:channel:manage`
@@ -20136,7 +19954,11 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.list() +client.dm_channels.create( + with_user_ids=[ + "with_user_ids" + ], +) ``` @@ -20152,31 +19974,7 @@ client.email_addresses.list()
-**account_id:** `typing.Optional[str]` — Only addresses belonging to this account, prefixed biz_. - -
-
- -
-
- -**order:** `typing.Optional[ListEmailAddressesRequestOrder]` — Field to sort by. - -
-
- -
-
- -**direction:** `typing.Optional[ListEmailAddressesRequestDirection]` — Sort direction. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**with_user_ids:** `typing.List[str]` — 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').
@@ -20184,7 +19982,7 @@ client.email_addresses.list()
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**account_id:** `typing.Optional[str]` — The unique identifier of the company to scope this DM channel to. When set, the channel is visible only within that company context.
@@ -20192,7 +19990,7 @@ client.email_addresses.list()
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**custom_name:** `typing.Optional[str]` — A custom display name for the DM channel. For example, 'Project Discussion'.
@@ -20200,7 +19998,7 @@ client.email_addresses.list()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this direct message channel. Webhooks still fire.
@@ -20220,7 +20018,7 @@ client.email_addresses.list()
-
client.email_addresses.create(...) -> EmailAddress +
client.dm_channels.retrieve(...) -> DmChannel
@@ -20232,7 +20030,11 @@ client.email_addresses.list()
-Creates a mailbox on one of the account's domains. The domain needs the `email` capability turned on. The address can be created and signed in to while email is still setting up, and it can send once email is `ready`. Give it to a team member with `user_id`, or leave it out to share the mailbox with the account. Creating an address this account deleted brings the mailbox back, with its mail and a new password. +Retrieves the details of an existing DM channel. + +Required permissions (one of): + - `dms:read` + - `support_chat:read`
@@ -20255,8 +20057,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.create( - address="marcus@shinetime.example", +client.dm_channels.retrieve( + id="id", ) ``` @@ -20273,23 +20075,7 @@ client.email_addresses.create(
-**address:** `str` — The full address, such as support@example.com. The part before the @ can use letters, numbers, dots, dashes, underscores and plus signs. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — Account ID, prefixed biz_. Required for user credentials; otherwise defaults to the credential's account. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — ID of the team member who owns the mailbox, prefixed `user_`. Only they can read it or send from it. Leave it out, or pass `null`, to share the mailbox with the account. Giving an owned mailbox to someone else empties it: the owner's mail is never shown to anyone else. +**id:** `str` — The unique identifier of the DM channel to retrieve.
@@ -20309,7 +20095,7 @@ client.email_addresses.create(
-
client.email_addresses.retrieve(...) -> EmailAddress +
client.dm_channels.delete(...) -> bool
@@ -20321,7 +20107,11 @@ client.email_addresses.create(
-Retrieves an email address. Its owner can always retrieve it; anyone else needs `email:read`. The password is included only if you can use the mailbox. +Permanently deletes a DM channel and all of its messages. Only a channel admin can delete it. + +Required permissions (one of): + - `dms:channel:manage` + - `support_chat:create`
@@ -20344,7 +20134,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.retrieve( +client.dm_channels.delete( id="id", ) @@ -20362,7 +20152,7 @@ client.email_addresses.retrieve(
-**id:** `str` — Email address ID, prefixed `emaddr_`. +**id:** `str` — The unique identifier of the DM channel to delete.
@@ -20382,7 +20172,7 @@ client.email_addresses.retrieve(
-
client.email_addresses.delete(...) -> EmailAddress +
client.dm_channels.update(...) -> DmChannel
@@ -20394,7 +20184,11 @@ client.email_addresses.retrieve(
-Deletes the address. Mail apps signed in to it lose access, and mail sent to it is no longer received. Its mail is kept, and creating the address again in this account brings the mailbox back. +Updates a DM channel's settings, such as its display name. Only a channel admin can update it. + +Required permissions (one of): + - `dms:channel:manage` + - `support_chat:create`
@@ -20417,7 +20211,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.delete( +client.dm_channels.update( id="id", ) @@ -20435,7 +20229,15 @@ client.email_addresses.delete(
-**id:** `str` — Email address ID, prefixed `emaddr_`. +**id:** `str` — The unique identifier of the DM channel to update. + +
+
+ +
+
+ +**custom_name:** `typing.Optional[str]` — A new custom display name for the DM channel. For example, 'Project Discussion'.
@@ -20455,7 +20257,8 @@ client.email_addresses.delete(
-
client.email_addresses.update(...) -> EmailAddress +## DmMembers +
client.dm_members.list(...) -> ListDmMembersResponse
@@ -20467,7 +20270,11 @@ client.email_addresses.delete(
-Gives the mailbox to a team member, or shares it with the account, under a new password. A mailbox that had an owner starts empty, because its earlier mail is private to that owner; mail apps sync it again from the start. +Returns a paginated list of members in a specific DM channel, sorted by the date they were added. + +Required permissions (one of): + - `dms:read` + - `support_chat:read`
@@ -20490,8 +20297,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.update( - id="id", +client.dm_members.list( + first=42, + last=42, + channel_id="channel_id", ) ``` @@ -20508,7 +20317,7 @@ client.email_addresses.update(
-**id:** `str` — Email address ID, prefixed `emaddr_`. +**channel_id:** `str` — The unique identifier of the DM channel to list members for.
@@ -20516,7 +20325,7 @@ client.email_addresses.update(
-**user_id:** `typing.Optional[str]` — ID of the team member who owns the mailbox, prefixed `user_`. Only they can read it or send from it. Leave it out, or pass `null`, to share the mailbox with the account. Giving an owned mailbox to someone else empties it: the owner's mail is never shown to anyone else. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -20524,72 +20333,23 @@ client.email_addresses.update(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
- -
- - - - -
- -
client.email_addresses.mobileconfig(...) -> typing.Iterator[bytes] -
-
- -#### 📝 Description - -
-
- -
-
- -Downloads an Apple configuration profile that adds the mailbox to Mail on a Mac, iPhone or iPad, signed in and ready to send. Only the owner can download it for an owned mailbox; a shared one needs `email:read` and `email:send`. -
-
-
-
- -#### 🔌 Usage - -
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.email_addresses.mobileconfig( - id="id", -) - -``` -
-
+**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` — Email address ID, prefixed `emaddr_`. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -20609,7 +20369,7 @@ client.email_addresses.mobileconfig(
-
client.email_addresses.reset_password(...) -> EmailAddress +
client.dm_members.create(...) -> DmMember
@@ -20621,7 +20381,11 @@ client.email_addresses.mobileconfig(
-Gives the mailbox a new password. Every mail app signed in with the old one loses access. Only the owner can reset an owned mailbox; a shared one needs `email:read` and `email:send`. +Add a new user to an existing DM channel. Only an admin of the channel can add members. + +Required permissions (one of): + - `dms:message:manage` + - `support_chat:message:create`
@@ -20644,8 +20408,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.email_addresses.reset_password( - id="id", +client.dm_members.create( + channel_id="channel_id", + user_id="user_xxxxxxxxxxxxx", ) ``` @@ -20662,7 +20427,15 @@ client.email_addresses.reset_password(
-**id:** `str` — Email address ID, prefixed `emaddr_`. +**channel_id:** `str` — The unique identifier of the DM channel to add the new member to. + +
+
+ +
+
+ +**user_id:** `str` — The unique identifier of the user to add to the DM channel. For example, 'user_xxxxx'.
@@ -20682,8 +20455,7 @@ client.email_addresses.reset_password(
-## Events -
client.events.list(...) -> ListEventsResponse +
client.dm_members.retrieve(...) -> DmMember
@@ -20695,7 +20467,11 @@ client.email_addresses.reset_password(
-Lists identity-linked events, most recent first by default. Pass `identifier` for one person's journey, or omit it to list an account's events within a time range. Events have the same shape as the `POST /events` intake: attribution in `context`, identity in `user`. +Retrieves the details of an existing DM member. + +Required permissions (one of): + - `dms:read` + - `support_chat:read`
@@ -20718,7 +20494,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.events.list() +client.dm_members.retrieve( + id="id", +) ``` @@ -20734,7 +20512,7 @@ client.events.list()
-**identifier:** `typing.Optional[str]` — Any hard identifier of the person: a person ID (prsn_*), user ID, email, phone number, or a tracking cookie value (wuid, anonymous ID, fbp/fbc/ttp/ga). Omit to list recent events for the account. +**id:** `str` — The unique identifier of the DM channel member to retrieve.
@@ -20742,71 +20520,76 @@ client.events.list()
-**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Optional for account API keys; required for credentials that can access multiple accounts. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**from:** `typing.Optional[datetime.datetime]` — Start of the time range as an ISO 8601 timestamp. Required when identifier is omitted. -
+
+
client.dm_members.delete(...) -> bool
-**to:** `typing.Optional[datetime.datetime]` — End of the time range as an ISO 8601 timestamp. Required when identifier is omitted; otherwise defaults to now. - -
-
+#### 📝 Description
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. - -
-
-
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. - +Remove a user from a DM channel. An admin can remove any member, and a member can remove themselves. + +Required permissions (one of): + - `dms:read` + - `support_chat:read` +
+
+#### 🔌 Usage +
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. - -
-
-
-**direction:** `typing.Optional[ListEventsRequestDirection]` — The order events are returned in by time. Defaults to desc (most recent first); asc reads a journey forwards from where it starts. after and before always page forwards and backwards through that order. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.dm_members.delete( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**event:** `typing.Optional[str]` — Full event names to filter by, comma-separated (payment.completed, pixel.lead, pixel.page, pixel.custom:) — the same vocabulary the events / people metrics use. - -
-
-
-**source:** `typing.Optional[str]` — Canonical source path, exact or with a trailing :* prefix (whop::*, ext:meta:*, referrer:, direct, unknown). Selects conversions credited to this source. +**id:** `str` — The unique identifier of the DM channel member to remove.
@@ -20814,55 +20597,76 @@ client.events.list()
-**attribution_model:** `typing.Optional[ListEventsRequestAttributionModel]` — Attribution model for the source filter (defaults to last_touch). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ + -
-
-**country:** `typing.Optional[str]` — Country codes to filter by, comma-separated. -
+
+
client.dm_members.update(...) -> DmMember
-**city:** `typing.Optional[str]` — Cities to filter by, comma-separated. - -
-
+#### 📝 Description
-**device:** `typing.Optional[str]` — Device families to filter by, comma-separated (e.g. iPhone, Mac). - -
-
-
-**browser:** `typing.Optional[str]` — Browser families to filter by, comma-separated (e.g. Chrome, Mobile Safari). - +Update a DM channel member's settings, such as their notification preferences or membership status. + +Required permissions (one of): + - `dms:read` + - `support_chat:read` +
+
+#### 🔌 Usage +
-**os:** `typing.Optional[str]` — Operating system families to filter by, comma-separated (e.g. iOS, Windows). - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.dm_members.update( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**utm_source:** `typing.Optional[str]` — utm_source values to filter by, comma-separated. +
+
+ +**id:** `str` — The unique identifier of the DM channel member to update.
@@ -20870,7 +20674,7 @@ client.events.list()
-**hostname:** `typing.Optional[str]` — Page hostnames to filter by, comma-separated. +**notification_preference:** `typing.Optional[DmsFeedMemberNotificationPreferences]` — The notification setting for this member, controlling how they receive alerts for new messages in this channel.
@@ -20878,7 +20682,7 @@ client.events.list()
-**page:** `typing.Optional[str]` — Page paths to filter by, comma-separated. +**status:** `typing.Optional[DmsFeedMemberStatuses]` — The membership status for this member in the DM channel.
@@ -20898,7 +20702,8 @@ client.events.list()
-
client.events.create(...) -> CreateEventsResponse +## Domains +
client.domains.list(...) -> ListDomainsResponse
@@ -20910,7 +20715,9 @@ client.events.list()
-Tracks a conversion or engagement event for an account, such as a lead or a sign-up, so it can be attributed to the ads and links that drove it. Send server-side events with an API key that has `event:create`; the browser pixel calls this without authentication. +Lists your domains. Filter by account, app, status, hostname, or the state of a capability. + +Pass `search` to find domains to buy instead: the exact domain first, even when taken, then your name on popular extensions, then suggestions. Pass `tlds` to check only the extensions you choose. Results aren't reserved.
@@ -20933,9 +20740,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.events.create( - account_id="biz_xxxxxxxxxxxxxx", - event_name="coating_deposit_paid", +client.domains.list( + tlds=[ + "com" + ], ) ``` @@ -20952,7 +20760,7 @@ client.events.create(
-**account_id:** `str` — The account to associate with this event. +**account_id:** `typing.Optional[str]` — Only domains belonging to this account, prefixed biz_.
@@ -20960,11 +20768,15 @@ client.events.create(
-**event_name:** `str` +**app_id:** `typing.Optional[str]` — Only domains whose website serves this app, prefixed app_. + +
+
-The type of event. +
+
-Use a standard event (lead, submit_application, contact, complete_registration, schedule, view_content, add_to_cart, initiate_checkout) or pass your own name directly for a custom event. +**status:** `typing.Optional[ListDomainsRequestStatus]` — Only domains with this status: the most pressing state of their capabilities, or `idle` when they want nothing.
@@ -20972,7 +20784,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**action_source:** `typing.Optional[CreateEventsRequestActionSource]` — Where the event originated. +**order:** `typing.Optional[ListDomainsRequestOrder]` — Field to sort by. Domains with the same value keep their creation order in the same direction.
@@ -20980,7 +20792,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**app_build_id:** `typing.Optional[str]` — The build of the hosted app that served the page where the event occurred. +**direction:** `typing.Optional[ListDomainsRequestDirection]` — Sort direction.
@@ -20988,7 +20800,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**app_id:** `typing.Optional[str]` — The hosted app that served the page where the event occurred. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -20996,7 +20808,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**context:** `typing.Optional[CreateEventsRequestContext]` — Tracking and attribution context. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -21004,7 +20816,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**currency:** `typing.Optional[CreateEventsRequestCurrency]` — ISO 4217 currency code. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -21012,7 +20824,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**custom_name:** `typing.Optional[str]` — Custom event name when event_name is 'custom'. Maximum 35 chars for this value. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -21020,7 +20832,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**duration:** `typing.Optional[int]` — For 'leave' events: milliseconds the visitor spent on the page. +**search:** `typing.Optional[str]` — A name or domain to find domains to buy, such as `example` or `example.com`; a subdomain or URL searches its registrable domain. Returns domains with `availability` instead of your domains, without other filters or pagination.
@@ -21028,7 +20840,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**event_id:** `typing.Optional[str]` — Client-provided identifier for deduplication. Generated if omitted. +**tlds:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — With `search`, check only these extensions, such as `com` or `co.uk`, returned in this order. Repeat for several, up to 100.
@@ -21036,7 +20848,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**event_time:** `typing.Optional[datetime.datetime]` — When the event occurred. Defaults to now. +**domain:** `typing.Optional[str]` — Only your domain with this hostname, such as `example.com`.
@@ -21044,7 +20856,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**product_id:** `typing.Optional[str]` — The product associated with the event. +**verification:** `typing.Optional[ListDomainsRequestVerification]` — Only domains with verification in this state, such as `ready`, or `any` for every domain that has verification.
@@ -21052,7 +20864,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**referrer_url:** `typing.Optional[str]` — The referring URL. +**registration:** `typing.Optional[ListDomainsRequestRegistration]` — Only domains with registration in this state, such as `ready`, or `any` for every domain that has registration.
@@ -21060,7 +20872,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**resumed:** `typing.Optional[bool]` — For 'page' events: true when the page was restored from the back/forward cache. +**platform:** `typing.Optional[ListDomainsRequestPlatform]` — Only domains with platform in this state, such as `ready`, or `any` for every domain that has platform.
@@ -21068,7 +20880,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**source:** `typing.Optional[str]` — For 'identify' events: where the identity was captured (url, form, manual, iframe). +**subdomain:** `typing.Optional[ListDomainsRequestSubdomain]` — Only domains with subdomain in this state, such as `ready`, or `any` for every domain that has subdomain.
@@ -21076,7 +20888,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**title:** `typing.Optional[str]` — For 'page' events: the document title. +**website:** `typing.Optional[ListDomainsRequestWebsite]` — Only domains with website in this state, such as `ready`, or `any` for every domain that has website.
@@ -21084,7 +20896,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**url:** `typing.Optional[str]` — The URL where the event occurred. +**apple_pay:** `typing.Optional[ListDomainsRequestApplePay]` — Only domains with apple_pay in this state, such as `ready`, or `any` for every domain that has apple_pay.
@@ -21092,7 +20904,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**user:** `typing.Optional[CreateEventsRequestUser]` — User identity and profile data. +**pixel:** `typing.Optional[ListDomainsRequestPixel]` — Only domains with pixel in this state, such as `ready`, or `any` for every domain that has pixel.
@@ -21100,7 +20912,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**value:** `typing.Optional[float]` — Monetary value associated with the event. +**email:** `typing.Optional[ListDomainsRequestEmail]` — Only domains with email in this state, such as `ready`, or `any` for every domain that has email.
@@ -21108,7 +20920,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-**variant_id:** `typing.Optional[str]` — The variant associated with the event. +**transfer:** `typing.Optional[ListDomainsRequestTransfer]` — Only domains with transfer in this state, such as `ready`, or `any` for every domain that has transfer.
@@ -21128,7 +20940,7 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-
client.events.pulse(...) -> PulseEventsResponse +
client.domains.create(...) -> Domain
@@ -21140,7 +20952,15 @@ Use a standard event (lead, submit_application, contact, complete_registration,
-Returns a fully anonymized feed of recent money movement across Whop, most recent first, such as purchases, card spend, and transfers between accounts. Each item carries only its `type`, a USD amount, a coarse location, and a timestamp coarsened to the minute. The payload is identical for every caller and requires no authentication. +Adds a domain to your account with the capabilities you want. + +Pass `registration` to buy the domain through Whop; it's the default when you pass no capability. Pay its `amount_due` at `purchase_url`, or pass `registration.payment_method_id` to charge a saved card. Whop then registers it, runs its DNS, and renews it every year while `auto_renew` is on. + +Pass `registration.auth_code` to transfer in a domain you own at another registrar. The transfer starts once its `amount_due` is paid, or at once when `amount_due` is `null`. While `registration.phase` is `transferring`, its `issues` say what the transfer needs from you. + +Pass `verification` to connect a domain you registered elsewhere: its `issues` list the TXT and routing records to publish. A subdomain of a domain this account bought through Whop takes `subdomain` by default, and Whop publishes its DNS records itself. Pass `website` with an `app_id` to serve that app on the domain. + +To change a domain you already have, update it instead. Adding a domain this account deleted revives it under its original ID.
@@ -21163,7 +20983,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.events.pulse() +client.domains.create( + domain="www.bought.com", +) ``` @@ -21179,7 +21001,7 @@ client.events.pulse()
-**event:** `typing.Optional[str]` — Filter to one or more types, comma separated — for example `purchase,card_spend`. These are the item's `type`, not its `event_name`: several types share the `ledger_line.created` event name. Omit for every type in the feed. Values outside the feed's own set are rejected. +**domain:** `str` — Bare hostname, such as example.com or checkout.example.com. A bought domain must be a root domain. Wildcards, paths, schemes, and ports are not accepted.
@@ -21187,7 +21009,7 @@ client.events.pulse()
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**account_id:** `typing.Optional[str]` — Account ID, prefixed biz_. Required for user credentials; otherwise defaults to the credential's account.
@@ -21195,7 +21017,7 @@ client.events.pulse()
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**apple_pay:** `typing.Optional[CreateDomainsRequestApplePay]` — Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability.
@@ -21203,7 +21025,7 @@ client.events.pulse()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**email:** `typing.Optional[CreateDomainsRequestEmail]` — Send and receive email on the domain. It needs `registration` or `subdomain`, so only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email.
@@ -21211,70 +21033,47 @@ client.events.pulse()
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**metadata:** `typing.Optional[typing.Dict[str, str]]` — Custom string keys and values.
- -
+
+
+**pixel:** `typing.Optional[CreateDomainsRequestPixel]` — Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking. +
-
-
client.events.validate_pixel(...) -> PixelValidation
-#### 📝 Description - -
-
+**registration:** `typing.Optional[CreateDomainsRequestRegistration]` — Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it. + +
+
-Checks whether the Whop pixel is installed for an account, or on one page when you pass a `url`. Use it before launching an ad to confirm its destination is tracked, or in a setup flow to tell a merchant whether their install is live. -
-
+**subdomain:** `typing.Optional[CreateDomainsRequestSubdomain]` — Use a subdomain of a domain this account bought through Whop, such as shop.example.com under example.com. It's the default when you add such a subdomain without a capability. Whop publishes its DNS records in the root domain's zone, so it needs nothing from you: it stays `pending` until the root domain is set up, then turns `ready`. Whop releases it, and its website, when the account no longer holds the root domain, and deletes it when the root domain leaves the account. Pass `null` to release it. Can't be combined with `verification` or `registration`. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.events.validate_pixel() - -``` -
-
+**transfer:** `typing.Optional[CreateDomainsRequestTransfer]` — Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. +
-#### ⚙️ Parameters - -
-
-
-**account_id:** `typing.Optional[str]` — Account to check. Defaults to the authenticated account. +**verification:** `typing.Optional[CreateDomainsRequestVerification]` — Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`.
@@ -21282,7 +21081,7 @@ client.events.validate_pixel()
-**url:** `typing.Optional[str]` — A page to check for the pixel, such as an ad destination. Events from that page settle the answer; if it hasn't sent any lately, it is fetched and its source read for the pixel and the conversion events wired on it. Omit it to check the account from its events alone. +**website:** `typing.Optional[CreateDomainsRequestWebsite]` — Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities.
@@ -21302,8 +21101,7 @@ client.events.validate_pixel()
-## Experiences -
client.experiences.list(...) -> ListExperiencesResponse +
client.domains.retrieve(...) -> Domain
@@ -21315,7 +21113,9 @@ client.events.validate_pixel()
-Lists the experiences in an account, optionally filtered to those attached to one product or powered by one app. +Retrieves a domain by ID or hostname. Both return the same domain, shown as fully as you can see it: everything for your own accounts, and only who has it and what it serves for anyone else. + +A hostname no domain on Whop has comes back with its `availability` instead.
@@ -21332,21 +21132,14 @@ Lists the experiences in an account, optionally filtered to those attached to on ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -import datetime client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.experiences.list( - first=42, - last=42, - product_id="prod_xxxxxxxxxxxxx", - app_id="app_xxxxxxxxxxxxxx", - created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - account_id="biz_xxxxxxxxxxxxxx", +client.domains.retrieve( + id="id", ) ``` @@ -21363,7 +21156,7 @@ client.experiences.list(
-**account_id:** `str` — The unique identifier of the company to list experiences for. +**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`.
@@ -21371,63 +21164,72 @@ client.experiences.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. -
+
+
client.domains.delete(...) -> Domain
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. - -
-
+#### 📝 Description
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. - -
-
-
-**product_id:** `typing.Optional[str]` — Filter to only experiences attached to this product identifier. - +Removes the domain from your account and releases its capabilities in the background. Deleting an unpaid purchase cancels it, and deleting a transfer cancels it and refunds it while the current registrar can still stop it. A registered domain can't be deleted; turn off `auto_renew` and it's released after it expires. Adding the domain to this account again revives it under the same ID. +
+
+#### 🔌 Usage +
-**app_id:** `typing.Optional[str]` — Filter to only experiences powered by this app identifier. - -
-
-
-**created_before:** `typing.Optional[datetime.datetime]` — Only return experiences created before this timestamp. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.domains.delete( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**created_after:** `typing.Optional[datetime.datetime]` — Only return experiences created after this timestamp. +
+
+ +**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`.
@@ -21447,7 +21249,7 @@ client.experiences.list(
-
client.experiences.create(...) -> Experience +
client.domains.update(...) -> Domain
@@ -21459,10 +21261,7 @@ client.experiences.list(
-Creates an experience for an account, powered by an app such as courses, forums, or chat. Attach it to a product with `POST /experiences/:id/attach` to give that product's customers access. - -Required permissions: - - `experience:create` +Changes a domain's capabilities or metadata. Pass a capability to add it or change its settings, or `null` to release it; capabilities you leave out don't change. Passing a capability that needs action again retries it. Releasing every capability keeps the domain, `idle`; delete it to remove it.
@@ -21485,9 +21284,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.create( - account_id="biz_xxxxxxxxxxxxxx", - app_id="app_xxxxxxxxxxxxxx", +client.domains.update( + id="id", ) ``` @@ -21504,7 +21302,7 @@ client.experiences.create(
-**account_id:** `str` — The unique identifier of the company to create this experience for. +**id:** `str` — Domain ID, prefixed `dom_`, or a hostname such as `example.com`; a bare name looks up `.com`.
@@ -21512,7 +21310,7 @@ client.experiences.create(
-**app_id:** `str` — The unique identifier of the app that powers this experience. +**apple_pay:** `typing.Optional[UpdateDomainsRequestApplePay]` — Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability.
@@ -21520,7 +21318,7 @@ client.experiences.create(
-**is_public:** `typing.Optional[bool]` — Whether the experience is publicly accessible without a membership. +**email:** `typing.Optional[UpdateDomainsRequestEmail]` — Send and receive email on the domain. It needs `registration` or `subdomain`, so only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email.
@@ -21528,7 +21326,7 @@ client.experiences.create(
-**logo:** `typing.Optional[CreateExperiencesRequestLogo]` — A logo image displayed alongside the experience name. +**metadata:** `typing.Optional[typing.Dict[str, str]]` — Replacement custom string keys and values.
@@ -21536,7 +21334,7 @@ client.experiences.create(
-**name:** `typing.Optional[str]` — The display name of the experience. Defaults to the app's name if not provided. +**pixel:** `typing.Optional[UpdateDomainsRequestPixel]` — Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking.
@@ -21544,7 +21342,7 @@ client.experiences.create(
-**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this experience. Webhooks still fire. +**registration:** `typing.Optional[UpdateDomainsRequestRegistration]` — Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it.
@@ -21552,7 +21350,31 @@ client.experiences.create(
-**section_id:** `typing.Optional[str]` — The unique identifier of the section to place the experience in. +**subdomain:** `typing.Optional[UpdateDomainsRequestSubdomain]` — Use a subdomain of a domain this account bought through Whop, such as shop.example.com under example.com. It's the default when you add such a subdomain without a capability. Whop publishes its DNS records in the root domain's zone, so it needs nothing from you: it stays `pending` until the root domain is set up, then turns `ready`. Whop releases it, and its website, when the account no longer holds the root domain, and deletes it when the root domain leaves the account. Pass `null` to release it. Can't be combined with `verification` or `registration`. + +
+
+ +
+
+ +**transfer:** `typing.Optional[UpdateDomainsRequestTransfer]` — Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. + +
+
+ +
+
+ +**verification:** `typing.Optional[UpdateDomainsRequestVerification]` — Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`. + +
+
+ +
+
+ +**website:** `typing.Optional[UpdateDomainsRequestWebsite]` — Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities.
@@ -21572,7 +21394,7 @@ client.experiences.create(
-
client.experiences.retrieve(...) -> Experience +
client.domains.check(...) -> Domain
@@ -21584,7 +21406,7 @@ client.experiences.create(
-Retrieves the details of an existing experience. +Checks the domain's DNS, payment, and provider state again now instead of at its next scheduled check. Returns the domain as saved; retrieve it again to see the result.
@@ -21607,8 +21429,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.retrieve( - id="exp_xxxxxxxxxxxxxx", +client.domains.check( + id="id", ) ``` @@ -21625,7 +21447,7 @@ client.experiences.retrieve(
-**id:** `str` — The unique identifier of the experience. +**id:** `str` — Domain ID, prefixed `dom_`.
@@ -21645,7 +21467,8 @@ client.experiences.retrieve(
-
client.experiences.delete(...) -> bool +## Economic Intelligence +
client.economic_intelligence.list(...) -> ListEconomicIntelligenceResponse
@@ -21657,10 +21480,7 @@ client.experiences.retrieve(
-Deletes an experience and detaches it from every product, removing customer access to it. Returns `true` on success. - -Required permissions: - - `experience:delete` +Lists an account's recommendations and generation requests, newest first by default. When no recommendations are ready or in progress and you have `company:update` permission, listing queues generation, with a ten-minute cooldown after an unsuccessful request; unsuccessful requests are not listed. An account's executed recommendations and runs stay listed after Economic Intelligence turns off, but new recommendations are offered only while it is on. For visitor countries, page views, ad impressions and clicks, or payment volume over a time range, use `GET /stats/time_series/:metric`.
@@ -21683,9 +21503,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.delete( - id="exp_xxxxxxxxxxxxxx", -) +client.economic_intelligence.list() ``` @@ -21701,7 +21519,79 @@ client.experiences.delete(
-**id:** `str` — The unique identifier of the experience to delete. +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the API key's own account; omit for personal onboarding, where signed-out visitors receive a business-setup template and eligible users receive their saved setup recommendation. + +
+
+ +
+
+ +**status:** `typing.Optional[ListEconomicIntelligenceRequestStatus]` — Filter recommendations by their current status. + +
+
+ +
+
+ +**input:** `typing.Optional[str]` — What you want recommendations for, in your own words. Up to 1000 characters. Narrows the list to the recommendations that address it. Without a `status` filter, when none do and you can update the account, new recommendations start generating for your input, and the list shows that request until they're ready. Repeating the same input while it generates doesn't start another. + +
+
+ +
+
+ +**has_run:** `typing.Optional[bool]` — When true, only recommendations someone has started running, by any user. Without `account_id`, covers every account you can read that has Economic Intelligence. Can't be combined with `input`. + +
+
+ +
+
+ +**order:** `typing.Optional[ListEconomicIntelligenceRequestOrder]` — Sort field. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListEconomicIntelligenceRequestDirection]` — Sort direction. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of results to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -21721,7 +21611,7 @@ client.experiences.delete(
-
client.experiences.update(...) -> Experience +
client.economic_intelligence.update(...) -> EconomicIntelligence
@@ -21733,10 +21623,7 @@ client.experiences.delete(
-Updates an experience's name, logo, visibility, or notification setting, or moves it to another section or position. - -Required permissions: - - `experience:update` +Updates a recommendation status, records feedback, or both. Send `sentiment` to rate it. Include `status: superseded` to retire a ready recommendation and request replacements; a rating alone leaves its status unchanged. To run a recommendation yourself, send `status: running` to start, then `status: executed` when it is carried out (with `result_id` naming what it changed, or `result_page` naming where it worked, so the result links there) or `status: incomplete` if the run ended without carrying it out. Whop AI reports its own runs the same way. Send `status: acknowledged` once an executed run's result has been seen.
@@ -21759,8 +21646,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.update( - id="exp_xxxxxxxxxxxxxx", +client.economic_intelligence.update( + id="id", ) ``` @@ -21777,7 +21664,7 @@ client.experiences.update(
-**id:** `str` — The unique identifier of the experience to update. +**id:** `str` — Recommendation ID, prefixed `reca_`.
@@ -21785,7 +21672,7 @@ client.experiences.update(
-**access_level:** `typing.Optional[ExperienceAccessLevels]` — The access level of the experience. +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the API key's own account.
@@ -21793,7 +21680,7 @@ client.experiences.update(
-**is_public:** `typing.Optional[bool]` — Whether the experience is publicly accessible without a membership. +**input:** `typing.Optional[str]` — What you want the replacement recommendation for, in your own words. Up to 1000 characters. Sent when superseding, it directs the generation that replaces the rejected recommendation.
@@ -21801,7 +21688,7 @@ client.experiences.update(
-**logo:** `typing.Optional[UpdateExperiencesRequestLogo]` — A logo image displayed alongside the experience name. +**result_id:** `typing.Optional[str]` — With `status: executed`, the ID of what the run produced or changed, and the recommendation's `result_url` becomes where to view it: an ad (`ad_`), ad group (`adgrp_`) or ad campaign (`adcamp_`), a website (`app_`), a product (`prod_`), a plan (`plan_`), a checkout link (`ch_`), a promo code (`promo_`), or an experience (`exp_`). Without `result_id` or `result_page`, `result_url` links to the resource the recommendation was about, when it names one. Send only one of `result_id`, `result_page` and `result_url`.
@@ -21809,7 +21696,7 @@ client.experiences.update(
-**name:** `typing.Optional[str]` — The display name of the experience. +**result_page:** `typing.Optional[UpdateEconomicIntelligenceRequestResultPage]` — With `status: executed`, the page where the run's result can be seen when it is not one resource, such as the checkout links list or the store page. The recommendation's `result_url` becomes that page on the account's dashboard, or its store page for `store_page`.
@@ -21817,7 +21704,7 @@ client.experiences.update(
-**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this experience. Webhooks still fire. +**result_url:** `typing.Optional[str]` — With `status: executed`, where to view what was produced when it is outside Whop. An http or https URL. Prefer `result_id` for anything on Whop.
@@ -21825,7 +21712,7 @@ client.experiences.update(
-**order:** `typing.Optional[str]` — The position of the experience within its section for display ordering. +**sentiment:** `typing.Optional[UpdateEconomicIntelligenceRequestSentiment]` — A signed-in user can rate a recommendation as `positive` or `negative`. Can be sent alone or together with status.
@@ -21833,7 +21720,15 @@ client.experiences.update(
-**section_id:** `typing.Optional[str]` — The unique identifier of the section to move the experience into. +**status:** `typing.Optional[UpdateEconomicIntelligenceRequestStatus]` — Use `running` to start a run of a ready recommendation, `executed` to record that it was carried out, `incomplete` to record that a running recommendation's run ended without carrying it out, `superseded` to reject a ready recommendation, or `acknowledged` to mark an executed run as seen; the recommendation stays `executed` and records `acknowledged_at`. + +
+
+ +
+
+ +**user_feedback:** `typing.Optional[str]` — An optional explanation of the rating or rejection. Negative feedback informs replacement recommendations.
@@ -21853,7 +21748,8 @@ client.experiences.update(
-
client.experiences.attach(...) -> Experience +## Email addresses +
client.email_addresses.list(...) -> ListEmailAddressesResponse
@@ -21865,10 +21761,7 @@ client.experiences.update(
-Attaches an experience to a product, giving the product's customers access to it. - -Required permissions: - - `experience:attach` +Lists the email addresses of the accounts you can read, and the mailboxes you own. A password is included only for mailboxes you can use.
@@ -21891,10 +21784,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.attach( - id="exp_xxxxxxxxxxxxxx", - product_id="prod_xxxxxxxxxxxxx", -) +client.email_addresses.list() ``` @@ -21910,7 +21800,7 @@ client.experiences.attach(
-**id:** `str` — The unique identifier of the experience to attach. +**account_id:** `typing.Optional[str]` — Only addresses belonging to this account, prefixed biz_.
@@ -21918,7 +21808,7 @@ client.experiences.attach(
-**product_id:** `str` — The unique identifier of the product to attach the experience to. +**order:** `typing.Optional[ListEmailAddressesRequestOrder]` — Field to sort by.
@@ -21926,76 +21816,31 @@ client.experiences.attach(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**direction:** `typing.Optional[ListEmailAddressesRequestDirection]` — Sort direction.
- -
- - - - -
- -
client.experiences.detach(...) -> Experience -
-
- -#### 📝 Description - -
-
-Detaches an experience from a product, removing customer access to it through that product. - -Required permissions: - - `experience:detach` -
-
+**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.experiences.detach( - id="exp_xxxxxxxxxxxxxx", - product_id="prod_xxxxxxxxxxxxx", -) - -``` -
-
+**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The unique identifier of the experience to detach. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -22003,7 +21848,7 @@ client.experiences.detach(
-**product_id:** `str` — The unique identifier of the product to detach the experience from. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -22023,7 +21868,7 @@ client.experiences.detach(
-
client.experiences.duplicate(...) -> Experience +
client.email_addresses.create(...) -> EmailAddress
@@ -22035,10 +21880,7 @@ client.experiences.detach(
-Duplicates an experience and attaches the copy to the same products as the original. Forum and chat copies keep the original's settings, such as who can post or comment. No content, such as posts, messages, or lessons, is copied. - -Required permissions: - - `experience:create` +Creates a mailbox on one of the account's domains. The domain needs the `email` capability turned on. The address can be created and signed in to while email is still setting up, and it can send once email is `ready`. Give it to a team member with `user_id`, or leave it out to share the mailbox with the account. Creating an address this account deleted brings the mailbox back, with its mail and a new password.
@@ -22061,8 +21903,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiences.duplicate( - id="exp_xxxxxxxxxxxxxx", +client.email_addresses.create( + address="marcus@shinetime.example", ) ``` @@ -22079,7 +21921,7 @@ client.experiences.duplicate(
-**id:** `str` — The unique identifier of the experience to duplicate. +**address:** `str` — The full address, such as support@example.com. The part before the @ can use letters, numbers, dots, dashes, underscores and plus signs.
@@ -22087,7 +21929,15 @@ client.experiences.duplicate(
-**name:** `typing.Optional[str]` — The display name for the duplicated experience. Defaults to the original experience's name. +**account_id:** `typing.Optional[str]` — Account ID, prefixed biz_. Required for user credentials; otherwise defaults to the credential's account. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — ID of the team member who owns the mailbox, prefixed `user_`. Only they can read it or send from it. Leave it out, or pass `null`, to share the mailbox with the account. Giving an owned mailbox to someone else empties it: the owner's mail is never shown to anyone else.
@@ -22107,8 +21957,7 @@ client.experiences.duplicate(
-## Experiments -
client.experiments.list(...) -> ListExperimentsResponse +
client.email_addresses.retrieve(...) -> EmailAddress
@@ -22120,7 +21969,7 @@ client.experiences.duplicate(
-Lists the experiments and feature flags owned by an account. Requires `experiment:read` on the account. +Retrieves an email address. Its owner can always retrieve it; anyone else needs `email:read`. The password is included only if you can use the mailbox.
@@ -22143,7 +21992,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.list() +client.email_addresses.retrieve( + id="id", +) ``` @@ -22159,7 +22010,7 @@ client.experiments.list()
-**account_id:** `typing.Optional[str]` — Owning account ID. +**id:** `str` — Email address ID, prefixed `emaddr_`.
@@ -22167,63 +22018,72 @@ client.experiments.list()
-**related_resource:** `typing.Optional[ExperimentResourceReference]` — Filter by related resource; requires account_id. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**status:** `typing.Optional[ListExperimentsRequestStatus]` — Only experiments with this status. -
+
+
client.email_addresses.delete(...) -> EmailAddress
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. - -
-
+#### 📝 Description
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. - -
-
-
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. - +Deletes the address. Mail apps signed in to it lose access, and mail sent to it is no longer received. Its mail is kept, and creating the address again in this account brings the mailbox back. +
+
+#### 🔌 Usage +
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. - -
-
-
-**order:** `typing.Optional[ListExperimentsRequestOrder]` — The field to sort experiments by. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.email_addresses.delete( + id="id", +) + +```
+ + + +#### ⚙️ Parameters
-**direction:** `typing.Optional[ListExperimentsRequestDirection]` — Sort direction. +
+
+ +**id:** `str` — Email address ID, prefixed `emaddr_`.
@@ -22243,7 +22103,7 @@ client.experiments.list()
-
client.experiments.create(...) -> Experiment +
client.email_addresses.update(...) -> EmailAddress
@@ -22255,7 +22115,7 @@ client.experiments.list()
-Creates an experiment or feature flag in `draft` status for an account. Nothing is served until you activate it with `POST /experiments/:id/activate`. Requires `experiment:manage` on the account. +Gives the mailbox to a team member, or shares it with the account, under a new password. A mailbox that had an owner starts empty, because its earlier mail is private to that owner; mail apps sync it again from the start.
@@ -22278,9 +22138,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.create( - account_id="biz_xxxxxxxxxxxxxx", - flag_key="checkout_redesign_v2", +client.email_addresses.update( + id="id", ) ``` @@ -22297,7 +22156,7 @@ client.experiments.create(
-**account_id:** `str` — Owning account ID. Required; ownership cannot change. +**id:** `str` — Email address ID, prefixed `emaddr_`.
@@ -22305,7 +22164,7 @@ client.experiments.create(
-**flag_key:** `str` — Developer-chosen handle referenced from code, used in evaluation and results calls. Interchangeable with the returned `expt_` id anywhere the API takes an experiment identifier. +**user_id:** `typing.Optional[str]` — ID of the team member who owns the mailbox, prefixed `user_`. Only they can read it or send from it. Leave it out, or pass `null`, to share the mailbox with the account. Giving an owned mailbox to someone else empties it: the owner's mail is never shown to anyone else.
@@ -22313,71 +22172,72 @@ client.experiments.create(
-**bucket_by:** `typing.Optional[CreateExperimentsRequestBucketBy]` — Randomization unit, and the only identity the assignment is keyed on — evaluation fails rather than falling back to another. `user` (default) uses `subject[user_id]`; `account` uses `subject[account_id]`, so every user of an account gets the same arm; `anonymous` uses the anonymous id and survives sign-in. Fixed after creation. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**control:** `typing.Optional[CreateExperimentsRequestControl]` -
+
+
client.email_addresses.mobileconfig(...) -> typing.Iterator[bytes]
-**feature_flag_only:** `typing.Optional[bool]` — When `true`, creates a binary feature flag rather than a full experiment. Feature flags expose the same evaluation API but do not collect metric results. Defaults to `false`. - -
-
+#### 📝 Description
-**hypothesis:** `typing.Optional[str]` — Required for full experiments; rejected on feature flags. Structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." Evidence should be something real — a baseline number, a funnel breakdown — not a guess, and [name] is you, not something to leave blank. - -
-
-
-**metadata:** `typing.Optional[typing.Dict[str, str]]` — Up to 20 key-value pairs you can attach to the experiment for your own use, such as which pages it changes. Keys are at most 40 characters and values at most 500. - +Downloads an Apple configuration profile that adds the mailbox to Mail on a Mac, iPhone or iPad, signed in and ready to send. Only the owner can download it for an owned mailbox; a shared one needs `email:read` and `email:send`. +
+
+#### 🔌 Usage +
-**name:** `typing.Optional[str]` — Human-readable display name. Defaults to `flag_key` when omitted. - -
-
-
-**related_resource:** `typing.Optional[ExperimentResourceReference]` — Resource owned by the account that this experiment is bound to, such as an app or product. `null` when unbound. Fixed once the experiment first activates. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.email_addresses.mobileconfig( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**targeting_rules:** `typing.Optional[typing.List[CreateExperimentsRequestTargetingRulesItem]]` — Rules that determine which subjects qualify for the experiment. - -
-
-
-**variants:** `typing.Optional[typing.List[CreateExperimentsRequestVariantsItem]]` — Treatment arms to create. Users outside every arm form the implicit `control` group. Required unless `feature_flag_only` is `true`. +**id:** `str` — Email address ID, prefixed `emaddr_`.
@@ -22397,7 +22257,7 @@ client.experiments.create(
-
client.experiments.exposures(...) -> ExposuresExperimentsResponse +
client.email_addresses.reset_password(...) -> EmailAddress
@@ -22409,7 +22269,7 @@ client.experiments.create(
-Evaluates experiments and feature flags for a subject and records an exposure. Pass `flag_key` to evaluate one flag, or omit it to evaluate every active flag in the account and related resource scope. Requires no authentication; when a credential resolves, its authentication method, API key ID, and signed-in user ID are recorded on the exposure event. +Gives the mailbox a new password. Every mail app signed in with the old one loses access. Only the owner can reset an owned mailbox; a shared one needs `email:read` and `email:send`.
@@ -22432,7 +22292,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.exposures() +client.email_addresses.reset_password( + id="id", +) ``` @@ -22448,47 +22310,7 @@ client.experiments.exposures()
-**subject:** `typing.Optional[ExposuresExperimentsRequestSubject]` — Bucketing subject: the user, account, or anonymous ID the experiment's `bucket_by` assigns on. Only the identity matching `bucket_by` is used; when it is missing, evaluating a single flag fails and a batch omits that experiment. Subjects outside every treatment range receive `control`. `subject[account_id]` also enables account-level targeting rules. Experiment ownership comes from the top-level `account_id`. - -
-
- -
-
- -**related_resource:** `typing.Optional[ExperimentResourceReference]` — Restricts batch evaluation to this related resource; omitted batches contain only unbound experiments. - -
-
- -
-
- -**flag_key:** `typing.Optional[str]` — Flag or experiment to evaluate — the flag_key handle or the `expt_` id. Omit to return all flags the caller qualifies for. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — Owning account ID. Required when evaluating by flag_key or in a batch; optional for an expt_ ID. - -
-
- -
-
- -**properties:** `typing.Optional[str]` — JSON-encoded scalar values that property targeting conditions match against. Numeric and boolean strings are coerced. Nested query keys such as properties[variant]=pro remain accepted for existing callers. - -
-
- -
-
- -**log_exposure:** `typing.Optional[bool]` — Set `false` to read an assignment without recording an exposure, such as when a client caches assignments up front and records the exposure when the arm is rendered. Omitted records the exposure. +**id:** `str` — Email address ID, prefixed `emaddr_`.
@@ -22508,7 +22330,8 @@ client.experiments.exposures()
-
client.experiments.retrieve(...) -> Experiment +## Events +
client.events.list(...) -> ListEventsResponse
@@ -22520,7 +22343,7 @@ client.experiments.exposures()
-Retrieves an experiment or feature flag by its `expt_` ID or `flag_key` handle. Requires `experiment:read` on the owning account. +Lists identity-linked events, most recent first by default. Pass `identifier` for one person's journey, or omit it to list an account's events within a time range. Events have the same shape as the `POST /events` intake: attribution in `context`, identity in `user`.
@@ -22543,9 +22366,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.retrieve( - id="id", -) +client.events.list() ``` @@ -22561,7 +22382,7 @@ client.experiments.retrieve(
-**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. +**identifier:** `typing.Optional[str]` — Any hard identifier of the person: a person ID (prsn_*), user ID, email, phone number, or a tracking cookie value (wuid, anonymous ID, fbp/fbc/ttp/ga). Omit to list recent events for the account.
@@ -22569,7 +22390,7 @@ client.experiments.retrieve(
-**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Optional for account API keys; required for credentials that can access multiple accounts.
@@ -22577,72 +22398,87 @@ client.experiments.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**from:** `typing.Optional[datetime.datetime]` — Start of the time range as an ISO 8601 timestamp. Required when identifier is omitted.
- -
+
+
+**to:** `typing.Optional[datetime.datetime]` — End of the time range as an ISO 8601 timestamp. Required when identifier is omitted; otherwise defaults to now. +
-
-
client.experiments.update(...) -> Experiment
-#### 📝 Description +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. + +
+
+**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+
-Updates the targeting rules, treatment allocation, or hypothesis of an existing experiment or feature flag. To change its lifecycle, use the `activate`, `pause`, and `end` endpoints instead. Requires `experiment:manage` on the owning account. -
-
+**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + -#### 🔌 Usage -
+**direction:** `typing.Optional[ListEventsRequestDirection]` — The order events are returned in by time. Defaults to desc (most recent first); asc reads a journey forwards from where it starts. after and before always page forwards and backwards through that order. + +
+
+
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) +**event:** `typing.Optional[str]` — Full event names to filter by, comma-separated (payment.completed, pixel.lead, pixel.page, pixel.custom:) — the same vocabulary the events / people metrics use. + +
+
-client.experiments.update( - id="id", -) +
+
-``` +**source:** `typing.Optional[str]` — Canonical source path, exact or with a trailing :* prefix (whop::*, ext:meta:*, referrer:, direct, unknown). Selects conversions credited to this source. +
+ +
+
+ +**attribution_model:** `typing.Optional[ListEventsRequestAttributionModel]` — Attribution model for the source filter (defaults to last_touch). +
-#### ⚙️ Parameters -
+**country:** `typing.Optional[str]` — Country codes to filter by, comma-separated. + +
+
+
-**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. +**city:** `typing.Optional[str]` — Cities to filter by, comma-separated.
@@ -22650,7 +22486,7 @@ client.experiments.update(
-**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. +**device:** `typing.Optional[str]` — Device families to filter by, comma-separated (e.g. iPhone, Mac).
@@ -22658,7 +22494,7 @@ client.experiments.update(
-**control:** `typing.Optional[UpdateExperimentsRequestControl]` +**browser:** `typing.Optional[str]` — Browser families to filter by, comma-separated (e.g. Chrome, Mobile Safari).
@@ -22666,7 +22502,7 @@ client.experiments.update(
-**hypothesis:** `typing.Optional[str]` — Omit to leave unchanged. Send an empty string to clear it. Not accepted on feature flags. When setting it, structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." same as on create. +**os:** `typing.Optional[str]` — Operating system families to filter by, comma-separated (e.g. iOS, Windows).
@@ -22674,7 +22510,7 @@ client.experiments.update(
-**related_resource:** `typing.Optional[ExperimentResourceReference]` — Resource owned by the account that this experiment is bound to, such as an app or product. `null` when unbound. Fixed once the experiment first activates. +**utm_source:** `typing.Optional[str]` — utm_source values to filter by, comma-separated.
@@ -22682,7 +22518,7 @@ client.experiments.update(
-**targeting_rules:** `typing.Optional[typing.List[UpdateExperimentsRequestTargetingRulesItem]]` — Replace the targeting rules with this set. Omit to leave unchanged. +**hostname:** `typing.Optional[str]` — Page hostnames to filter by, comma-separated.
@@ -22690,7 +22526,7 @@ client.experiments.update(
-**variants:** `typing.Optional[typing.List[UpdateExperimentsRequestVariantsItem]]` — Grow treatment allocation. Pass every existing treatment with an equal-or-higher weight; append new names to add arms. Weights never decrease and arms are never removed. Omit to leave unchanged. +**page:** `typing.Optional[str]` — Page paths to filter by, comma-separated.
@@ -22710,7 +22546,7 @@ client.experiments.update(
-
client.experiments.activate(...) -> Experiment +
client.events.create(...) -> CreateEventsResponse
@@ -22722,7 +22558,7 @@ client.experiments.update(
-Starts (or resumes) an experiment or feature flag so evaluation begins serving it. Activating a draft stamps `started_at`; resuming a paused experiment keeps the original start. Only drafts and paused experiments can be activated. Requires `experiment:manage` on the owning account. +Tracks a conversion or engagement event for an account, such as a lead or a sign-up, so it can be attributed to the ads and links that drove it. Send server-side events with an API key that has `event:create`; the browser pixel calls this without authentication.
@@ -22745,8 +22581,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.activate( - id="id", +client.events.create( + account_id="biz_xxxxxxxxxxxxxx", + event_name="coating_deposit_paid", ) ``` @@ -22763,7 +22600,7 @@ client.experiments.activate(
-**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. +**account_id:** `str` — The account to associate with this event.
@@ -22771,7 +22608,11 @@ client.experiments.activate(
-**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. +**event_name:** `str` + +The type of event. + +Use a standard event (lead, submit_application, contact, complete_registration, schedule, view_content, add_to_cart, initiate_checkout) or pass your own name directly for a custom event.
@@ -22779,7 +22620,7 @@ client.experiments.activate(
-**duration_days:** `typing.Optional[int]` — Reporting window length in days. Omit to use the default. This does not automatically end the experiment. +**action_source:** `typing.Optional[CreateEventsRequestActionSource]` — Where the event originated.
@@ -22787,73 +22628,111 @@ client.experiments.activate(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**app_build_id:** `typing.Optional[str]` — The build of the hosted app that served the page where the event occurred.
+ +
+
+ +**app_id:** `typing.Optional[str]` — The hosted app that served the page where the event occurred. +
+
+
+**context:** `typing.Optional[CreateEventsRequestContext]` — Tracking and attribution context. +
-
-
client.experiments.end(...) -> Experiment
-#### 📝 Description +**currency:** `typing.Optional[CreateEventsRequestCurrency]` — ISO 4217 currency code. + +
+
+**custom_name:** `typing.Optional[str]` — Custom event name when event_name is 'custom'. Maximum 35 chars for this value. + +
+
+
-Concludes the experiment and records required `findings`. Pass `winning_arm` to serve the winning treatment to everyone; omit it when control won. Ended experiments cannot restart, but may be ended again to correct the winner. Requires `experiment:manage` on the owning account. +**duration:** `typing.Optional[int]` — For 'leave' events: milliseconds the visitor spent on the page. +
+ +
+
+ +**event_id:** `typing.Optional[str]` — Client-provided identifier for deduplication. Generated if omitted. +
-#### 🔌 Usage -
+**event_time:** `typing.Optional[datetime.datetime]` — When the event occurred. Defaults to now. + +
+
+
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) +**product_id:** `typing.Optional[str]` — The product associated with the event. + +
+
-client.experiments.end( - id="id", - findings="Treatment lifted signups 12%, shipping it to everyone.", -) +
+
-``` +**referrer_url:** `typing.Optional[str]` — The referring URL. +
+ +
+
+ +**resumed:** `typing.Optional[bool]` — For 'page' events: true when the page was restored from the back/forward cache. +
-#### ⚙️ Parameters +
+
+ +**source:** `typing.Optional[str]` — For 'identify' events: where the identity was captured (url, form, manual, iframe). + +
+
+**title:** `typing.Optional[str]` — For 'page' events: the document title. + +
+
+
-**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. +**url:** `typing.Optional[str]` — The URL where the event occurred.
@@ -22861,7 +22740,7 @@ client.experiments.end(
-**findings:** `str` — What you learned and why you chose this outcome. Required. +**user:** `typing.Optional[CreateEventsRequestUser]` — User identity and profile data.
@@ -22869,7 +22748,7 @@ client.experiments.end(
-**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. +**value:** `typing.Optional[float]` — Monetary value associated with the event.
@@ -22877,7 +22756,7 @@ client.experiments.end(
-**winning_arm:** `typing.Optional[str]` — The treatment that won. Setting it rolls that arm out: every later evaluation returns it to every caller, ignoring targeting and allocation, and exposures stop being recorded. Omit it when control won — an ended experiment with no winning arm evaluates to `control` for everyone, so ending again without one also reverts a rollout recorded by mistake. Not accepted on feature flags, which evaluate to disabled once ended. +**variant_id:** `typing.Optional[str]` — The variant associated with the event.
@@ -22897,7 +22776,7 @@ client.experiments.end(
-
client.experiments.pause(...) -> Experiment +
client.events.pulse(...) -> PulseEventsResponse
@@ -22909,7 +22788,7 @@ client.experiments.end(
-Pauses an active experiment or feature flag: evaluation stops serving it and exposures stop flowing. Assignments are keyed on stable identity, so users return to their original arm when the experiment resumes. Requires `experiment:manage` on the owning account. +Returns a fully anonymized feed of recent money movement across Whop, most recent first, such as purchases, card spend, and transfers between accounts. Each item carries only its `type`, a USD amount, a coarse location, and a timestamp coarsened to the minute. The payload is identical for every caller and requires no authentication.
@@ -22932,9 +22811,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.experiments.pause( - id="id", -) +client.events.pulse() ``` @@ -22950,7 +22827,7 @@ client.experiments.pause(
-**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. +**event:** `typing.Optional[str]` — Filter to one or more types, comma separated — for example `purchase,card_spend`. These are the item's `type`, not its `event_name`: several types share the `ledger_line.created` event name. Omit for every type in the feed. Values outside the feed's own set are rejected.
@@ -22958,7 +22835,23 @@ client.experiments.pause(
-**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -22978,8 +22871,7 @@ client.experiments.pause(
-## Exports -
client.exports.list(...) -> ListExportsResponse +
client.events.validate_pixel(...) -> PixelValidation
@@ -22991,7 +22883,7 @@ client.experiments.pause(
-Lists the exports requested for an account, newest first. Only exports of resources the credential is allowed to export are returned. +Checks whether the Whop pixel is installed for an account, or on one page when you pass a `url`. Use it before launching an ad to confirm its destination is tracked, or in a setup flow to tell a merchant whether their install is live.
@@ -23014,7 +22906,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.exports.list() +client.events.validate_pixel() ``` @@ -23030,47 +22922,7 @@ client.exports.list()
-**account_id:** `typing.Optional[str]` — The account to list exports for, prefixed `biz_`. Defaults to the credential's account. - -
-
- -
-
- -**resource:** `typing.Optional[ListExportsRequestResource]` — Only return exports of this resource. - -
-
- -
-
- -**status:** `typing.Optional[ListExportsRequestStatus]` — Only return exports in this status. - -
-
- -
-
- -**created_after:** `typing.Optional[str]` — Only return exports created at or after this ISO 8601 timestamp. - -
-
- -
-
- -**created_before:** `typing.Optional[str]` — Only return exports created at or before this ISO 8601 timestamp. - -
-
- -
-
- -**order:** `typing.Optional[ListExportsRequestOrder]` — The field to sort by. +**account_id:** `typing.Optional[str]` — Account to check. Defaults to the authenticated account.
@@ -23078,7 +22930,7 @@ client.exports.list()
-**direction:** `typing.Optional[ListExportsRequestDirection]` — The sort direction. +**url:** `typing.Optional[str]` — A page to check for the pixel, such as an ad destination. Events from that page settle the answer; if it hasn't sent any lately, it is fetched and its source read for the pixel and the conversion events wired on it. Omit it to check the account from its events alone.
@@ -23098,7 +22950,8 @@ client.exports.list()
-
client.exports.create(...) -> Export +## Experiences +
client.experiences.list(...) -> ListExperiencesResponse
@@ -23110,7 +22963,7 @@ client.exports.list()
-Starts an asynchronous export of a resource for an account. Returns the export in `pending`; poll `GET /exports/:id` until `download_url` is set. +Lists the experiences in an account, optionally filtered to those attached to one product or powered by one app.
@@ -23127,14 +22980,21 @@ Starts an asynchronous export of a resource for an account. Returns the export i ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +import datetime client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.exports.create( - resource="ad_campaigns", +client.experiences.list( + first=42, + last=42, + product_id="prod_xxxxxxxxxxxxx", + app_id="app_xxxxxxxxxxxxxx", + created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), + created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -23151,7 +23011,7 @@ client.exports.create(
-**resource:** `CreateExportsRequestResource` — The resource to export, e.g. `payouts`, `receipts`, or `members`. +**account_id:** `str` — The unique identifier of the company to list experiences for.
@@ -23159,7 +23019,7 @@ client.exports.create(
-**account_id:** `typing.Optional[str]` — The account to export from, prefixed `biz_`. Defaults to the credential's account. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -23167,7 +23027,7 @@ client.exports.create(
-**columns:** `typing.Optional[typing.List[str]]` — Column keys to include. Empty means all columns for the resource. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -23175,7 +23035,7 @@ client.exports.create(
-**filters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -23183,7 +23043,7 @@ client.exports.create(
-**timezone:** `typing.Optional[str]` — IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -23191,72 +23051,31 @@ client.exports.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**product_id:** `typing.Optional[str]` — Filter to only experiences attached to this product identifier.
- -
- - - - -
- -
client.exports.retrieve(...) -> Export -
-
- -#### 📝 Description
-
-
- -Fetches an export's status and, once complete, its download link. -
-
+**app_id:** `typing.Optional[str]` — Filter to only experiences powered by this app identifier. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.exports.retrieve( - id="id", -) - -``` -
-
+**created_before:** `typing.Optional[datetime.datetime]` — Only return experiences created before this timestamp. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The export ID, prefixed `exprt_`. +**created_after:** `typing.Optional[datetime.datetime]` — Only return experiences created after this timestamp.
@@ -23276,8 +23095,7 @@ client.exports.retrieve(
-## External Accounts -
client.external_accounts.list(...) -> ListExternalAccountsResponse +
client.experiences.create(...) -> Experience
@@ -23289,7 +23107,10 @@ client.exports.retrieve(
-Lists the external accounts linked to an account or user. +Creates an experience for an account, powered by an app such as courses, forums, or chat. Attach it to a product with `POST /experiences/:id/attach` to give that product's customers access. + +Required permissions: + - `experience:create`
@@ -23312,7 +23133,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.external_accounts.list() +client.experiences.create( + account_id="biz_xxxxxxxxxxxxxx", + app_id="app_xxxxxxxxxxxxxx", +) ``` @@ -23328,47 +23152,7 @@ client.external_accounts.list()
-**account_id:** `typing.Optional[str]` — The Account that the external accounts are connected to. Provide either this or user_id. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — The User that the external accounts are connected to. Provide either this or account_id. - -
-
- -
-
- -**platform:** `typing.Optional[ListExternalAccountsRequestPlatform]` — Only return external accounts for the platform that is specified. An `aimerce` account is returned only with this filter, which requires the `company:manage_checkout` scope instead of `social_account:read`. - -
-
- -
-
- -**trust_level:** `typing.Optional[ListExternalAccountsRequestTrustLevel]` — Only return external accounts linked with this trust level, such as `oauth` for accounts connected through OAuth. - -
-
- -
-
- -**verified:** `typing.Optional[bool]` — Only return external accounts that are verified on the platform. - -
-
- -
-
- -**scopes:** `typing.Optional[typing.Union[ListExternalAccountsRequestScopesItem, typing.Sequence[ListExternalAccountsRequestScopesItem]]]` — Only return external accounts that have these scopes. +**account_id:** `str` — The unique identifier of the company to create this experience for.
@@ -23376,7 +23160,7 @@ client.external_accounts.list()
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**app_id:** `str` — The unique identifier of the app that powers this experience.
@@ -23384,7 +23168,7 @@ client.external_accounts.list()
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**is_public:** `typing.Optional[bool]` — Whether the experience is publicly accessible without a membership.
@@ -23392,7 +23176,7 @@ client.external_accounts.list()
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**logo:** `typing.Optional[CreateExperiencesRequestLogo]` — A logo image displayed alongside the experience name.
@@ -23400,7 +23184,7 @@ client.external_accounts.list()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**name:** `typing.Optional[str]` — The display name of the experience. Defaults to the app's name if not provided.
@@ -23408,7 +23192,7 @@ client.external_accounts.list()
-**order:** `typing.Optional[ListExternalAccountsRequestOrder]` — The field to sort external accounts by. +**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this experience. Webhooks still fire.
@@ -23416,7 +23200,7 @@ client.external_accounts.list()
-**direction:** `typing.Optional[ListExternalAccountsRequestDirection]` — Sort direction. +**section_id:** `typing.Optional[str]` — The unique identifier of the section to place the experience in.
@@ -23436,7 +23220,7 @@ client.external_accounts.list()
-
client.external_accounts.create(...) -> ExternalAccount +
client.experiences.retrieve(...) -> Experience
@@ -23448,7 +23232,7 @@ client.external_accounts.list()
-Creates or returns a Whop-managed TikTok account for an account, or connects the account's existing Klaviyo account with a private API key. Whop no longer creates Facebook pages. +Retrieves the details of an existing experience.
@@ -23465,15 +23249,14 @@ Creates or returns a Whop-managed TikTok account for an account, or connects the ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.external_accounts import CreateExternalAccountsRequestBody_Facebook client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.external_accounts.create( - request=CreateExternalAccountsRequestBody_Facebook(), +client.experiences.retrieve( + id="exp_xxxxxxxxxxxxxx", ) ``` @@ -23490,7 +23273,7 @@ client.external_accounts.create(
-**request:** `CreateExternalAccountsRequestBody` +**id:** `str` — The unique identifier of the experience.
@@ -23510,7 +23293,7 @@ client.external_accounts.create(
-
client.external_accounts.connect(...) -> ConnectExternalAccountsResponse +
client.experiences.delete(...) -> bool
@@ -23522,7 +23305,10 @@ client.external_accounts.create(
-Starts an OAuth connection flow and returns an `authorize_url` to send the user to, where they connect an external account. Personal profile connections must be completed in a browser signed in as the Whop user who started the flow. +Deletes an experience and detaches it from every product, removing customer access to it. Returns `true` on success. + +Required permissions: + - `experience:delete`
@@ -23545,9 +23331,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.external_accounts.connect( - platform="tiktok", - redirect_url="https://whop.com/dashboard/biz_xxxxxxxxxxxxxx/settings", +client.experiences.delete( + id="exp_xxxxxxxxxxxxxx", ) ``` @@ -23564,23 +23349,7 @@ client.external_accounts.connect(
-**platform:** `ConnectExternalAccountsRequestPlatform` — The platform to connect the external account on. Use `tiktok` to connect the authenticated user’s TikTok profile, `linkedin` for their LinkedIn profile, `youtube` for their YouTube channel, or `x` for their X profile. Use `quickbooks` to connect the account’s QuickBooks Online company: pass `account_id`, and the user picks the company in QuickBooks. - -
-
- -
-
- -**redirect_url:** `str` — Where to send the user once they finish connecting their accounts. Must be an `https` URL on whop.com; any other host is rejected. On success, the user is redirected with an `external_account_connected` query param naming the platform; if the connection fails, with an `external_account_error` query param instead. The same values also arrive as `social_account_connected` / `social_account_error`. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — The Account (biz_ identifier) to connect the external account for. An account-scoped API key may omit this to default to its own account. Omit for user profile connections. +**id:** `str` — The unique identifier of the experience to delete.
@@ -23600,7 +23369,7 @@ client.external_accounts.connect(
-
client.external_accounts.delete(...) -> DeleteExternalAccountsResponse +
client.experiences.update(...) -> Experience
@@ -23612,7 +23381,10 @@ client.external_accounts.connect(
-Disconnects an external account from an account or user without deleting the underlying platform account. +Updates an experience's name, logo, visibility, or notification setting, or moves it to another section or position. + +Required permissions: + - `experience:update`
@@ -23635,8 +23407,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.external_accounts.delete( - id="id", +client.experiences.update( + id="exp_xxxxxxxxxxxxxx", ) ``` @@ -23653,7 +23425,7 @@ client.external_accounts.delete(
-**id:** `str` — The ID of the external account to disconnect. +**id:** `str` — The unique identifier of the experience to update.
@@ -23661,7 +23433,7 @@ client.external_accounts.delete(
-**account_id:** `typing.Optional[str]` — The Account that the external account is connected to. Provide either this or user_id. +**access_level:** `typing.Optional[ExperienceAccessLevels]` — The access level of the experience.
@@ -23669,7 +23441,7 @@ client.external_accounts.delete(
-**user_id:** `typing.Optional[str]` — The User that the external account is connected to. Provide either this or account_id. +**is_public:** `typing.Optional[bool]` — Whether the experience is publicly accessible without a membership.
@@ -23677,72 +23449,31 @@ client.external_accounts.delete(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**logo:** `typing.Optional[UpdateExperiencesRequestLogo]` — A logo image displayed alongside the experience name.
- -
- - - - -
- -
client.external_accounts.refresh(...) -> ExternalAccount -
-
- -#### 📝 Description - -
-
-Refreshes the state of an external account. Use it to clear an `error` that has been resolved. -
-
+**name:** `typing.Optional[str]` — The display name of the experience. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.external_accounts.refresh( - id="id", -) - -``` -
-
+**notifications_enabled:** `typing.Optional[bool]` — Whether Whop app notifications are enabled for this experience. Webhooks still fire. +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The external account (a sacc_ identifier) to refresh. +**order:** `typing.Optional[str]` — The position of the experience within its section for display ordering.
@@ -23750,7 +23481,7 @@ client.external_accounts.refresh(
-**account_id:** `typing.Optional[str]` — The Account (biz_ identifier) the external account is connected to. An account-scoped API key may omit this to default to its own account. +**section_id:** `typing.Optional[str]` — The unique identifier of the section to move the experience into.
@@ -23770,8 +23501,7 @@ client.external_accounts.refresh(
-## FeeMarkups -
client.fee_markups.list(...) -> ListFeeMarkupsResponse +
client.experiences.attach(...) -> Experience
@@ -23783,10 +23513,10 @@ client.external_accounts.refresh(
-Lists the fee markups configured for an account. For a platform account, returns the platform's default markups. +Attaches an experience to a product, giving the product's customers access to it. Required permissions: - - `company:update_child_fees` + - `experience:attach`
@@ -23809,10 +23539,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.fee_markups.list( - first=42, - last=42, - account_id="biz_xxxxxxxxxxxxxx", +client.experiences.attach( + id="exp_xxxxxxxxxxxxxx", + product_id="prod_xxxxxxxxxxxxx", ) ``` @@ -23829,31 +23558,7 @@ client.fee_markups.list(
-**account_id:** `str` — The unique identifier of the company to list fee markups for. Pass a platform account identifier to retrieve platform default markups. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**id:** `str` — The unique identifier of the experience to attach.
@@ -23861,7 +23566,7 @@ client.fee_markups.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**product_id:** `str` — The unique identifier of the product to attach the experience to.
@@ -23881,7 +23586,7 @@ client.fee_markups.list(
-
client.fee_markups.create(...) -> FeeMarkup +
client.experiences.detach(...) -> Experience
@@ -23893,10 +23598,10 @@ client.fee_markups.list(
-Creates or updates an account's markup for one fee type. If the account already has a markup for that `fee_type`, it is updated with the new values. +Detaches an experience from a product, removing customer access to it through that product. Required permissions: - - `company:update_child_fees` + - `experience:detach`
@@ -23919,9 +23624,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.fee_markups.create( - account_id="biz_xxxxxxxxxxxxxx", - fee_type="crypto_withdrawal_markup", +client.experiences.detach( + id="exp_xxxxxxxxxxxxxx", + product_id="prod_xxxxxxxxxxxxx", ) ``` @@ -23938,39 +23643,7 @@ client.fee_markups.create(
-**account_id:** `str` — The unique identifier of the company to create or update the fee markup for. - -
-
- -
-
- -**fee_type:** `FeeMarkupTypes` — The type of fee this markup applies to, such as processing or platform fees. - -
-
- -
-
- -**fixed_fee_usd:** `typing.Optional[float]` — The fixed fee amount in USD to charge per transaction. Must be between 0 and 50. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Custom key-value metadata to attach to this fee markup. - -
-
- -
-
- -**notes:** `typing.Optional[str]` — Internal notes about this fee markup for record-keeping purposes. +**id:** `str` — The unique identifier of the experience to detach.
@@ -23978,7 +23651,7 @@ client.fee_markups.create(
-**percentage_fee:** `typing.Optional[float]` — The percentage fee to charge per transaction. Must be between 0 and 25. +**product_id:** `str` — The unique identifier of the product to detach the experience from.
@@ -23998,7 +23671,7 @@ client.fee_markups.create(
-
client.fee_markups.delete(...) -> bool +
client.experiences.duplicate(...) -> Experience
@@ -24010,10 +23683,10 @@ client.fee_markups.create(
-Deletes a fee markup, removing the custom fee override so the account reverts to its parent account's default fees. +Duplicates an experience and attaches the copy to the same products as the original. Forum and chat copies keep the original's settings, such as who can post or comment. No content, such as posts, messages, or lessons, is copied. Required permissions: - - `company:update_child_fees` + - `experience:create`
@@ -24036,8 +23709,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.fee_markups.delete( - id="id", +client.experiences.duplicate( + id="exp_xxxxxxxxxxxxxx", ) ``` @@ -24054,7 +23727,15 @@ client.fee_markups.delete(
-**id:** `str` — The unique identifier of the fee markup to delete. +**id:** `str` — The unique identifier of the experience to duplicate. + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The display name for the duplicated experience. Defaults to the original experience's name.
@@ -24074,8 +23755,8 @@ client.fee_markups.delete(
-## FeedbackSubmissions -
client.feedback_submissions.create(...) -> CreateFeedbackSubmissionsResponse +## Experiments +
client.experiments.list(...) -> ListExperimentsResponse
@@ -24087,7 +23768,7 @@ client.fee_markups.delete(
-Submits an issue or an unanswered question to Whop for review, recorded under the authenticated user, account, or app. Returns a receipt once the submission is accepted; processing is asynchronous and no reply is sent. +Lists the experiments and feature flags owned by an account. Requires `experiment:read` on the account.
@@ -24110,10 +23791,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.feedback_submissions.create( - content="The docs omit the required permission", - source="mcp_report_feedback", -) +client.experiments.list() ``` @@ -24129,23 +23807,7 @@ client.feedback_submissions.create(
-**content:** `str` — The problem or question in plain text, with enough context to act on. Leave out credentials, personal data, and payment details. - -
-
- -
-
- -**source:** `CreateFeedbackSubmissionsRequestSource` — What kind of submission this is. Use api_report_feedback for an issue or api_ask_question for an unanswered question. The other values are reserved for Whop's own clients: the hosted MCP server, the Whop CLI, and Whop AI chat. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — The ID of the account the feedback is about (biz_...), if any. Recorded as context only; it does not require or grant access to that account. +**account_id:** `typing.Optional[str]` — Owning account ID.
@@ -24153,75 +23815,15 @@ client.feedback_submissions.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**related_resource:** `typing.Optional[ExperimentResourceReference]` — Filter by related resource; requires account_id. -
-
- -
- - - - -
- -## Files -
client.files.list(...) -> ListFilesResponse -
-
- -#### 📝 Description - -
-
- -
-
- -Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. For a batch larger than one page, follow `page_info` with the same `file_ids` to walk the rest. -
-
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.files.list( - file_ids=[ - "file_xxxxxxxxxxxxx" - ], -) - -``` -
-
-
-
- -#### ⚙️ Parameters - -
-
- -
-
- -**file_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. +**status:** `typing.Optional[ListExperimentsRequestStatus]` — Only experiments with this status.
@@ -24229,7 +23831,7 @@ client.files.list(
-**order:** `typing.Optional[ListFilesRequestOrder]` — The field to sort by. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -24237,7 +23839,7 @@ client.files.list(
-**direction:** `typing.Optional[ListFilesRequestDirection]` — The sort direction. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -24245,7 +23847,7 @@ client.files.list(
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -24253,7 +23855,7 @@ client.files.list(
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -24261,7 +23863,7 @@ client.files.list(
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**order:** `typing.Optional[ListExperimentsRequestOrder]` — The field to sort experiments by.
@@ -24269,7 +23871,7 @@ client.files.list(
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**direction:** `typing.Optional[ListExperimentsRequestDirection]` — Sort direction.
@@ -24289,7 +23891,7 @@ client.files.list(
-
client.files.create(...) -> File +
client.experiments.create(...) -> Experiment
@@ -24301,7 +23903,7 @@ client.files.list(
-Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. For a step-by-step walkthrough of single-part and multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads). +Creates an experiment or feature flag in `draft` status for an account. Nothing is served until you activate it with `POST /experiments/:id/activate`. Requires `experiment:manage` on the account.
@@ -24324,8 +23926,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.files.create( - filename="terms.pdf", +client.experiments.create( + account_id="biz_xxxxxxxxxxxxxx", + flag_key="checkout_redesign_v2", ) ``` @@ -24342,7 +23945,7 @@ client.files.create(
-**filename:** `str` — The name of the file including its extension, e.g. `terms.pdf`. +**account_id:** `str` — Owning account ID. Required; ownership cannot change.
@@ -24350,7 +23953,7 @@ client.files.create(
-**byte_size:** `typing.Optional[int]` — The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). +**flag_key:** `str` — Developer-chosen handle referenced from code, used in evaluation and results calls. Interchangeable with the returned `expt_` id anywhere the API takes an experiment identifier.
@@ -24358,7 +23961,7 @@ client.files.create(
-**multipart:** `typing.Optional[bool]` — Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. +**bucket_by:** `typing.Optional[CreateExperimentsRequestBucketBy]` — Randomization unit, and the only identity the assignment is keyed on — evaluation fails rather than falling back to another. `user` (default) uses `subject[user_id]`; `account` uses `subject[account_id]`, so every user of an account gets the same arm; `anonymous` uses the anonymous id and survives sign-in. Fixed after creation.
@@ -24366,7 +23969,7 @@ client.files.create(
-**visibility:** `typing.Optional[CreateFilesRequestVisibility]` — `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. +**control:** `typing.Optional[CreateExperimentsRequestControl]`
@@ -24374,72 +23977,55 @@ client.files.create(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**feature_flag_only:** `typing.Optional[bool]` — When `true`, creates a binary feature flag rather than a full experiment. Feature flags expose the same evaluation API but do not collect metric results. Defaults to `false`.
- -
+
+
+**hypothesis:** `typing.Optional[str]` — Required for full experiments; rejected on feature flags. Structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." Evidence should be something real — a baseline number, a funnel breakdown — not a guess, and [name] is you, not something to leave blank. +
-
-
client.files.retrieve(...) -> File
-#### 📝 Description - -
-
+**metadata:** `typing.Optional[typing.Dict[str, str]]` — Up to 20 key-value pairs you can attach to the experiment for your own use, such as which pages it changes. Keys are at most 40 characters and values at most 500. + +
+
-Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. -
-
+**name:** `typing.Optional[str]` — Human-readable display name. Defaults to `flag_key` when omitted. +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.files.retrieve( - id="id", -) - -``` -
-
+**related_resource:** `typing.Optional[ExperimentResourceReference]` — Resource owned by the account that this experiment is bound to, such as an app or product. `null` when unbound. Fixed once the experiment first activates. +
-#### ⚙️ Parameters -
+**targeting_rules:** `typing.Optional[typing.List[CreateExperimentsRequestTargetingRulesItem]]` — Rules that determine which subjects qualify for the experiment. + +
+
+
-**id:** `str` — The unique identifier of the file, prefixed `file_`. +**variants:** `typing.Optional[typing.List[CreateExperimentsRequestVariantsItem]]` — Treatment arms to create. Users outside every arm form the implicit `control` group. Required unless `feature_flag_only` is `true`.
@@ -24459,7 +24045,7 @@ client.files.retrieve(
-
client.files.complete(...) -> File +
client.experiments.exposures(...) -> ExposuresExperimentsResponse
@@ -24471,7 +24057,7 @@ client.files.retrieve(
-Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. For a step-by-step walkthrough of multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads). +Evaluates experiments and feature flags for a subject and records an exposure. Pass `flag_key` to evaluate one flag, or omit it to evaluate every active flag in the account and related resource scope. Requires no authentication; when a credential resolves, its authentication method, API key ID, and signed-in user ID are recorded on the exposure event.
@@ -24488,23 +24074,13 @@ Assembles the parts of a multipart upload after every part has been PUT to its p ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.files import CompleteFilesRequestMultipartPartsItem client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.files.complete( - id="id", - multipart_parts=[ - CompleteFilesRequestMultipartPartsItem( - etag="etag-1", - part_number=1, - ) - ], - multipart_upload_id="upload-id", -) +client.experiments.exposures() ``` @@ -24520,7 +24096,7 @@ client.files.complete(
-**id:** `str` — The unique identifier of the file, prefixed `file_`. +**subject:** `typing.Optional[ExposuresExperimentsRequestSubject]` — Bucketing subject: the user, account, or anonymous ID the experiment's `bucket_by` assigns on. Only the identity matching `bucket_by` is used; when it is missing, evaluating a single flag fails and a batch omits that experiment. Subjects outside every treatment range receive `control`. `subject[account_id]` also enables account-level targeting rules. Experiment ownership comes from the top-level `account_id`.
@@ -24528,7 +24104,7 @@ client.files.complete(
-**multipart_parts:** `typing.List[CompleteFilesRequestMultipartPartsItem]` — Every uploaded part, in order. +**related_resource:** `typing.Optional[ExperimentResourceReference]` — Restricts batch evaluation to this related resource; omitted batches contain only unbound experiments.
@@ -24536,7 +24112,31 @@ client.files.complete(
-**multipart_upload_id:** `str` — The ID of the multipart upload, returned by Create File. +**flag_key:** `typing.Optional[str]` — Flag or experiment to evaluate — the flag_key handle or the `expt_` id. Omit to return all flags the caller qualifies for. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Owning account ID. Required when evaluating by flag_key or in a batch; optional for an expt_ ID. + +
+
+ +
+
+ +**properties:** `typing.Optional[str]` — JSON-encoded scalar values that property targeting conditions match against. Numeric and boolean strings are coerced. Nested query keys such as properties[variant]=pro remain accepted for existing callers. + +
+
+ +
+
+ +**log_exposure:** `typing.Optional[bool]` — Set `false` to read an assignment without recording an exposure, such as when a client caches assignments up front and records the exposure when the arm is rendered. Omitted records the exposure.
@@ -24556,8 +24156,7 @@ client.files.complete(
-## FinancialActivity -
client.financial_activity.list(...) -> ListFinancialActivityResponse +
client.experiments.retrieve(...) -> Experiment
@@ -24569,7 +24168,7 @@ client.files.complete(
-Returns an account's or user's activity feed: every movement of money in or out. +Retrieves an experiment or feature flag by its `expt_` ID or `flag_key` handle. Requires `experiment:read` on the owning account.
@@ -24592,7 +24191,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.financial_activity.list() +client.experiments.retrieve( + id="id", +) ``` @@ -24608,7 +24209,7 @@ client.financial_activity.list()
-**account_id:** `typing.Optional[str]` — The owning account ID (a biz_ identifier). Provide this or user_id. +**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle.
@@ -24616,7 +24217,7 @@ client.financial_activity.list()
-**user_id:** `typing.Optional[str]` — The owning user ID (a user_ identifier). Provide this or account_id. +**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID.
@@ -24624,87 +24225,72 @@ client.financial_activity.list()
-**include_owned_accounts:** `typing.Optional[bool]` — When true, aggregates the authenticated user's personal ledger with the businesses they own (owner role with balance read) into one feed. Requires user_id to be the authenticated user; cannot be combined with account_id or the settlement-date filters. Each returned row includes the owning `account`. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
- -
-
- -**include_resource:** `typing.Optional[bool]` — Whether to include the `resource` field in the response or not. Consider passing `false` if you need a fast response without as many rich details. -
-
-
-**line_types:** `typing.Optional[typing.Union[ListFinancialActivityRequestLineTypesItem, typing.Sequence[ListFinancialActivityRequestLineTypesItem]]]` — Optional ledger line categories to include. Some categories (for example `onchain_deposit`, which covers inbound crypto deposits such as MoonPay onramps) are only returned when explicitly requested here. -
+
+
client.experiments.update(...) -> Experiment
-**direction:** `typing.Optional[ListFinancialActivityRequestDirection]` — Optional direction filter. `money_in` returns positive activity and `money_out` returns negative activity. - -
-
+#### 📝 Description
-**resource_id:** `typing.Optional[str]` — Optional prefixed resource ID. Returns activity associated with that resource. - -
-
-
-**payment_id:** `typing.Optional[str]` — Filter activity by payment ID (pay_), including related refunds, disputes, and fees. Combines with resource_id and other filters within the selected accounts. Unknown payments return an empty list. - +Updates the targeting rules, treatment allocation, or hypothesis of an existing experiment or feature flag. To change its lifecycle, use the `activate`, `pause`, and `end` endpoints instead. Requires `experiment:manage` on the owning account.
- -
-
- -**activity_id:** `typing.Optional[str]` — Optional ledger activity ID (for example `line_3`). Returns at most that one activity. -
+#### 🔌 Usage +
-**exclude_internal_movements:** `typing.Optional[bool]` — Whether to exclude balance reservations and balanced movements between the account's own balances. - -
-
-
-**balance_type:** `typing.Optional[ListFinancialActivityRequestBalanceType]` — Which balance the activity changes. `total` includes available, pending, and reserved funds. `available` includes only movements into or out of available funds, including reservations, releases, and fees. Movements within the selected balance are omitted. Omit to preserve the existing activity feed. Requires account_id or user_id; cannot be combined with available_after or available_before. - +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.experiments.update( + id="id", +) + +```
+ + + +#### ⚙️ Parameters
-**withdrawal_id:** `typing.Optional[str]` — Withdrawal ID (wdrl_). With balance_type=available, selects the same period as its statement, after the previous withdrawal and through this withdrawal, excluding this withdrawal and its fee. Requires a single account. Overrides currency and posted-date filters. - -
-
-
-**currency:** `typing.Optional[str]` — Optional currency code filter, for example `usd`. +**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle.
@@ -24712,7 +24298,7 @@ client.financial_activity.list()
-**posted_after:** `typing.Optional[datetime.datetime]` — Only include rows posted after this ISO 8601 timestamp. +**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID.
@@ -24720,7 +24306,7 @@ client.financial_activity.list()
-**posted_before:** `typing.Optional[datetime.datetime]` — Only include rows posted before this ISO 8601 timestamp. +**control:** `typing.Optional[UpdateExperimentsRequestControl]`
@@ -24728,7 +24314,7 @@ client.financial_activity.list()
-**available_after:** `typing.Optional[datetime.date]` — Only include balance credits and debits available on or after this `YYYY-MM-DD` date (UTC), distinct from posted_at. Requires currency. +**hypothesis:** `typing.Optional[str]` — Omit to leave unchanged. Send an empty string to clear it. Not accepted on feature flags. When setting it, structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." same as on create.
@@ -24736,7 +24322,7 @@ client.financial_activity.list()
-**available_before:** `typing.Optional[datetime.date]` — Only include balance credits and debits available on or before this `YYYY-MM-DD` date (UTC). Set equal to available_after for a single day. Requires currency. +**related_resource:** `typing.Optional[ExperimentResourceReference]` — Resource owned by the account that this experiment is bound to, such as an app or product. `null` when unbound. Fixed once the experiment first activates.
@@ -24744,7 +24330,7 @@ client.financial_activity.list()
-**limit:** `typing.Optional[int]` — Maximum number of rows to return. +**targeting_rules:** `typing.Optional[typing.List[UpdateExperimentsRequestTargetingRulesItem]]` — Replace the targeting rules with this set. Omit to leave unchanged.
@@ -24752,7 +24338,7 @@ client.financial_activity.list()
-**cursor:** `typing.Optional[str]` — Cursor returned by the previous page. +**variants:** `typing.Optional[typing.List[UpdateExperimentsRequestVariantsItem]]` — Grow treatment allocation. Pass every existing treatment with an equal-or-higher weight; append new names to add arms. Weights never decrease and arms are never removed. Omit to leave unchanged.
@@ -24772,8 +24358,7 @@ client.financial_activity.list()
-## FinancialReports -
client.financial_reports.retrieve(...) -> RetrieveFinancialReportsResponse +
client.experiments.activate(...) -> Experiment
@@ -24785,7 +24370,2070 @@ client.financial_activity.list()
-Returns a financial report — balance activity, income statement, or balance summary — for an account over a date range. +Starts (or resumes) an experiment or feature flag so evaluation begins serving it. Activating a draft stamps `started_at`; resuming a paused experiment keeps the original start. Only drafts and paused experiments can be activated. Requires `experiment:manage` on the owning account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.experiments.activate( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. + +
+
+ +
+
+ +**duration_days:** `typing.Optional[int]` — Reporting window length in days. Omit to use the default. This does not automatically end the experiment. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.experiments.end(...) -> Experiment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Concludes the experiment and records required `findings`. Pass `winning_arm` to serve the winning treatment to everyone; omit it when control won. Ended experiments cannot restart, but may be ended again to correct the winner. Requires `experiment:manage` on the owning account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.experiments.end( + id="id", + findings="Treatment lifted signups 12%, shipping it to everyone.", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. + +
+
+ +
+
+ +**findings:** `str` — What you learned and why you chose this outcome. Required. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. + +
+
+ +
+
+ +**winning_arm:** `typing.Optional[str]` — The treatment that won. Setting it rolls that arm out: every later evaluation returns it to every caller, ignoring targeting and allocation, and exposures stop being recorded. Omit it when control won — an ended experiment with no winning arm evaluates to `control` for everyone, so ending again without one also reverts a rollout recorded by mistake. Not accepted on feature flags, which evaluate to disabled once ended. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.experiments.pause(...) -> Experiment +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Pauses an active experiment or feature flag: evaluation stops serving it and exposures stop flowing. Assignments are keyed on stable identity, so users return to their original arm when the experiment resumes. Requires `experiment:manage` on the owning account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.experiments.pause( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The experiment identifier — the `expt_` id or the flag_key handle. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Owning account ID. Required when id is a flag key; optional for an expt_ ID. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Exports +
client.exports.list(...) -> ListExportsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists the exports requested for an account, newest first. Only exports of resources the credential is allowed to export are returned. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.exports.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The account to list exports for, prefixed `biz_`. Defaults to the credential's account. + +
+
+ +
+
+ +**resource:** `typing.Optional[ListExportsRequestResource]` — Only return exports of this resource. + +
+
+ +
+
+ +**status:** `typing.Optional[ListExportsRequestStatus]` — Only return exports in this status. + +
+
+ +
+
+ +**created_after:** `typing.Optional[str]` — Only return exports created at or after this ISO 8601 timestamp. + +
+
+ +
+
+ +**created_before:** `typing.Optional[str]` — Only return exports created at or before this ISO 8601 timestamp. + +
+
+ +
+
+ +**order:** `typing.Optional[ListExportsRequestOrder]` — The field to sort by. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListExportsRequestDirection]` — The sort direction. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.exports.create(...) -> Export +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Starts an asynchronous export of a resource for an account. Returns the export in `pending`; poll `GET /exports/:id` until `download_url` is set. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.exports.create( + resource="ad_campaigns", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**resource:** `CreateExportsRequestResource` — The resource to export, e.g. `payouts`, `receipts`, or `members`. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The account to export from, prefixed `biz_`. Defaults to the credential's account. + +
+
+ +
+
+ +**columns:** `typing.Optional[typing.List[str]]` — Column keys to include. Empty means all columns for the resource. + +
+
+ +
+
+ +**filters:** `typing.Optional[typing.Dict[str, typing.Any]]` — Resource-specific filters. For native REST resources (`payouts`, `transfers`, `products`) these are the resource's own list query params; for dashboard tables they mirror the dashboard table filters. + +
+
+ +
+
+ +**timezone:** `typing.Optional[str]` — IANA timezone for date columns, e.g. `America/New_York`. Defaults to `UTC`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.exports.retrieve(...) -> Export +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Fetches an export's status and, once complete, its download link. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.exports.retrieve( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The export ID, prefixed `exprt_`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## External Accounts +
client.external_accounts.list(...) -> ListExternalAccountsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists the external accounts linked to an account or user. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.external_accounts.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The Account that the external accounts are connected to. Provide either this or user_id. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — The User that the external accounts are connected to. Provide either this or account_id. + +
+
+ +
+
+ +**platform:** `typing.Optional[ListExternalAccountsRequestPlatform]` — Only return external accounts for the platform that is specified. An `aimerce` account is returned only with this filter, which requires the `company:manage_checkout` scope instead of `social_account:read`. + +
+
+ +
+
+ +**trust_level:** `typing.Optional[ListExternalAccountsRequestTrustLevel]` — Only return external accounts linked with this trust level, such as `oauth` for accounts connected through OAuth. + +
+
+ +
+
+ +**verified:** `typing.Optional[bool]` — Only return external accounts that are verified on the platform. + +
+
+ +
+
+ +**scopes:** `typing.Optional[typing.Union[ListExternalAccountsRequestScopesItem, typing.Sequence[ListExternalAccountsRequestScopesItem]]]` — Only return external accounts that have these scopes. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of results to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + +
+
+ +
+
+ +**order:** `typing.Optional[ListExternalAccountsRequestOrder]` — The field to sort external accounts by. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListExternalAccountsRequestDirection]` — Sort direction. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.external_accounts.create(...) -> ExternalAccount +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates or returns a Whop-managed TikTok account for an account, or connects the account's existing Klaviyo account with a private API key. Whop no longer creates Facebook pages. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.external_accounts import CreateExternalAccountsRequestBody_Facebook + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.external_accounts.create( + request=CreateExternalAccountsRequestBody_Facebook(), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `CreateExternalAccountsRequestBody` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.external_accounts.connect(...) -> ConnectExternalAccountsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Starts an OAuth connection flow and returns an `authorize_url` to send the user to, where they connect an external account. Personal profile connections must be completed in a browser signed in as the Whop user who started the flow. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.external_accounts.connect( + platform="tiktok", + redirect_url="https://whop.com/dashboard/biz_xxxxxxxxxxxxxx/settings", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**platform:** `ConnectExternalAccountsRequestPlatform` — The platform to connect the external account on. Use `tiktok` to connect the authenticated user’s TikTok profile, `linkedin` for their LinkedIn profile, `youtube` for their YouTube channel, or `x` for their X profile. Use `quickbooks` to connect the account’s QuickBooks Online company: pass `account_id`, and the user picks the company in QuickBooks. + +
+
+ +
+
+ +**redirect_url:** `str` — Where to send the user once they finish connecting their accounts. Must be an `https` URL on whop.com; any other host is rejected. On success, the user is redirected with an `external_account_connected` query param naming the platform; if the connection fails, with an `external_account_error` query param instead. The same values also arrive as `social_account_connected` / `social_account_error`. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The Account (biz_ identifier) to connect the external account for. An account-scoped API key may omit this to default to its own account. Omit for user profile connections. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.external_accounts.delete(...) -> DeleteExternalAccountsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Disconnects an external account from an account or user without deleting the underlying platform account. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.external_accounts.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The ID of the external account to disconnect. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The Account that the external account is connected to. Provide either this or user_id. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — The User that the external account is connected to. Provide either this or account_id. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.external_accounts.refresh(...) -> ExternalAccount +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Refreshes the state of an external account. Use it to clear an `error` that has been resolved. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.external_accounts.refresh( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The external account (a sacc_ identifier) to refresh. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The Account (biz_ identifier) the external account is connected to. An account-scoped API key may omit this to default to its own account. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## FeeMarkups +
client.fee_markups.list(...) -> ListFeeMarkupsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists the fee markups configured for an account. For a platform account, returns the platform's default markups. + +Required permissions: + - `company:update_child_fees` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.fee_markups.list( + first=42, + last=42, + account_id="biz_xxxxxxxxxxxxxx", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `str` — The unique identifier of the company to list fee markups for. Pass a platform account identifier to retrieve platform default markups. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.fee_markups.create(...) -> FeeMarkup +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates or updates an account's markup for one fee type. If the account already has a markup for that `fee_type`, it is updated with the new values. + +Required permissions: + - `company:update_child_fees` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.fee_markups.create( + account_id="biz_xxxxxxxxxxxxxx", + fee_type="crypto_withdrawal_markup", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `str` — The unique identifier of the company to create or update the fee markup for. + +
+
+ +
+
+ +**fee_type:** `FeeMarkupTypes` — The type of fee this markup applies to, such as processing or platform fees. + +
+
+ +
+
+ +**fixed_fee_usd:** `typing.Optional[float]` — The fixed fee amount in USD to charge per transaction. Must be between 0 and 50. + +
+
+ +
+
+ +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Custom key-value metadata to attach to this fee markup. + +
+
+ +
+
+ +**notes:** `typing.Optional[str]` — Internal notes about this fee markup for record-keeping purposes. + +
+
+ +
+
+ +**percentage_fee:** `typing.Optional[float]` — The percentage fee to charge per transaction. Must be between 0 and 25. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.fee_markups.delete(...) -> bool +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Deletes a fee markup, removing the custom fee override so the account reverts to its parent account's default fees. + +Required permissions: + - `company:update_child_fees` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.fee_markups.delete( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The unique identifier of the fee markup to delete. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## FeedbackSubmissions +
client.feedback_submissions.create(...) -> CreateFeedbackSubmissionsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submits an issue or an unanswered question to Whop for review, recorded under the authenticated user, account, or app. Returns a receipt once the submission is accepted; processing is asynchronous and no reply is sent. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.feedback_submissions.create( + content="The docs omit the required permission", + source="mcp_report_feedback", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**content:** `str` — The problem or question in plain text, with enough context to act on. Leave out credentials, personal data, and payment details. + +
+
+ +
+
+ +**source:** `CreateFeedbackSubmissionsRequestSource` — What kind of submission this is. Use api_report_feedback for an issue or api_ask_question for an unanswered question. The other values are reserved for Whop's own clients: the hosted MCP server, the Whop CLI, and Whop AI chat. + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The ID of the account the feedback is about (biz_...), if any. Recorded as context only; it does not require or grant access to that account. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## Files +
client.files.list(...) -> ListFilesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns the files with the given IDs, newest first — fetch a batch in one request instead of retrieving each file individually. Only files you created are returned; IDs that do not exist, or that another credential created, are omitted. For a batch larger than one page, follow `page_info` with the same `file_ids` to walk the rest. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.files.list( + file_ids=[ + "file_xxxxxxxxxxxxx" + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**file_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — The files to return, each prefixed `file_`. Repeat the parameter to pass several, up to 250 per request. Batches of up to 100 answer in one page by default; larger batches page at up to 100 per response. + +
+
+ +
+
+ +**order:** `typing.Optional[ListFilesRequestOrder]` — The field to sort by. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListFilesRequestDirection]` — The sort direction. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of results to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.create(...) -> File +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a file and returns a presigned destination to upload its bytes to. PUT the bytes to `upload_url` (single-part), or to each of `multipart_upload_urls` and then call Complete File Multipart Upload. Once the bytes land the file becomes `ready`, and its ID can be attached wherever a file is accepted — account legal documents, dispute evidence documents. For a step-by-step walkthrough of single-part and multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.files.create( + filename="terms.pdf", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**filename:** `str` — The name of the file including its extension, e.g. `terms.pdf`. + +
+
+ +
+
+ +**byte_size:** `typing.Optional[int]` — The file's size in bytes. Required when `multipart` is `true`. Multipart uploads support at most 10,000 parts of 5MB each (about 50 GB). + +
+
+ +
+
+ +**multipart:** `typing.Optional[bool]` — Upload the file in 5MB parts. Required for files larger than 5GB; useful above ~100MB. The file must be larger than 5MB. + +
+
+ +
+
+ +**visibility:** `typing.Optional[CreateFilesRequestVisibility]` — `public` files are served via an unsigned CDN URL — use for assets anyone may see. `private` files are served via a signed, expiring URL — use for sensitive documents. Defaults to `private`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.retrieve(...) -> File +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a file you uploaded — poll it after uploading the bytes to see `upload_status` become `ready`. Only the creator can retrieve a file this way; a file attached to another resource is read through that resource. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.files.retrieve( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.files.complete(...) -> File +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Assembles the parts of a multipart upload after every part has been PUT to its presigned URL. Pass the `multipart_upload_id` from Create File and each part's `ETag` response header. For a step-by-step walkthrough of multipart uploads, see the [direct file uploads guide](/developer/guides/direct-file-uploads). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.files import CompleteFilesRequestMultipartPartsItem + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.files.complete( + id="id", + multipart_parts=[ + CompleteFilesRequestMultipartPartsItem( + etag="etag-1", + part_number=1, + ) + ], + multipart_upload_id="upload-id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The unique identifier of the file, prefixed `file_`. + +
+
+ +
+
+ +**multipart_parts:** `typing.List[CompleteFilesRequestMultipartPartsItem]` — Every uploaded part, in order. + +
+
+ +
+
+ +**multipart_upload_id:** `str` — The ID of the multipart upload, returned by Create File. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## FinancialActivity +
client.financial_activity.list(...) -> ListFinancialActivityResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns an account's or user's activity feed: every movement of money in or out. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.financial_activity.list() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — The owning account ID (a biz_ identifier). Provide this or user_id. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — The owning user ID (a user_ identifier). Provide this or account_id. + +
+
+ +
+
+ +**include_owned_accounts:** `typing.Optional[bool]` — When true, aggregates the authenticated user's personal ledger with the businesses they own (owner role with balance read) into one feed. Requires user_id to be the authenticated user; cannot be combined with account_id or the settlement-date filters. Each returned row includes the owning `account`. + +
+
+ +
+
+ +**include_resource:** `typing.Optional[bool]` — Whether to include the `resource` field in the response or not. Consider passing `false` if you need a fast response without as many rich details. + +
+
+ +
+
+ +**line_types:** `typing.Optional[typing.Union[ListFinancialActivityRequestLineTypesItem, typing.Sequence[ListFinancialActivityRequestLineTypesItem]]]` — Optional ledger line categories to include. Some categories (for example `onchain_deposit`, which covers inbound crypto deposits such as MoonPay onramps) are only returned when explicitly requested here. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListFinancialActivityRequestDirection]` — Optional direction filter. `money_in` returns positive activity and `money_out` returns negative activity. + +
+
+ +
+
+ +**resource_id:** `typing.Optional[str]` — Optional prefixed resource ID. Returns activity associated with that resource. + +
+
+ +
+
+ +**payment_id:** `typing.Optional[str]` — Filter activity by payment ID (pay_), including related refunds, disputes, and fees. Combines with resource_id and other filters within the selected accounts. Unknown payments return an empty list. + +
+
+ +
+
+ +**activity_id:** `typing.Optional[str]` — Optional ledger activity ID (for example `line_3`). Returns at most that one activity. + +
+
+ +
+
+ +**exclude_internal_movements:** `typing.Optional[bool]` — Whether to exclude balance reservations and balanced movements between the account's own balances. + +
+
+ +
+
+ +**balance_type:** `typing.Optional[ListFinancialActivityRequestBalanceType]` — Which balance the activity changes. `total` includes available, pending, and reserved funds. `available` includes only movements into or out of available funds, including reservations, releases, and fees. Movements within the selected balance are omitted. Omit to preserve the existing activity feed. Requires account_id or user_id; cannot be combined with available_after or available_before. + +
+
+ +
+
+ +**withdrawal_id:** `typing.Optional[str]` — Withdrawal ID (wdrl_). With balance_type=available, selects the same period as its statement, after the previous withdrawal and through this withdrawal, excluding this withdrawal and its fee. Requires a single account. Overrides currency and posted-date filters. + +
+
+ +
+
+ +**currency:** `typing.Optional[str]` — Optional currency code filter, for example `usd`. + +
+
+ +
+
+ +**posted_after:** `typing.Optional[datetime.datetime]` — Only include rows posted after this ISO 8601 timestamp. + +
+
+ +
+
+ +**posted_before:** `typing.Optional[datetime.datetime]` — Only include rows posted before this ISO 8601 timestamp. + +
+
+ +
+
+ +**available_after:** `typing.Optional[datetime.date]` — Only include balance credits and debits available on or after this `YYYY-MM-DD` date (UTC), distinct from posted_at. Requires currency. + +
+
+ +
+
+ +**available_before:** `typing.Optional[datetime.date]` — Only include balance credits and debits available on or before this `YYYY-MM-DD` date (UTC). Set equal to available_after for a single day. Requires currency. + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Maximum number of rows to return. + +
+
+ +
+
+ +**cursor:** `typing.Optional[str]` — Cursor returned by the previous page. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## FinancialReports +
client.financial_reports.retrieve(...) -> RetrieveFinancialReportsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a financial report — balance activity, income statement, or balance summary — for an account over a date range.
@@ -25201,8 +26849,392 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.financing_applications.retrieve( - id="id", +client.financing_applications.retrieve( + id="id", +) + +``` +
+
+ + + +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Financing application ID, prefixed `inrq_`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.financing_applications.update(...) -> FinancingApplication +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Saves merchant answers to an application in `requires_collection`. The batch is atomic: if any answer is rejected, none are saved. Omitted requirements and answer fields are left unchanged. Saving answers does not submit the application; call Submit Financing Application when it is complete. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.financing_applications import UpdateFinancingApplicationsRequestAnswersItem + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.financing_applications.update( + id="id", + answers=[ + UpdateFinancingApplicationsRequestAnswersItem( + requirement_id="inrqi_xxxxxxxxxxxxxx", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Financing application ID, prefixed `inrq_`. + +
+
+ +
+
+ +**answers:** `typing.List[UpdateFinancingApplicationsRequestAnswersItem]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.financing_applications.submit(...) -> FinancingApplication +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Submits a complete application for financing review, recording the merchant's acceptance, who submitted, and when, then moving it to `awaiting_review`. Before calling, present the application's `terms.content`, policies, and disclosure to the merchant and collect affirmative acceptance; every resubmission needs acceptance again. Only an application in `requires_collection` can be submitted, including after a reviewer requests more information. Retry with the same `Idempotency-Key`: submitting an application already in review without a replay returns an error. Approval does not by itself enable financing payment methods. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment +from whop_sdk.financing_applications import SubmitFinancingApplicationsRequestMerchantAcceptance + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.financing_applications.submit( + id="id", + merchant_acceptance=SubmitFinancingApplicationsRequestMerchantAcceptance( + accepted=True, + terms_version="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + ), +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Financing application ID, prefixed `inrq_`. + +
+
+ +
+
+ +**merchant_acceptance:** `SubmitFinancingApplicationsRequestMerchantAcceptance` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## ForumPosts +
client.forum_posts.list(...) -> ListForumPostsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Returns a paginated list of forum posts within a specific experience, with optional filtering by parent post or pinned status. + +Required permissions: + - `forum:read` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.forum_posts.list( + first=42, + last=42, + experience_id="exp_xxxxxxxxxxxxxx", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**experience_id:** `str` — The unique identifier of the experience to list forum posts for. + +
+
+ +
+
+ +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. + +
+
+ +
+
+ +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. + +
+
+ +
+
+ +**include_bounty_anchors:** `typing.Optional[bool]` — Whether to include top-level bounty discussion anchors as rich forum items. + +
+
+ +
+
+ +**parent_id:** `typing.Optional[str]` — The unique identifier of a parent post to list comments for. When set, returns replies to that post. + +
+
+ +
+
+ +**pinned:** `typing.Optional[bool]` — Whether to filter for only pinned posts. Set to true to return only pinned posts. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.forum_posts.create(...) -> ForumPost +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. + +Required permissions: + - `forum:post:create` +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.forum_posts.create( + experience_id="exp_xxxxxxxxxxxxxx", ) ``` @@ -25219,7 +27251,7 @@ client.financing_applications.retrieve(
-**id:** `str` — Financing application ID, prefixed `inrq_`. +**experience_id:** `str` — The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with account_id to automatically use the account's public forum.
@@ -25227,78 +27259,87 @@ client.financing_applications.retrieve(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**account_id:** `typing.Optional[str]` — The unique identifier of the company whose public forum to post in. Required when experience_id is 'public'. For example, 'biz_xxxxx'.
-
-
+
+
+**attachments:** `typing.Optional[typing.List[CreateForumPostsRequestAttachmentsItem]]` — A list of file attachments to include with the post, such as images or videos. +
-
-
client.financing_applications.update(...) -> FinancingApplication
-#### 📝 Description +**content:** `typing.Optional[str]` — 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. + +
+
+**is_mention:** `typing.Optional[bool]` — Whether to send this post as a mention notification to all users in the experience who have mentions enabled. + +
+
+
-Saves merchant answers to an application in `requires_collection`. The batch is atomic: if any answer is rejected, none are saved. Omitted requirements and answer fields are left unchanged. Saving answers does not submit the application; call Submit Financing Application when it is complete. -
-
+**parent_id:** `typing.Optional[str]` — The unique identifier of the parent post to comment on. Omit this field to create a top-level post. + -#### 🔌 Usage -
+**paywall_amount:** `typing.Optional[float]` — 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. + +
+
+
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment -from whop_sdk.financing_applications import UpdateFinancingApplicationsRequestAnswersItem - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) +**paywall_currency:** `typing.Optional[Currencies]` — The currency for the paywall price on this post. When set along with paywall_amount, users must purchase access to view the post content. + +
+
-client.financing_applications.update( - id="id", - answers=[ - UpdateFinancingApplicationsRequestAnswersItem( - requirement_id="inrqi_xxxxxxxxxxxxxx", - ) - ], -) +
+
-``` +**pinned:** `typing.Optional[bool]` — Whether this post should be pinned to the top of the forum. +
+ +
+
+ +**poll:** `typing.Optional[CreateForumPostsRequestPoll]` — A poll to attach to this post, allowing members to vote on options. +
-#### ⚙️ Parameters -
+**rich_content:** `typing.Optional[str]` — The rich content of the post in Tiptap JSON format. When provided, takes priority over the markdown content field for rendering. + +
+
+
-**id:** `str` — Financing application ID, prefixed `inrq_`. +**title:** `typing.Optional[str]` — The title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.
@@ -25306,7 +27347,7 @@ client.financing_applications.update(
-**answers:** `typing.List[UpdateFinancingApplicationsRequestAnswersItem]` +**visibility:** `typing.Optional[ForumPostVisibilityTypes]` — Controls who can see this forum post, such as members only or public.
@@ -25326,7 +27367,7 @@ client.financing_applications.update(
-
client.financing_applications.submit(...) -> FinancingApplication +
client.forum_posts.retrieve(...) -> ForumPost
@@ -25338,7 +27379,10 @@ client.financing_applications.update(
-Submits a complete application for financing review, recording the merchant's acceptance, who submitted, and when, then moving it to `awaiting_review`. Before calling, present the application's `terms.content`, policies, and disclosure to the merchant and collect affirmative acceptance; every resubmission needs acceptance again. Only an application in `requires_collection` can be submitted, including after a reviewer requests more information. Retry with the same `Idempotency-Key`: submitting an application already in review without a replay returns an error. Approval does not by itself enable financing payment methods. +Retrieves the details of an existing forum post. + +Required permissions: + - `forum:read`
@@ -25355,19 +27399,14 @@ Submits a complete application for financing review, recording the merchant's ac ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.financing_applications import SubmitFinancingApplicationsRequestMerchantAcceptance client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.financing_applications.submit( +client.forum_posts.retrieve( id="id", - merchant_acceptance=SubmitFinancingApplicationsRequestMerchantAcceptance( - accepted=True, - terms_version="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", - ), ) ``` @@ -25384,15 +27423,7 @@ client.financing_applications.submit(
-**id:** `str` — Financing application ID, prefixed `inrq_`. - -
-
- -
-
- -**merchant_acceptance:** `SubmitFinancingApplicationsRequestMerchantAcceptance` +**id:** `str` — The unique identifier of the forum post to retrieve.
@@ -25412,8 +27443,7 @@ client.financing_applications.submit(
-## ForumPosts -
client.forum_posts.list(...) -> ListForumPostsResponse +
client.forum_posts.update(...) -> ForumPost
@@ -25425,10 +27455,7 @@ client.financing_applications.submit(
-Returns a paginated list of forum posts within a specific experience, with optional filtering by parent post or pinned status. - -Required permissions: - - `forum:read` +Edit the content, attachments, pinned status, or visibility of an existing forum post or comment.
@@ -25451,10 +27478,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forum_posts.list( - first=42, - last=42, - experience_id="exp_xxxxxxxxxxxxxx", +client.forum_posts.update( + id="id", ) ``` @@ -25471,23 +27496,7 @@ client.forum_posts.list(
-**experience_id:** `str` — The unique identifier of the experience to list forum posts for. - -
-
- -
-
- -**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**id:** `str` — The unique identifier of the forum post to update.
@@ -25495,7 +27504,7 @@ client.forum_posts.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**attachments:** `typing.Optional[typing.List[UpdateForumPostsRequestAttachmentsItem]]` — A replacement list of file attachments for this post, such as images or videos.
@@ -25503,7 +27512,7 @@ client.forum_posts.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**content:** `typing.Optional[str]` — 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.
@@ -25511,7 +27520,7 @@ client.forum_posts.list(
-**include_bounty_anchors:** `typing.Optional[bool]` — Whether to include top-level bounty discussion anchors as rich forum items. +**is_pinned:** `typing.Optional[bool]` — Whether this post should be pinned to the top of the forum. Only top-level posts can be pinned, not comments.
@@ -25519,7 +27528,7 @@ client.forum_posts.list(
-**parent_id:** `typing.Optional[str]` — The unique identifier of a parent post to list comments for. When set, returns replies to that post. +**title:** `typing.Optional[str]` — The updated title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers.
@@ -25527,7 +27536,7 @@ client.forum_posts.list(
-**pinned:** `typing.Optional[bool]` — Whether to filter for only pinned posts. Set to true to return only pinned posts. +**visibility:** `typing.Optional[ForumPostVisibilityTypes]` — Controls who can see this forum post, such as members only or public.
@@ -25547,7 +27556,8 @@ client.forum_posts.list(
-
client.forum_posts.create(...) -> ForumPost +## Forums +
client.forums.list(...) -> ListForumsResponse
@@ -25559,10 +27569,10 @@ client.forum_posts.list(
-Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. +Returns a paginated list of forums for an account, with optional filtering by product. Required permissions: - - `forum:post:create` + - `forum:read`
@@ -25585,8 +27595,11 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forum_posts.create( - experience_id="exp_xxxxxxxxxxxxxx", +client.forums.list( + first=42, + last=42, + product_id="prod_xxxxxxxxxxxxx", + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -25603,63 +27616,7 @@ client.forum_posts.create(
-**experience_id:** `str` — The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with account_id to automatically use the account's public forum. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — The unique identifier of the company whose public forum to post in. Required when experience_id is 'public'. For example, 'biz_xxxxx'. - -
-
- -
-
- -**attachments:** `typing.Optional[typing.List[CreateForumPostsRequestAttachmentsItem]]` — A list of file attachments to include with the post, such as images or videos. - -
-
- -
-
- -**content:** `typing.Optional[str]` — 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. - -
-
- -
-
- -**is_mention:** `typing.Optional[bool]` — Whether to send this post as a mention notification to all users in the experience who have mentions enabled. - -
-
- -
-
- -**parent_id:** `typing.Optional[str]` — The unique identifier of the parent post to comment on. Omit this field to create a top-level post. - -
-
- -
-
- -**paywall_amount:** `typing.Optional[float]` — 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. - -
-
- -
-
- -**paywall_currency:** `typing.Optional[Currencies]` — The currency for the paywall price on this post. When set along with paywall_amount, users must purchase access to view the post content. +**account_id:** `str` — The unique identifier of the company to list forums for.
@@ -25667,7 +27624,7 @@ client.forum_posts.create(
-**pinned:** `typing.Optional[bool]` — Whether this post should be pinned to the top of the forum. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -25675,7 +27632,7 @@ client.forum_posts.create(
-**poll:** `typing.Optional[CreateForumPostsRequestPoll]` — A poll to attach to this post, allowing members to vote on options. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -25683,7 +27640,7 @@ client.forum_posts.create(
-**rich_content:** `typing.Optional[str]` — The rich content of the post in Tiptap JSON format. When provided, takes priority over the markdown content field for rendering. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -25691,7 +27648,7 @@ client.forum_posts.create(
-**title:** `typing.Optional[str]` — The title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -25699,7 +27656,7 @@ client.forum_posts.create(
-**visibility:** `typing.Optional[ForumPostVisibilityTypes]` — Controls who can see this forum post, such as members only or public. +**product_id:** `typing.Optional[str]` — The unique identifier of a product to filter by. When set, only forums connected to this product are returned.
@@ -25719,7 +27676,7 @@ client.forum_posts.create(
-
client.forum_posts.retrieve(...) -> ForumPost +
client.forums.retrieve(...) -> Forum
@@ -25731,7 +27688,7 @@ client.forum_posts.create(
-Retrieves the details of an existing forum post. +Retrieves the details of an existing forum. Required permissions: - `forum:read` @@ -25757,7 +27714,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forum_posts.retrieve( +client.forums.retrieve( id="id", ) @@ -25775,7 +27732,7 @@ client.forum_posts.retrieve(
-**id:** `str` — The unique identifier of the forum post to retrieve. +**id:** `str` — The unique identifier of the forum or experience to retrieve.
@@ -25795,7 +27752,7 @@ client.forum_posts.retrieve(
-
client.forum_posts.update(...) -> ForumPost +
client.forums.update(...) -> Forum
@@ -25807,7 +27764,10 @@ client.forum_posts.retrieve(
-Edit the content, attachments, pinned status, or visibility of an existing forum post or comment. +Update moderation and notification settings for a forum, such as who can post, who can comment, and email notification preferences. + +Required permissions: + - `forum:moderate`
@@ -25830,7 +27790,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forum_posts.update( +client.forums.update( id="id", ) @@ -25848,7 +27808,7 @@ client.forum_posts.update(
-**id:** `str` — The unique identifier of the forum post to update. +**id:** `str` — The unique identifier of the forum to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a forum ID.
@@ -25856,7 +27816,7 @@ client.forum_posts.update(
-**attachments:** `typing.Optional[typing.List[UpdateForumPostsRequestAttachmentsItem]]` — A replacement list of file attachments for this post, such as images or videos. +**banned_words:** `typing.Optional[typing.List[str]]` — A list of words that are automatically blocked from posts in this forum. For example, ['spam', 'scam'].
@@ -25864,7 +27824,7 @@ client.forum_posts.update(
-**content:** `typing.Optional[str]` — 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. +**banner_image:** `typing.Optional[UpdateForumsRequestBannerImage]` — The banner image displayed at the top of the forum page. Pass null to remove the existing banner.
@@ -25872,7 +27832,7 @@ client.forum_posts.update(
-**is_pinned:** `typing.Optional[bool]` — Whether this post should be pinned to the top of the forum. Only top-level posts can be pinned, not comments. +**email_notification_preference:** `typing.Optional[ForumEmailNotificationPreferences]` — Controls how email notifications are sent to members when new posts are created in this forum.
@@ -25880,7 +27840,7 @@ client.forum_posts.update(
-**title:** `typing.Optional[str]` — The updated title of the post, displayed prominently at the top. Required for paywalled posts as it remains visible to non-purchasers. +**who_can_comment:** `typing.Optional[ForumWhoCanCommentTypes]` — Controls which roles are allowed to comment on posts in this forum.
@@ -25888,7 +27848,7 @@ client.forum_posts.update(
-**visibility:** `typing.Optional[ForumPostVisibilityTypes]` — Controls who can see this forum post, such as members only or public. +**who_can_post:** `typing.Optional[ForumWhoCanPostTypes]` — Controls which roles are allowed to create new posts in this forum.
@@ -25908,8 +27868,8 @@ client.forum_posts.update(
-## Forums -
client.forums.list(...) -> ListForumsResponse +## IdentityProfiles +
client.identity_profiles.list_identity_profile(...) -> ListIdentityProfileResponse
@@ -25921,10 +27881,10 @@ client.forum_posts.update(
-Returns a paginated list of forums for an account, with optional filtering by product. +Lists the identity profiles currently linked to an account, or to every account you can read when `account_id` is omitted. Required permissions: - - `forum:read` + - `identity:read`
@@ -25947,10 +27907,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forums.list( +client.identity_profiles.list_identity_profile( first=42, last=42, - product_id="prod_xxxxxxxxxxxxx", account_id="biz_xxxxxxxxxxxxxx", ) @@ -25968,7 +27927,7 @@ client.forums.list(
-**account_id:** `str` — The unique identifier of the company to list forums for. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -25976,7 +27935,7 @@ client.forums.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -25984,7 +27943,7 @@ client.forums.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -25992,7 +27951,7 @@ client.forums.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -26000,7 +27959,7 @@ client.forums.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**profile_type:** `typing.Optional[IdentityProfileKinds]`
@@ -26008,7 +27967,15 @@ client.forums.list(
-**product_id:** `typing.Optional[str]` — The unique identifier of a product to filter by. When set, only forums connected to this product are returned. +**status:** `typing.Optional[IdentityProfileStatuses]` + +
+
+ +
+
+ +**account_id:** `typing.Optional[str]` — Account to list identity profiles for, prefixed `biz_`. Omit to list profiles across every account you can read, including child accounts under a parent and, with a user credential, your own user.
@@ -26028,7 +27995,7 @@ client.forums.list(
-
client.forums.retrieve(...) -> Forum +
client.identity_profiles.retrieve_identity_profile(...) -> IdentityProfile
@@ -26040,10 +28007,10 @@ client.forums.list(
-Retrieves the details of an existing forum. +Retrieves the details of an existing identity profile. Required permissions: - - `forum:read` + - `identity:read`
@@ -26066,8 +28033,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forums.retrieve( - id="id", +client.identity_profiles.retrieve_identity_profile( + id="idpf_xxxxxxxxxxxxx", ) ``` @@ -26084,7 +28051,7 @@ client.forums.retrieve(
-**id:** `str` — The unique identifier of the forum or experience to retrieve. +**id:** `str` — The unique identifier of the identity profile (idpf_xxx).
@@ -26104,7 +28071,7 @@ client.forums.retrieve(
-
client.forums.update(...) -> Forum +
client.identity_profiles.unlink_identity_profile(...) -> IdentityProfile
@@ -26116,10 +28083,10 @@ client.forums.retrieve(
-Update moderation and notification settings for a forum, such as who can post, who can comment, and email notification preferences. +Unlinks an identity profile from the account or user that owns `ledger_account_id`. Requires `identity:write` on that account or user. Required permissions: - - `forum:moderate` + - `identity:write`
@@ -26142,8 +28109,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.forums.update( - id="id", +client.identity_profiles.unlink_identity_profile( + id="idpf_xxxxxxxxxxxxx", + ledger_account_id="ldgr_xxxxxxxxxxxxx", ) ``` @@ -26160,39 +28128,7 @@ client.forums.update(
-**id:** `str` — The unique identifier of the forum to update. Accepts either an experience ID (e.g. 'exp_xxxxx') or a forum ID. - -
-
- -
-
- -**banned_words:** `typing.Optional[typing.List[str]]` — A list of words that are automatically blocked from posts in this forum. For example, ['spam', 'scam']. - -
-
- -
-
- -**banner_image:** `typing.Optional[UpdateForumsRequestBannerImage]` — The banner image displayed at the top of the forum page. Pass null to remove the existing banner. - -
-
- -
-
- -**email_notification_preference:** `typing.Optional[ForumEmailNotificationPreferences]` — Controls how email notifications are sent to members when new posts are created in this forum. - -
-
- -
-
- -**who_can_comment:** `typing.Optional[ForumWhoCanCommentTypes]` — Controls which roles are allowed to comment on posts in this forum. +**id:** `str` — The ID of the IdentityProfile to unlink.
@@ -26200,7 +28136,7 @@ client.forums.update(
-**who_can_post:** `typing.Optional[ForumWhoCanPostTypes]` — Controls which roles are allowed to create new posts in this forum. +**ledger_account_id:** `str` — The ID of the LedgerAccount to unlink the identity profile from.
@@ -26220,8 +28156,7 @@ client.forums.update(
-## IdentityProfiles -
client.identity_profiles.list_identity_profile(...) -> ListIdentityProfileResponse +
client.identity_profiles.list_verifications_identity_profile(...) -> ListVerificationsIdentityProfileResponse
@@ -26233,7 +28168,7 @@ client.forums.update(
-Lists the identity profiles currently linked to an account, or to every account you can read when `account_id` is omitted. +Returns a list of verifications attached to an identity profile, ordered by most recent first. Required permissions: - `identity:read` @@ -26259,10 +28194,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.identity_profiles.list_identity_profile( +client.identity_profiles.list_verifications_identity_profile( + id="idpf_xxxxxxxxxxxxx", first=42, last=42, - account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -26279,23 +28214,7 @@ client.identity_profiles.list_identity_profile(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. - -
-
- -
-
- -**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. - -
-
- -
-
- -**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**id:** `str` — The unique identifier of the identity profile (idpf_xxx).
@@ -26303,7 +28222,7 @@ client.identity_profiles.list_identity_profile(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -26311,7 +28230,7 @@ client.identity_profiles.list_identity_profile(
-**profile_type:** `typing.Optional[IdentityProfileKinds]` +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -26319,7 +28238,7 @@ client.identity_profiles.list_identity_profile(
-**status:** `typing.Optional[IdentityProfileStatuses]` +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list.
@@ -26327,7 +28246,7 @@ client.identity_profiles.list_identity_profile(
-**account_id:** `typing.Optional[str]` — Account to list identity profiles for, prefixed `biz_`. Omit to list profiles across every account you can read, including child accounts under a parent and, with a user credential, your own user. +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list.
@@ -26347,7 +28266,8 @@ client.identity_profiles.list_identity_profile(
-
client.identity_profiles.retrieve_identity_profile(...) -> IdentityProfile +## Invoices +
client.invoices.list(...) -> ListInvoicesResponse
@@ -26359,10 +28279,7 @@ client.identity_profiles.list_identity_profile(
-Retrieves the details of an existing identity profile. - -Required permissions: - - `identity:read` +Lists receipt-backed invoices for accounts the caller can read. Legacy invoices are excluded.
@@ -26385,9 +28302,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.identity_profiles.retrieve_identity_profile( - id="idpf_xxxxxxxxxxxxx", -) +client.invoices.list() ``` @@ -26403,7 +28318,7 @@ client.identity_profiles.retrieve_identity_profile(
-**id:** `str` — The unique identifier of the identity profile (idpf_xxx). +**account_id:** `typing.Optional[str]`
@@ -26411,76 +28326,31 @@ client.identity_profiles.retrieve_identity_profile(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**status:** `typing.Optional[ListInvoicesRequestStatus]`
- -
- - - - -
- -
client.identity_profiles.unlink_identity_profile(...) -> IdentityProfile -
-
- -#### 📝 Description
-
-
- -Unlinks an identity profile from the account or user that owns `ledger_account_id`. Requires `identity:write` on that account or user. - -Required permissions: - - `identity:write` -
-
+**overdue:** `typing.Optional[bool]` +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.identity_profiles.unlink_identity_profile( - id="idpf_xxxxxxxxxxxxx", - ledger_account_id="ldgr_xxxxxxxxxxxxx", -) - -``` -
-
+**member_id:** `typing.Optional[str]` +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The ID of the IdentityProfile to unlink. +**product_id:** `typing.Optional[str]`
@@ -26488,7 +28358,7 @@ client.identity_profiles.unlink_identity_profile(
-**ledger_account_id:** `str` — The ID of the LedgerAccount to unlink the identity profile from. +**created_after:** `typing.Optional[datetime.datetime]`
@@ -26496,77 +28366,31 @@ client.identity_profiles.unlink_identity_profile(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**created_before:** `typing.Optional[datetime.datetime]`
-
-
- - -
-
-
- -
client.identity_profiles.list_verifications_identity_profile(...) -> ListVerificationsIdentityProfileResponse -
-
- -#### 📝 Description
-
-
- -Returns a list of verifications attached to an identity profile, ordered by most recent first. - -Required permissions: - - `identity:read` -
-
+**order:** `typing.Optional[ListInvoicesRequestOrder]` +
-#### 🔌 Usage - -
-
-
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.identity_profiles.list_verifications_identity_profile( - id="idpf_xxxxxxxxxxxxx", - first=42, - last=42, -) - -``` -
-
+**direction:** `typing.Optional[ListInvoicesRequestDirection]` +
-#### ⚙️ Parameters - -
-
-
-**id:** `str` — The unique identifier of the identity profile (idpf_xxx). +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -26574,7 +28398,7 @@ client.identity_profiles.list_verifications_identity_profile(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -26582,7 +28406,7 @@ client.identity_profiles.list_verifications_identity_profile(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -26590,7 +28414,7 @@ client.identity_profiles.list_verifications_identity_profile(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -26598,7 +28422,7 @@ client.identity_profiles.list_verifications_identity_profile(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**include_total_count:** `typing.Optional[bool]` — Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results.
@@ -26618,8 +28442,7 @@ client.identity_profiles.list_verifications_identity_profile(
-## Invoices -
client.invoices.list(...) -> ListInvoicesResponse +
client.invoices.create(...) -> Invoice
@@ -26631,7 +28454,7 @@ client.identity_profiles.list_verifications_identity_profile(
-Lists receipt-backed invoices for accounts the caller can read. Legacy invoices are excluded. +Creates a draft invoice backed by a receipt, with saved items, quantities, prices, and recipients. Issue the draft to resolve final tax and open the invoice. The pay_ ID stays the same when paid. Needs `invoice:create` or `payment:charge`; a `payment_method_id` needs `payment:charge`.
@@ -26654,7 +28477,10 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.list() +client.invoices.create( + account_id="biz_xxxxxxxxxxxxxx", + items=[], +) ``` @@ -26670,15 +28496,7 @@ client.invoices.list()
-**account_id:** `typing.Optional[str]` - -
-
- -
-
- -**status:** `typing.Optional[ListInvoicesRequestStatus]` +**account_id:** `str` — The issuing account.
@@ -26686,7 +28504,7 @@ client.invoices.list()
-**overdue:** `typing.Optional[bool]` +**items:** `typing.List[CreateInvoicesRequestItemsItem]` — The variants being invoiced, all in the same currency. Each variant may appear once; use quantity for multiple units. Product and price come from each variant; a recurring variant must belong to a product, bills its renewal price and, once the invoice is paid, renews as a subscription collected by the `collection_method` the invoice was sent or issued with. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, and access settings.
@@ -26694,7 +28512,7 @@ client.invoices.list()
-**member_id:** `typing.Optional[str]` +**billing_address:** `typing.Optional[CreateInvoicesRequestBillingAddress]` — Create a billing address linked to this member.
@@ -26702,7 +28520,7 @@ client.invoices.list()
-**product_id:** `typing.Optional[str]` +**buyer_fee_percentage:** `typing.Optional[float]` — The buyer's adjustable fee in percentage points, with at most two decimal places: `0` for none, or between 5 and 100. The account keeps it, and Whop waives its take rate on the invoice.
@@ -26710,7 +28528,7 @@ client.invoices.list()
-**created_after:** `typing.Optional[datetime.datetime]` +**customer_name:** `typing.Optional[str]` — The contact name when creating an email-only member.
@@ -26718,7 +28536,7 @@ client.invoices.list()
-**created_before:** `typing.Optional[datetime.datetime]` +**due_at:** `typing.Optional[datetime.datetime]` — When payment is due, as an ISO 8601 timestamp.
@@ -26726,7 +28544,7 @@ client.invoices.list()
-**order:** `typing.Optional[ListInvoicesRequestOrder]` +**email_address:** `typing.Optional[str]` — Resolve or create the member for this email, creating a Whop user when none exists. Mutually exclusive with member_id.
@@ -26734,7 +28552,7 @@ client.invoices.list()
-**direction:** `typing.Optional[ListInvoicesRequestDirection]` +**mailing_address_id:** `typing.Optional[str]` — An address associated with the member. Mutually exclusive with billing_address.
@@ -26742,7 +28560,7 @@ client.invoices.list()
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**member_id:** `typing.Optional[str]` — The billed customer, a member of the account, prefixed `mber_`. It can't change once the draft is created. Changing email recipients does not change this buyer.
@@ -26750,7 +28568,7 @@ client.invoices.list()
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**memo:** `typing.Optional[str]` — A note to the customer, shown on the invoice email, PDF, and checkout page with its line breaks kept. Trimmed; `null` or blank clears it. Can be updated on draft, open, or uncollectible invoices.
@@ -26758,7 +28576,7 @@ client.invoices.list()
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**metadata:** `typing.Optional[typing.Dict[str, str]]` — Up to 50 caller-owned string key/value pairs. The `invoice_memo` key is reserved and ignored; set `memo` instead.
@@ -26766,7 +28584,7 @@ client.invoices.list()
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**payment_method_id:** `typing.Optional[str]` — A saved payment method belonging to the member, prefixed `payt_`. Sending or issuing the invoice charges this method at the `charge_at` passed to that call, otherwise on `due_at`, or right away when there is no `due_at` or it has passed. Sending also emails the invoice now when the charge is later; issuing does not. Setting it needs `payment:charge`.
@@ -26774,7 +28592,7 @@ client.invoices.list()
-**include_total_count:** `typing.Optional[bool]` — Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. +**recipient_emails:** `typing.Optional[typing.List[str]]` — Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices.
@@ -26794,7 +28612,7 @@ client.invoices.list()
-
client.invoices.create(...) -> Invoice +
client.invoices.retrieve(...) -> Invoice
@@ -26806,7 +28624,7 @@ client.invoices.list()
-Creates a draft invoice backed by a receipt, with saved items, quantities, prices, and recipients. Issue the draft to resolve final tax and open the invoice. The pay_ ID stays the same when paid. Needs `invoice:create` or `payment:charge`; a `payment_method_id` needs `payment:charge`. +Retrieves a receipt-backed invoice by its pay_ ID.
@@ -26829,9 +28647,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.create( - account_id="biz_xxxxxxxxxxxxxx", - items=[], +client.invoices.retrieve( + id="id", ) ``` @@ -26848,7 +28665,7 @@ client.invoices.create(
-**account_id:** `str` — The issuing account. +**id:** `str` — The invoice's pay_ ID.
@@ -26856,15 +28673,72 @@ client.invoices.create(
-**items:** `typing.List[CreateInvoicesRequestItemsItem]` — The variants being invoiced, all in the same currency. Each variant may appear once; use quantity for multiple units. Product and price come from each variant; a recurring variant must belong to a product, bills its renewal price and, once the invoice is paid, renews as a subscription collected by the `collection_method` the invoice was sent or issued with. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, and access settings. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.invoices.update(...) -> Invoice
-**billing_address:** `typing.Optional[CreateInvoicesRequestBillingAddress]` — Create a billing address linked to this member. +#### 📝 Description + +
+
+ +
+
+ +Updates draft invoice items and billing fields. Updates of only `recipient_emails` and `memo` are also allowed on unpaid invoices. The customer is set when the draft is created and can't change. To bill someone else, first void the draft. Then create a new invoice. Edit customer contact details through the member API. A draft with no saved payment method and no scheduled send needs `invoice:update`, `invoice:create`, or `payment:charge`; every other update, and setting `payment_method_id`, needs `payment:charge`. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.invoices.update( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The invoice's pay_ ID.
@@ -26872,7 +28746,7 @@ client.invoices.create(
-**buyer_fee_percentage:** `typing.Optional[float]` — The buyer's adjustable fee in percentage points, with at most two decimal places: `0` for none, or between 5 and 100. The account keeps it, and Whop waives its take rate on the invoice. +**billing_address:** `typing.Optional[UpdateInvoicesRequestBillingAddress]` — Create a billing address linked to this member.
@@ -26880,7 +28754,7 @@ client.invoices.create(
-**customer_name:** `typing.Optional[str]` — The contact name when creating an email-only member. +**buyer_fee_percentage:** `typing.Optional[float]` — The buyer's adjustable fee in percentage points, with at most two decimal places: `0` for none, or between 5 and 100. The account keeps it, and Whop waives its take rate on the invoice.
@@ -26896,7 +28770,7 @@ client.invoices.create(
-**email_address:** `typing.Optional[str]` — Resolve or create the member for this email, creating a Whop user when none exists. Mutually exclusive with member_id. +**items:** `typing.Optional[typing.List[UpdateInvoicesRequestItemsItem]]` — The variants being invoiced, all in the same currency. Each variant may appear once; use quantity for multiple units. Product and price come from each variant; a recurring variant must belong to a product, bills its renewal price and, once the invoice is paid, renews as a subscription collected by the `collection_method` the invoice was sent or issued with. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, and access settings.
@@ -26912,7 +28786,7 @@ client.invoices.create(
-**member_id:** `typing.Optional[str]` — The billed customer, a member of the account, prefixed `mber_`. It can't change once the draft is created. Changing email recipients does not change this buyer. +**member_id:** `typing.Optional[str]` — The billed customer, a member of the account, prefixed `mber_`. The customer is set when the draft is created and can't change, so pass the draft's current customer or omit this field. A draft saved without a customer can take one here. Changing email recipients does not change this buyer.
@@ -26964,7 +28838,7 @@ client.invoices.create(
-
client.invoices.retrieve(...) -> Invoice +
client.invoices.charge(...) -> Invoice
@@ -26976,7 +28850,7 @@ client.invoices.create(
-Retrieves a receipt-backed invoice by its pay_ ID. +Charges an open invoice now to one of its customer's saved payment methods, canceling any charge scheduled for later. The charge completes asynchronously: the invoice becomes `paid`, or, if declined, stays `open` and its recipients are emailed the `checkout_link`. Refused for drafts and while another payment is in progress.
@@ -26999,7 +28873,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.retrieve( +client.invoices.charge( id="id", ) @@ -27025,6 +28899,14 @@ client.invoices.retrieve(
+**payment_method_id:** `typing.Optional[str]` — The saved payment method to charge, prefixed `payt_`. It must belong to the invoice's customer and be chargeable without the customer present. Omit it to charge the invoice's own `payment_method_id`. + +
+
+ +
+
+ **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27037,7 +28919,7 @@ client.invoices.retrieve(
-
client.invoices.update(...) -> Invoice +
client.invoices.generate_pdf(...) -> InvoicePdf
@@ -27049,7 +28931,7 @@ client.invoices.retrieve(
-Updates draft invoice items and billing fields. Updates of only `recipient_emails` and `memo` are also allowed on unpaid invoices. The customer is set when the draft is created and can't change. To bill someone else, first void the draft. Then create a new invoice. Edit customer contact details through the member API. A draft with no saved payment method and no scheduled send needs `invoice:update`, `invoice:create`, or `payment:charge`; every other update, and setting `payment_method_id`, needs `payment:charge`. +Generates the invoice as a PDF and returns a short-lived link to download it. A draft shows its estimated totals. The buyer's name and email need `member:basic:read` and `member:email:read`, and the Pay now link on an open invoice needs `payment:charge`, or `invoice:create` or `invoice:update` when it has no `payment_method_id`. Each call generates a new file and link, so this endpoint does not replay `Idempotency-Key` responses.
@@ -27072,7 +28954,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.update( +client.invoices.generate_pdf( id="id", ) @@ -27098,7 +28980,7 @@ client.invoices.update(
-**billing_address:** `typing.Optional[UpdateInvoicesRequestBillingAddress]` — Create a billing address linked to this member. +**include_descriptions:** `typing.Optional[bool]` — Whether to print each line item's `description` under it. Defaults to `true`.
@@ -27106,55 +28988,72 @@ client.invoices.update(
-**buyer_fee_percentage:** `typing.Optional[float]` — The buyer's adjustable fee in percentage points, with at most two decimal places: `0` for none, or between 5 and 100. The account keeps it, and Whop waives its take rate on the invoice. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
-
-
-**due_at:** `typing.Optional[datetime.datetime]` — When payment is due, as an ISO 8601 timestamp. -
+
+
client.invoices.issue(...) -> Invoice
-**items:** `typing.Optional[typing.List[UpdateInvoicesRequestItemsItem]]` — The variants being invoiced, all in the same currency. Each variant may appear once; use quantity for multiple units. Product and price come from each variant; a recurring variant must belong to a product, bills its renewal price and, once the invoice is paid, renews as a subscription collected by the `collection_method` the invoice was sent or issued with. With several items, every item that has a product must be a regular product, and all items need compatible payment, tax, and access settings. - -
-
+#### 📝 Description
-**mailing_address_id:** `typing.Optional[str]` — An address associated with the member. Mutually exclusive with billing_address. - -
-
-
-**member_id:** `typing.Optional[str]` — The billed customer, a member of the account, prefixed `mber_`. The customer is set when the draft is created and can't change, so pass the draft's current customer or omit this field. A draft saved without a customer can take one here. Changing email recipients does not change this buyer. - +Resolves final tax and opens a draft invoice without emailing it. An invoice with a `payment_method_id` is charged to it off-session, as `POST /payments` charges a saved payment method: at `charge_at` if given, otherwise on `due_at` while it is still ahead, otherwise right away (see `scheduled_charge_at`). With a future `due_at` and no `charge_at`, the customer is charged on the due date without being emailed first. Issuing an open invoice again retains its totals and charges nothing. +
+
+#### 🔌 Usage +
-**memo:** `typing.Optional[str]` — A note to the customer, shown on the invoice email, PDF, and checkout page with its line breaks kept. Trimmed; `null` or blank clears it. Can be updated on draft, open, or uncollectible invoices. - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.invoices.issue( + id="id", +) + +``` +
+
+#### ⚙️ Parameters +
-**metadata:** `typing.Optional[typing.Dict[str, str]]` — Up to 50 caller-owned string key/value pairs. The `invoice_memo` key is reserved and ignored; set `memo` instead. +
+
+ +**id:** `str` — The invoice's pay_ ID.
@@ -27162,7 +29061,7 @@ client.invoices.update(
-**payment_method_id:** `typing.Optional[str]` — A saved payment method belonging to the member, prefixed `payt_`. Sending or issuing the invoice charges this method at the `charge_at` passed to that call, otherwise on `due_at`, or right away when there is no `due_at` or it has passed. Sending also emails the invoice now when the charge is later; issuing does not. Setting it needs `payment:charge`. +**charge_at:** `typing.Optional[datetime.datetime]` — When to charge the draft's `payment_method_id`, as an ISO 8601 timestamp in the future. Only for a draft with a `payment_method_id` and a total above zero. Omit to charge on `due_at` if it is still ahead, or right away otherwise.
@@ -27170,7 +29069,7 @@ client.invoices.update(
-**recipient_emails:** `typing.Optional[typing.List[str]]` — Email addresses saved for invoice delivery, independent of the billed customer. Saving them sends no email. Defaults to the customer email when omitted on create. Can be updated on draft, open, or uncollectible invoices. +**collection_method:** `typing.Optional[IssueInvoicesRequestCollectionMethod]` — How the subscription this invoice starts collects each renewal. `charge_automatically` charges the payment method that paid the invoice each period: the draft's `payment_method_id`, or the one the customer pays the invoice link with. `send_invoice` issues a numbered invoice each period, due on the renewal date and emailed with its payment link to the latest invoice's `recipient_emails`, so it needs at least one recipient and isn't available for invoices billed to a business. Defaults to `charge_automatically`. Only for a draft with a recurring item. A scheduled send applies it when it fires (see `scheduled_collection_method`).
@@ -27190,7 +29089,7 @@ client.invoices.update(
-
client.invoices.charge(...) -> Invoice +
client.invoices.mark_uncollectible(...) -> Invoice
@@ -27202,7 +29101,7 @@ client.invoices.update(
-Charges an open invoice now to one of its customer's saved payment methods, canceling any charge scheduled for later. The charge completes asynchronously: the invoice becomes `paid`, or, if declined, stays `open` and its recipients are emailed the `checkout_link`. Refused for drafts and while another payment is in progress. +Marks an open invoice as uncollectible. Its checkout link stops working.
@@ -27225,7 +29124,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.charge( +client.invoices.mark_uncollectible( id="id", ) @@ -27251,14 +29150,6 @@ client.invoices.charge(
-**payment_method_id:** `typing.Optional[str]` — The saved payment method to charge, prefixed `payt_`. It must belong to the invoice's customer and be chargeable without the customer present. Omit it to charge the invoice's own `payment_method_id`. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27271,7 +29162,7 @@ client.invoices.charge(
-
client.invoices.generate_pdf(...) -> InvoicePdf +
client.invoices.send(...) -> Invoice
@@ -27283,7 +29174,7 @@ client.invoices.charge(
-Generates the invoice as a PDF and returns a short-lived link to download it. A draft shows its estimated totals. The buyer's name and email need `member:basic:read` and `member:email:read`, and the Pay now link on an open invoice needs `payment:charge`, or `invoice:create` or `invoice:update` when it has no `payment_method_id`. Each call generates a new file and link, so this endpoint does not replay `Idempotency-Key` responses. +Issues a draft and emails it to its recipients, with reminders after the due date. A draft with no `payment_method_id` needs `invoice:update`, `invoice:create`, or `payment:charge`, and is never charged. A draft with a `payment_method_id` needs `payment:charge`: with a `charge_at`, or when its `due_at` is still ahead, it is emailed now and charged to that method at that time (see `scheduled_charge_at`); otherwise it is charged right away instead of emailed. Voiding the invoice, marking it uncollectible, or paying it first cancels the scheduled charge, and its recipients get the payment link if a charge fails. Sending an open invoice needs `payment:charge` and emails it again, up to three emails a day including the first send. With `send_at`, the draft is sent at that time instead, and cannot be edited, except its recipients, until it is sent or unscheduled. Each email, reminders included, is sent separately to the customer email shown on the invoice and to each address in `recipient_emails`, so recipients never see each other's addresses.
@@ -27306,7 +29197,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.generate_pdf( +client.invoices.send( id="id", ) @@ -27332,7 +29223,23 @@ client.invoices.generate_pdf(
-**include_descriptions:** `typing.Optional[bool]` — Whether to print each line item's `description` under it. Defaults to `true`. +**charge_at:** `typing.Optional[datetime.datetime]` — When to charge the draft's `payment_method_id`, as an ISO 8601 timestamp in the future and no earlier than `send_at`. Only for a draft with a `payment_method_id` and a total above zero. Omit to charge on `due_at` if it is still ahead when the draft is sent, or right away otherwise. A scheduled send that runs after `charge_at` charges right away. + +
+
+ +
+
+ +**collection_method:** `typing.Optional[SendInvoicesRequestCollectionMethod]` — How the subscription this invoice starts collects each renewal. `charge_automatically` charges the payment method that paid the invoice each period: the draft's `payment_method_id`, or the one the customer pays the invoice link with. `send_invoice` issues a numbered invoice each period, due on the renewal date and emailed with its payment link to the latest invoice's `recipient_emails`, so it needs at least one recipient and isn't available for invoices billed to a business. Defaults to `charge_automatically`. Only for a draft with a recurring item. A scheduled send applies it when it fires (see `scheduled_collection_method`). + +
+
+ +
+
+ +**send_at:** `typing.Optional[datetime.datetime]` — When to send the draft, as an ISO 8601 timestamp in the future. Omit to send now.
@@ -27352,7 +29259,7 @@ client.invoices.generate_pdf(
-
client.invoices.issue(...) -> Invoice +
client.invoices.unschedule(...) -> Invoice
@@ -27364,7 +29271,7 @@ client.invoices.generate_pdf(
-Resolves final tax and opens a draft invoice without emailing it. An invoice with a `payment_method_id` is charged to it off-session, as `POST /payments` charges a saved payment method: at `charge_at` if given, otherwise on `due_at` while it is still ahead, otherwise right away (see `scheduled_charge_at`). With a future `due_at` and no `charge_at`, the customer is charged on the due date without being emailed first. Issuing an open invoice again retains its totals and charges nothing. +Cancels a draft's scheduled send, so it can be edited again. An invoice with no scheduled send is returned unchanged. A draft with no `payment_method_id` needs `invoice:update`, `invoice:create`, or `payment:charge`; any other invoice needs `payment:charge`.
@@ -27387,7 +29294,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.issue( +client.invoices.unschedule( id="id", ) @@ -27413,22 +29320,6 @@ client.invoices.issue(
-**charge_at:** `typing.Optional[datetime.datetime]` — When to charge the draft's `payment_method_id`, as an ISO 8601 timestamp in the future. Only for a draft with a `payment_method_id` and a total above zero. Omit to charge on `due_at` if it is still ahead, or right away otherwise. - -
-
- -
-
- -**collection_method:** `typing.Optional[IssueInvoicesRequestCollectionMethod]` — How the subscription this invoice starts collects each renewal. `charge_automatically` charges the payment method that paid the invoice each period: the draft's `payment_method_id`, or the one the customer pays the invoice link with. `send_invoice` issues a numbered invoice each period, due on the renewal date and emailed with its payment link to the latest invoice's `recipient_emails`, so it needs at least one recipient and isn't available for invoices billed to a business. Defaults to `charge_automatically`. Only for a draft with a recurring item. A scheduled send applies it when it fires (see `scheduled_collection_method`). - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -27441,7 +29332,7 @@ client.invoices.issue(
-
client.invoices.mark_uncollectible(...) -> Invoice +
client.invoices.void(...) -> Invoice
@@ -27453,7 +29344,7 @@ client.invoices.issue(
-Marks an open invoice as uncollectible. Its checkout link stops working. +Voids a draft or unpaid invoice.
@@ -27476,7 +29367,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.mark_uncollectible( +client.invoices.void( id="id", ) @@ -27514,7 +29405,8 @@ client.invoices.mark_uncollectible(
-
client.invoices.send(...) -> Invoice +## Leads +
client.leads.list(...) -> ListLeadsResponse
@@ -27526,7 +29418,13 @@ client.invoices.mark_uncollectible(
-Issues a draft and emails it to its recipients, with reminders after the due date. A draft with no `payment_method_id` needs `invoice:update`, `invoice:create`, or `payment:charge`, and is never charged. A draft with a `payment_method_id` needs `payment:charge`: with a `charge_at`, or when its `due_at` is still ahead, it is emailed now and charged to that method at that time (see `scheduled_charge_at`); otherwise it is charged right away instead of emailed. Voiding the invoice, marking it uncollectible, or paying it first cancels the scheduled charge, and its recipients get the payment link if a charge fails. Sending an open invoice needs `payment:charge` and emails it again, up to three emails a day including the first send. With `send_at`, the draft is sent at that time instead, and cannot be edited, except its recipients, until it is sent or unscheduled. Each email, reminders included, is sent separately to the customer email shown on the invoice and to each address in `recipient_emails`, so recipients never see each other's addresses. +Lists an account's leads, newest first. + +Required permissions: + - `lead:basic:read` + - `member:email:read` + - `access_pass:basic:read` + - `member:basic:read`
@@ -27543,14 +29441,19 @@ Issues a draft and emails it to its recipients, with reminders after the due dat ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +import datetime client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.invoices.send( - id="id", +client.leads.list( + first=42, + last=42, + created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), + created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -27567,7 +29470,7 @@ client.invoices.send(
-**id:** `str` — The invoice's pay_ ID. +**account_id:** `str` — The unique identifier of the company to list leads for.
@@ -27575,7 +29478,7 @@ client.invoices.send(
-**charge_at:** `typing.Optional[datetime.datetime]` — When to charge the draft's `payment_method_id`, as an ISO 8601 timestamp in the future and no earlier than `send_at`. Only for a draft with a `payment_method_id` and a total above zero. Omit to charge on `due_at` if it is still ahead when the draft is sent, or right away otherwise. A scheduled send that runs after `charge_at` charges right away. +**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor.
@@ -27583,7 +29486,7 @@ client.invoices.send(
-**collection_method:** `typing.Optional[SendInvoicesRequestCollectionMethod]` — How the subscription this invoice starts collects each renewal. `charge_automatically` charges the payment method that paid the invoice each period: the draft's `payment_method_id`, or the one the customer pays the invoice link with. `send_invoice` issues a numbered invoice each period, due on the renewal date and emailed with its payment link to the latest invoice's `recipient_emails`, so it needs at least one recipient and isn't available for invoices billed to a business. Defaults to `charge_automatically`. Only for a draft with a recurring item. A scheduled send applies it when it fires (see `scheduled_collection_method`). +**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor.
@@ -27591,7 +29494,39 @@ client.invoices.send(
-**send_at:** `typing.Optional[datetime.datetime]` — When to send the draft, as an ISO 8601 timestamp in the future. Omit to send now. +**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. + +
+
+ +
+
+ +**created_after:** `typing.Optional[datetime.datetime]` — Only return leads created after this timestamp. + +
+
+ +
+
+ +**created_before:** `typing.Optional[datetime.datetime]` — Only return leads created before this timestamp. + +
+
+ +
+
+ +**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter leads to only those associated with these specific product identifiers.
@@ -27611,7 +29546,7 @@ client.invoices.send(
-
client.invoices.unschedule(...) -> Invoice +
client.leads.create(...) -> Lead
@@ -27623,7 +29558,13 @@ client.invoices.send(
-Cancels a draft's scheduled send, so it can be edited again. An invoice with no scheduled send is returned unchanged. A draft with no `payment_method_id` needs `invoice:update`, `invoice:create`, or `payment:charge`; any other invoice needs `payment:charge`. +Records a lead: a potential customer's interest in an account or one of its products. + +Required permissions: + - `lead:manage` + - `member:email:read` + - `access_pass:basic:read` + - `member:basic:read`
@@ -27646,8 +29587,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.unschedule( - id="id", +client.leads.create( + account_id="biz_xxxxxxxxxxxxxx", ) ``` @@ -27664,7 +29605,39 @@ client.invoices.unschedule(
-**id:** `str` — The invoice's pay_ ID. +**account_id:** `str` — The unique identifier of the company to create the lead for, starting with 'biz_'. + +
+
+ +
+
+ +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A JSON object of custom metadata to attach to the lead for tracking purposes. + +
+
+ +
+
+ +**product_id:** `typing.Optional[str]` — The unique identifier of the product the lead is interested in, starting with 'prod_'. + +
+
+ +
+
+ +**referrer:** `typing.Optional[str]` — The referral URL that brought the lead to the company, such as 'https://example.com/landing'. + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` — The unique identifier of the user to record as the lead. If authenticated as a user, that user is used automatically.
@@ -27684,7 +29657,7 @@ client.invoices.unschedule(
-
client.invoices.void(...) -> Invoice +
client.leads.retrieve(...) -> Lead
@@ -27696,7 +29669,13 @@ client.invoices.unschedule(
-Voids a draft or unpaid invoice. +Retrieves the details of an existing lead. + +Required permissions: + - `lead:basic:read` + - `member:email:read` + - `access_pass:basic:read` + - `member:basic:read`
@@ -27719,8 +29698,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.invoices.void( - id="id", +client.leads.retrieve( + id="lead_xxxxxxxxxxxxx", ) ``` @@ -27737,7 +29716,7 @@ client.invoices.void(
-**id:** `str` — The invoice's pay_ ID. +**id:** `str` — The unique identifier of the lead to retrieve.
@@ -27757,8 +29736,7 @@ client.invoices.void(
-## Leads -
client.leads.list(...) -> ListLeadsResponse +
client.leads.update(...) -> Lead
@@ -27770,10 +29748,10 @@ client.invoices.void(
-Lists an account's leads, newest first. +Updates a lead's `metadata` or `referrer`. Required permissions: - - `lead:basic:read` + - `lead:manage` - `member:email:read` - `access_pass:basic:read` - `member:basic:read` @@ -27793,19 +29771,14 @@ Required permissions: ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -import datetime client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.leads.list( - first=42, - last=42, - created_after=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - created_before=datetime.datetime.fromisoformat("2023-12-01T05:00:00+00:00"), - account_id="biz_xxxxxxxxxxxxxx", +client.leads.update( + id="lead_xxxxxxxxxxxxx", ) ``` @@ -27822,7 +29795,7 @@ client.leads.list(
-**account_id:** `str` — The unique identifier of the company to list leads for. +**id:** `str` — The unique identifier of the lead to update, starting with 'lead_'.
@@ -27830,7 +29803,7 @@ client.leads.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A JSON object of custom metadata to set on the lead, replacing any existing metadata.
@@ -27838,7 +29811,7 @@ client.leads.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**referrer:** `typing.Optional[str]` — The updated referral URL for the lead, such as 'https://example.com/landing'.
@@ -27846,39 +29819,77 @@ client.leads.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
-
-
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. -
+
+## LedgerAccounts +
client.ledger_accounts.retrieve(...) -> LedgerAccount
-**created_after:** `typing.Optional[datetime.datetime]` — Only return leads created after this timestamp. - +#### 📝 Description + +
+
+ +
+
+ +Retrieves the details of an existing ledger account. + +Required permissions: + - `company:balance:read` + - `payout:account:read` +
+
+#### 🔌 Usage +
-**created_before:** `typing.Optional[datetime.datetime]` — Only return leads created before this timestamp. - +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.ledger_accounts.retrieve( + id="ldgr_xxxxxxxxxxxxx", +) + +```
+
+
+ +#### ⚙️ Parameters
-**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter leads to only those associated with these specific product identifiers. +
+
+ +**id:** `str` — The identifier to look up the ledger account. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx').
@@ -27898,7 +29909,8 @@ client.leads.list(
-
client.leads.create(...) -> Lead +## Livestreams +
client.livestreams.list(...) -> ListLivestreamsResponse
@@ -27910,13 +29922,7 @@ client.leads.list(
-Records a lead: a potential customer's interest in an account or one of its products. - -Required permissions: - - `lead:manage` - - `member:email:read` - - `access_pass:basic:read` - - `member:basic:read` +Lists the livestreams in an experience, live and ended, newest first.
@@ -27939,8 +29945,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.leads.create( - account_id="biz_xxxxxxxxxxxxxx", +client.livestreams.list( + experience_id="experience_id", ) ``` @@ -27957,7 +29963,7 @@ client.leads.create(
-**account_id:** `str` — The unique identifier of the company to create the lead for, starting with 'biz_'. +**experience_id:** `str` — ID of a livestreams experience, prefixed `exp_`.
@@ -27965,7 +29971,7 @@ client.leads.create(
-**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A JSON object of custom metadata to attach to the lead for tracking purposes. +**pinned:** `typing.Optional[bool]` — When `true`, only pinned livestreams, most recently pinned first. When `false`, only livestreams that are not pinned.
@@ -27973,7 +29979,7 @@ client.leads.create(
-**product_id:** `typing.Optional[str]` — The unique identifier of the product the lead is interested in, starting with 'prod_'. +**recorded:** `typing.Optional[bool]` — When `true`, only ended livestreams that were recorded, including recordings still processing. `false` or omitted lists every livestream.
@@ -27981,7 +29987,7 @@ client.leads.create(
-**referrer:** `typing.Optional[str]` — The referral URL that brought the lead to the company, such as 'https://example.com/landing'. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -27989,7 +29995,23 @@ client.leads.create(
-**user_id:** `typing.Optional[str]` — The unique identifier of the user to record as the lead. If authenticated as a user, that user is used automatically. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+ +
+
+ +**last:** `typing.Optional[int]` — Number of results to return from the end of the range. + +
+
+ +
+
+ +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -28009,7 +30031,7 @@ client.leads.create(
-
client.leads.retrieve(...) -> Lead +
client.livestreams.retrieve(...) -> Livestream
@@ -28021,13 +30043,7 @@ client.leads.create(
-Retrieves the details of an existing lead. - -Required permissions: - - `lead:basic:read` - - `member:email:read` - - `access_pass:basic:read` - - `member:basic:read` +Retrieves a livestream by ID.
@@ -28050,8 +30066,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.leads.retrieve( - id="lead_xxxxxxxxxxxxx", +client.livestreams.retrieve( + id="id", ) ``` @@ -28068,7 +30084,7 @@ client.leads.retrieve(
-**id:** `str` — The unique identifier of the lead to retrieve. +**id:** `str` — Livestream ID, prefixed `lfeed_`.
@@ -28088,7 +30104,7 @@ client.leads.retrieve(
-
client.leads.update(...) -> Lead +
client.livestreams.pin(...) -> Livestream
@@ -28100,13 +30116,7 @@ client.leads.retrieve(
-Updates a lead's `metadata` or `referrer`. - -Required permissions: - - `lead:manage` - - `member:email:read` - - `access_pass:basic:read` - - `member:basic:read` +Pins an ended livestream's recording so everyone in the experience sees it featured. Pinning it again keeps the original `pinned_at`.
@@ -28129,8 +30139,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.leads.update( - id="lead_xxxxxxxxxxxxx", +client.livestreams.pin( + id="id", ) ``` @@ -28147,23 +30157,7 @@ client.leads.update(
-**id:** `str` — The unique identifier of the lead to update, starting with 'lead_'. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — A JSON object of custom metadata to set on the lead, replacing any existing metadata. - -
-
- -
-
- -**referrer:** `typing.Optional[str]` — The updated referral URL for the lead, such as 'https://example.com/landing'. +**id:** `str` — Livestream ID, prefixed `lfeed_`.
@@ -28183,8 +30177,7 @@ client.leads.update(
-## LedgerAccounts -
client.ledger_accounts.retrieve(...) -> LedgerAccount +
client.livestreams.unpin(...) -> Livestream
@@ -28196,11 +30189,7 @@ client.leads.update(
-Retrieves the details of an existing ledger account. - -Required permissions: - - `company:balance:read` - - `payout:account:read` +Unpins a livestream's recording so it is no longer featured in the experience.
@@ -28223,8 +30212,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.ledger_accounts.retrieve( - id="ldgr_xxxxxxxxxxxxx", +client.livestreams.unpin( + id="id", ) ``` @@ -28241,7 +30230,7 @@ client.ledger_accounts.retrieve(
-**id:** `str` — The identifier to look up the ledger account. Accepts a user ID ('user_xxx'), company ID ('biz_xxx'), or ledger account ID ('ldgr_xxx'). +**id:** `str` — Livestream ID, prefixed `lfeed_`.
@@ -28261,8 +30250,8 @@ client.ledger_accounts.retrieve(
-## Livestreams -
client.livestreams.list(...) -> ListLivestreamsResponse +## Media +
client.media.generate(...) -> MediaAsset
@@ -28274,7 +30263,7 @@ client.ledger_accounts.retrieve(
-Lists the livestreams in an experience, live and ended, newest first. +Starts an AI media generation job billed from the account's balance. Generation is asynchronous — poll `GET /media/{id}` until the asset is `ready`, then use `file.id` anywhere attachments are accepted.
@@ -28297,8 +30286,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.livestreams.list( - experience_id="experience_id", +client.media.generate( + prompt="A 9:16 product showcase of a cordless power scrubber", + type="video", ) ``` @@ -28315,15 +30305,7 @@ client.livestreams.list(
-**experience_id:** `str` — ID of a livestreams experience, prefixed `exp_`. - -
-
- -
-
- -**pinned:** `typing.Optional[bool]` — When `true`, only pinned livestreams, most recently pinned first. When `false`, only livestreams that are not pinned. +**prompt:** `str` — What to generate. Up to 2,000 characters.
@@ -28331,7 +30313,7 @@ client.livestreams.list(
-**recorded:** `typing.Optional[bool]` — When `true`, only ended livestreams that were recorded, including recordings still processing. `false` or omitted lists every livestream. +**type:** `GenerateMediaRequestType` — The kind of media to generate.
@@ -28339,7 +30321,7 @@ client.livestreams.list(
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the account the API key belongs to.
@@ -28347,7 +30329,7 @@ client.livestreams.list(
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**duration_seconds:** `typing.Optional[int]` — Video length in seconds. Video only; defaults to 5.
@@ -28355,7 +30337,7 @@ client.livestreams.list(
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +**reference_media:** `typing.Optional[typing.List[str]]` — Optional reference file IDs (`file_` prefixed), up to 4. Images guide the output: for video, a single image seeds the opening frame; multiple images guide subject and style instead. Include one video to remake it: its motion and scene are kept and the images are swapped in. Video only; needs an image and can't be combined with `duration_seconds`. The output matches the video's length, up to 30 seconds, and is billed on it.
@@ -28363,7 +30345,7 @@ client.livestreams.list(
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**resolution:** `typing.Optional[GenerateMediaRequestResolution]` — Video resolution. Video only; defaults to `1080p`. `1080p` is not supported by Seedance 2.0 Fast or Mini; `4k` is only supported by Seedance 2.0.
@@ -28383,7 +30365,7 @@ client.livestreams.list(
-
client.livestreams.retrieve(...) -> Livestream +
client.media.retrieve(...) -> MediaAsset
@@ -28395,7 +30377,7 @@ client.livestreams.list(
-Retrieves a livestream by ID. +Retrieves a media asset by ID. Poll this while the asset is `processing`.
@@ -28418,7 +30400,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.livestreams.retrieve( +client.media.retrieve( id="id", ) @@ -28436,7 +30418,7 @@ client.livestreams.retrieve(
-**id:** `str` — Livestream ID, prefixed `lfeed_`. +**id:** `str` — Media asset ID, prefixed `media_`.
@@ -28456,7 +30438,8 @@ client.livestreams.retrieve(
-
client.livestreams.pin(...) -> Livestream +## Members +
client.members.list(...) -> ListMembersResponse
@@ -28468,7 +30451,7 @@ client.livestreams.retrieve(
-Pins an ended livestream's recording so everyone in the experience sees it featured. Pinning it again keeps the original `pinned_at`. +Lists the members of an account. A member is one buyer's relationship with the account, regardless of how many memberships they hold.
@@ -28491,8 +30474,19 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.livestreams.pin( - id="id", +client.members.list( + user_ids=[ + "user_xxxxxxxxxxxxxx" + ], + product_ids=[ + "prod_xxxxxxxxxxxxx" + ], + variant_ids=[ + "plan_xxxxxxxxxxxxx" + ], + promo_code_ids=[ + "promo_xxxxxxxxxxxx" + ], ) ``` @@ -28509,7 +30503,7 @@ client.livestreams.pin(
-**id:** `str` — Livestream ID, prefixed `lfeed_`. +**account_id:** `typing.Optional[str]` — The account to list members for (`biz_` tag). Defaults to the account the credential acts as.
@@ -28517,72 +30511,143 @@ client.livestreams.pin(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**access_level:** `typing.Optional[ListMembersRequestAccessLevel]` — Filter by what the member can reach on the account.
+ +
+
+ +**status:** `typing.Optional[ListMembersRequestStatus]` — Filter by whether the member is still part of the account. +
+
+
+**user_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members whose users match these `user_` identifiers. +
-
-
client.livestreams.unpin(...) -> Livestream
-#### 📝 Description +**most_recent_actions:** `typing.Optional[typing.Union[ListMembersRequestMostRecentActionsItem, typing.Sequence[ListMembersRequestMostRecentActionsItem]]]` — Only return members whose `most_recent_action` is one of these values. + +
+
+**membership_status:** `typing.Optional[ListMembersRequestMembershipStatus]` — `active` returns members holding at least one membership that currently grants access; `inactive` returns members holding at least one membership that does not. Combined with `product_ids`, `variant_ids`, or `promo_code_ids`, one membership must match all of them. + +
+
+
-Unpins a livestream's recording so it is no longer featured in the experience. +**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership to one of these products, prefixed `prod_`. Unknown IDs match nothing. +
+ +
+
+ +**variant_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership on one of these variants, prefixed `plan_`. Unknown IDs match nothing. +
-#### 🔌 Usage +
+
+ +**promo_code_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership bought with one of these promo codes, prefixed `promo_`. Unknown IDs match nothing. + +
+
+**query:** `typing.Optional[str]` — Search members by name or username. An exact email address also matches when the credential holds the member:email:read scope. + +
+
+
-```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment +**created_after:** `typing.Optional[str]` — Only members who joined after this ISO 8601 timestamp. + +
+
-client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) +
+
-client.livestreams.unpin( - id="id", -) +**created_before:** `typing.Optional[str]` — Only members who joined before this ISO 8601 timestamp. + +
+
-``` +
+
+ +**order:** `typing.Optional[ListMembersRequestOrder]` — Sort field. `most_recent_action_at` places members without one first when ascending and last when descending. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListMembersRequestDirection]` — Sort direction. +
+ +
+
+ +**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +
-#### ⚙️ Parameters +
+
+ +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+**last:** `typing.Optional[int]` — Number of results to return from the end of the range. + +
+
+
-**id:** `str` — Livestream ID, prefixed `lfeed_`. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + +
+
+ +
+
+ +**include_total_count:** `typing.Optional[bool]` — Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results.
@@ -28602,8 +30667,7 @@ client.livestreams.unpin(
-## Media -
client.media.generate(...) -> MediaAsset +
client.members.retrieve(...) -> Member
@@ -28615,7 +30679,7 @@ client.livestreams.unpin(
-Starts an AI media generation job billed from the account's balance. Generation is asynchronous — poll `GET /media/{id}` until the asset is `ready`, then use `file.id` anywhere attachments are accepted. +Retrieves a member by ID. Accessible to the account and to the member's own user.
@@ -28638,9 +30702,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.media.generate( - prompt="A 9:16 product showcase of a cordless power scrubber", - type="video", +client.members.retrieve( + id="id", ) ``` @@ -28657,47 +30720,7 @@ client.media.generate(
-**prompt:** `str` — What to generate. Up to 2,000 characters. - -
-
- -
-
- -**type:** `GenerateMediaRequestType` — The kind of media to generate. - -
-
- -
-
- -**account_id:** `typing.Optional[str]` — Account ID, prefixed `biz_`. Defaults to the account the API key belongs to. - -
-
- -
-
- -**duration_seconds:** `typing.Optional[int]` — Video length in seconds. Video only; defaults to 5. - -
-
- -
-
- -**reference_media:** `typing.Optional[typing.List[str]]` — Optional reference file IDs (`file_` prefixed), up to 4. Images guide the output: for video, a single image seeds the opening frame; multiple images guide subject and style instead. Include one video to remake it: its motion and scene are kept and the images are swapped in. Video only; needs an image and can't be combined with `duration_seconds`. The output matches the video's length, up to 30 seconds, and is billed on it. - -
-
- -
-
- -**resolution:** `typing.Optional[GenerateMediaRequestResolution]` — Video resolution. Video only; defaults to `1080p`. `1080p` is not supported by Seedance 2.0 Fast or Mini; `4k` is only supported by Seedance 2.0. +**id:** `str` — Member ID (`mber_` tag).
@@ -28717,7 +30740,7 @@ client.media.generate(
-
client.media.retrieve(...) -> MediaAsset +
client.members.update(...) -> Member
@@ -28729,7 +30752,7 @@ client.media.generate(
-Retrieves a media asset by ID. Poll this while the asset is `processing`. +Sets the name the account uses for a member. Every invoice for this member shows it as the customer name, paid invoices included, in place of the user's own name. It does not change the user's Whop profile.
@@ -28752,7 +30775,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.media.retrieve( +client.members.update( id="id", ) @@ -28770,7 +30793,15 @@ client.media.retrieve(
-**id:** `str` — Media asset ID, prefixed `media_`. +**id:** `str` — Member ID (`mber_` tag). + +
+
+ +
+
+ +**name:** `typing.Optional[str]` — The customer name to show on this member's invoices, at most 255 bytes. Leading and trailing spaces are trimmed. `null` or a blank string clears it, so invoices show the user's own name again.
@@ -28790,8 +30821,8 @@ client.media.retrieve(
-## Members -
client.members.list(...) -> ListMembersResponse +## Memberships +
client.memberships.list(...) -> ListMembershipsResponse
@@ -28803,7 +30834,7 @@ client.media.retrieve(
-Lists the members of an account. A member is one buyer's relationship with the account, regardless of how many memberships they hold. +Lists every membership the caller can read: an account API key its account's; a user credential their own plus those of every account they manage. `account_id` and `user_id` only narrow that list — values outside the caller's reach return fewer results, not an error.
@@ -28826,10 +30857,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.members.list( - user_ids=[ - "user_xxxxxxxxxxxxxx" - ], +client.memberships.list( + external_account="discord_123456789012345678", product_ids=[ "prod_xxxxxxxxxxxxx" ], @@ -28837,7 +30866,7 @@ client.members.list( "plan_xxxxxxxxxxxxx" ], promo_code_ids=[ - "promo_xxxxxxxxxxxx" + "promo_xxxxxxxxxxxxxx" ], ) @@ -28855,7 +30884,7 @@ client.members.list(
-**account_id:** `typing.Optional[str]` — The account to list members for (`biz_` tag). Defaults to the account the credential acts as. +**account_id:** `typing.Optional[str]` — Narrow to one account (`biz_` tag). With read access to the account this lists all of its memberships; without, only the caller's own memberships in it.
@@ -28863,7 +30892,7 @@ client.members.list(
-**access_level:** `typing.Optional[ListMembersRequestAccessLevel]` — Filter by what the member can reach on the account. +**user_id:** `typing.Optional[str]` — Narrow to one user's memberships (`user_` tag, or `me` for the caller). A user outside the caller's visible set returns an empty list.
@@ -28871,7 +30900,7 @@ client.members.list(
-**status:** `typing.Optional[ListMembersRequestStatus]` — Filter by whether the member is still part of the account. +**member_id:** `typing.Optional[str]` — Narrow to one member's memberships (`mber_` tag), including memberships bought by another business. A member outside the caller's visible set returns an empty list.
@@ -28879,7 +30908,7 @@ client.members.list(
-**user_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members whose users match these `user_` identifiers. +**external_account:** `typing.Optional[str]` — Narrow to memberships linked to one Discord or Telegram account, given as the platform's user ID prefixed with `discord_` or `telegram_`. Discord matches include memberships imported with that Discord ID. Any other format is a 400.
@@ -28887,7 +30916,7 @@ client.members.list(
-**most_recent_actions:** `typing.Optional[typing.Union[ListMembersRequestMostRecentActionsItem, typing.Sequence[ListMembersRequestMostRecentActionsItem]]]` — Only return members whose `most_recent_action` is one of these values. +**status:** `typing.Optional[ListMembershipsRequestStatus]` — Filter by billing state. `trialing`, `active`, `past_due`, `completed`, `canceled`, and `expired` match the membership's `status`; `active`, `trialing`, and `past_due` exclude memberships set to cancel at period end. The other values are derived buckets that never appear as a `status`: `canceling` matches memberships set to cancel at period end; `paused` matches memberships with payment collection paused; `expiring` matches one-time purchases that have not yet expired; `one_time` matches one-time purchases that never expire; `unclaimed` matches memberships with no buyer user, including memberships bought by another business; `banned` matches memberships whose buyer is banned from the account.
@@ -28895,7 +30924,7 @@ client.members.list(
-**membership_status:** `typing.Optional[ListMembersRequestMembershipStatus]` — `active` returns members holding at least one membership that currently grants access; `inactive` returns members holding at least one membership that does not. Combined with `product_ids`, `variant_ids`, or `promo_code_ids`, one membership must match all of them. +**statuses:** `typing.Optional[typing.Union[ListMembershipsRequestStatusesItem, typing.Sequence[ListMembershipsRequestStatusesItem]]]` — Filter to memberships matching any of these billing states, with the same meanings as `status`. Repeat the parameter to pass several. Combined with `status` when both are sent.
@@ -28903,7 +30932,7 @@ client.members.list(
-**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership to one of these products, prefixed `prod_`. Unknown IDs match nothing. +**product_id:** `typing.Optional[str]` — Filter to memberships of this product (`prod_` tag).
@@ -28911,7 +30940,7 @@ client.members.list(
-**variant_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership on one of these variants, prefixed `plan_`. Unknown IDs match nothing. +**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships of any of these products, each prefixed `prod_`. Repeat the parameter to pass several.
@@ -28919,7 +30948,7 @@ client.members.list(
-**promo_code_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Only return members holding a membership bought with one of these promo codes, prefixed `promo_`. Unknown IDs match nothing. +**variant_id:** `typing.Optional[str]` — Filter to memberships of this variant (`plan_` tag).
@@ -28927,7 +30956,7 @@ client.members.list(
-**query:** `typing.Optional[str]` — Search members by name or username. An exact email address also matches when the credential holds the member:email:read scope. +**variant_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships of any of these variants, each prefixed `plan_`. Repeat the parameter to pass several.
@@ -28935,7 +30964,7 @@ client.members.list(
-**created_after:** `typing.Optional[str]` — Only members who joined after this ISO 8601 timestamp. +**promo_code_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships discounted by any of these promo codes, each prefixed `promo_`. Repeat the parameter to pass several.
@@ -28943,7 +30972,7 @@ client.members.list(
-**created_before:** `typing.Optional[str]` — Only members who joined before this ISO 8601 timestamp. +**created_after:** `typing.Optional[str]` — Only memberships created after this ISO 8601 timestamp.
@@ -28951,7 +30980,7 @@ client.members.list(
-**order:** `typing.Optional[ListMembersRequestOrder]` — Sort field. `most_recent_action_at` places members without one first when ascending and last when descending. +**created_before:** `typing.Optional[str]` — Only memberships created before this ISO 8601 timestamp.
@@ -28959,7 +30988,15 @@ client.members.list(
-**direction:** `typing.Optional[ListMembersRequestDirection]` — Sort direction. +**order:** `typing.Optional[ListMembershipsRequestOrder]` — Sort field. + +
+
+ +
+
+ +**direction:** `typing.Optional[ListMembershipsRequestDirection]` — Sort direction.
@@ -29019,7 +31056,7 @@ client.members.list(
-
client.members.retrieve(...) -> Member +
client.memberships.invite(...) -> InviteMembershipsResponse
@@ -29031,7 +31068,7 @@ client.members.list(
-Retrieves a member by ID. Accessible to the account and to the member's own user. +Emails one recipient an invitation to a free variant's membership. The invitation is bound to that recipient; after signing in, accepting it immediately grants the membership without checkout. This Experimental endpoint is available only to accounts enabled for membership invitations.
@@ -29048,14 +31085,18 @@ Retrieves a member by ID. Accessible to the account and to the member's own user ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment +from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.members.retrieve( - id="id", +client.memberships.invite( + request=InviteMembershipsRequestBodyUserId( + user_id="user_xxxxxxxxxxxxxx", + variant_id="plan_xxxxxxxxxxxxxx", + ), ) ``` @@ -29072,7 +31113,7 @@ client.members.retrieve(
-**id:** `str` — Member ID (`mber_` tag). +**request:** `InviteMembershipsRequestBody`
@@ -29092,7 +31133,7 @@ client.members.retrieve(
-
client.members.update(...) -> Member +
client.memberships.retrieve(...) -> Membership
@@ -29104,7 +31145,7 @@ client.members.retrieve(
-Sets the name the account uses for a member. Every invoice for this member shows it as the customer name, paid invoices included, in place of the user's own name. It does not change the user's Whop profile. +Retrieves a membership by ID or license key. Accessible to the account and to the membership's own user.
@@ -29127,7 +31168,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.members.update( +client.memberships.retrieve( id="id", ) @@ -29145,15 +31186,7 @@ client.members.update(
-**id:** `str` — Member ID (`mber_` tag). - -
-
- -
-
- -**name:** `typing.Optional[str]` — The customer name to show on this member's invoices, at most 255 bytes. Leading and trailing spaces are trimmed. `null` or a blank string clears it, so invoices show the user's own name again. +**id:** `str` — Membership ID (`mem_` tag), or a software license key.
@@ -29173,8 +31206,7 @@ client.members.update(
-## Memberships -
client.memberships.list(...) -> ListMembershipsResponse +
client.memberships.update(...) -> Membership
@@ -29186,7 +31218,7 @@ client.members.update(
-Lists every membership the caller can read: an account API key its account's; a user credential their own plus those of every account they manage. `account_id` and `user_id` only narrow that list — values outside the caller's reach return fewer results, not an error. +Updates a membership's metadata, scheduled cancellation, renewal payment method, renewal cadence, or next renewal date.
@@ -29209,17 +31241,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.list( - external_account="discord_123456789012345678", - product_ids=[ - "prod_xxxxxxxxxxxxx" - ], - variant_ids=[ - "plan_xxxxxxxxxxxxx" - ], - promo_code_ids=[ - "promo_xxxxxxxxxxxxxx" - ], +client.memberships.update( + id="id", + billing_period_days=45, ) ``` @@ -29236,7 +31260,7 @@ client.memberships.list(
-**account_id:** `typing.Optional[str]` — Narrow to one account (`biz_` tag). With read access to the account this lists all of its memberships; without, only the caller's own memberships in it. +**id:** `str` — Membership ID (`mem_` tag), or a software license key.
@@ -29244,7 +31268,7 @@ client.memberships.list(
-**user_id:** `typing.Optional[str]` — Narrow to one user's memberships (`user_` tag, or `me` for the caller). A user outside the caller's visible set returns an empty list. +**billing_period_days:** `typing.Optional[int]` — Number of days between recurring charges, applied to every recurring variant so future renewals use the same cadence. Sets the current period end to the current period start plus this value; when the value is a multiple of 30 or is 365, a membership that renews on a fixed day of the month (for example, after `current_period_end` was set) ends on that day instead. The new period end must remain in the future. Only for active, trialing, or past-due memberships billed automatically by Whop; invoice, externally billed, and canceling memberships are not supported. Existing non-daily memberships cannot be changed to daily billing. Cannot be combined with other fields.
@@ -29252,7 +31276,7 @@ client.memberships.list(
-**member_id:** `typing.Optional[str]` — Narrow to one member's memberships (`mber_` tag), including memberships bought by another business. A member outside the caller's visible set returns an empty list. +**cancel_at_period_end:** `typing.Optional[bool]` — `true` cancels at the end of the current billing period (the customer keeps access until then); `false` reverses a pending cancellation.
@@ -29260,7 +31284,7 @@ client.memberships.list(
-**external_account:** `typing.Optional[str]` — Narrow to memberships linked to one Discord or Telegram account, given as the platform's user ID prefixed with `discord_` or `telegram_`. Discord matches include memberships imported with that Discord ID. Any other format is a 400. +**current_period_end:** `typing.Optional[datetime.datetime]` — When the next renewal charges, as an ISO 8601 timestamp; a date without a time means midnight UTC. Must fall after today in UTC. Later renewals follow on from this date, and a membership charged automatically on a variant billed every 30, 60, 90 … 360 or 365 days keeps renewing on this day of the month in UTC, or on the month's last day when a month is shorter. Only for active or trialing renewing memberships billed by Whop whose payments are not paused. Cannot be combined with other fields.
@@ -29268,7 +31292,7 @@ client.memberships.list(
-**status:** `typing.Optional[ListMembershipsRequestStatus]` — Filter by billing state. `trialing`, `active`, `past_due`, `completed`, `canceled`, and `expired` match the membership's `status`; `active`, `trialing`, and `past_due` exclude memberships set to cancel at period end. The other values are derived buckets that never appear as a `status`: `canceling` matches memberships set to cancel at period end; `paused` matches memberships with payment collection paused; `expiring` matches one-time purchases that have not yet expired; `one_time` matches one-time purchases that never expire; `unclaimed` matches memberships with no buyer user, including memberships bought by another business; `banned` matches memberships whose buyer is banned from the account. +**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Key-value pairs to merge into the membership's metadata. Pass an empty object to clear it.
@@ -29276,7 +31300,7 @@ client.memberships.list(
-**statuses:** `typing.Optional[typing.Union[ListMembershipsRequestStatusesItem, typing.Sequence[ListMembershipsRequestStatusesItem]]]` — Filter to memberships matching any of these billing states, with the same meanings as `status`. Repeat the parameter to pass several. Combined with `status` when both are sent. +**payment_method_id:** `typing.Optional[str]` — The ID of a payment method the customer has saved with your account. Future renewals charge it, and an open past-due payment is retried on it right away. Requires the `member:payment_methods:manage` permission.
@@ -29284,15 +31308,73 @@ client.memberships.list(
-**product_id:** `typing.Optional[str]` — Filter to memberships of this product (`prod_` tag). +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.memberships.apply_promo_code(...) -> Membership
-**product_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships of any of these products, each prefixed `prod_`. Repeat the parameter to pass several. +#### 📝 Description + +
+
+ +
+
+ +Applies a promo code to an `active` or `trialing` membership that does not already have one and has exactly one recurring item, for Stripe-billed memberships and memberships billed by Whop's billing engine. The discount lands on the next invoice and follows the code's duration (`once`, `repeating`, or `forever`). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.memberships.apply_promo_code( + id="id", + promo_code="SAVE20", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Membership ID (`mem_` tag).
@@ -29300,7 +31382,7 @@ client.memberships.list(
-**variant_id:** `typing.Optional[str]` — Filter to memberships of this variant (`plan_` tag). +**promo_code:** `str` — The promo code to apply, as customers enter it at checkout (for example `SAVE20`). Its stock, variant eligibility, and expiry are checked as at checkout.
@@ -29308,15 +31390,75 @@ client.memberships.list(
-**variant_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships of any of these variants, each prefixed `plan_`. Repeat the parameter to pass several. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ + +
+
+
+
client.memberships.assign_affiliate(...) -> Membership
-**promo_code_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter to memberships discounted by any of these promo codes, each prefixed `promo_`. Repeat the parameter to pass several. +#### 📝 Description + +
+
+ +
+
+ +Assigns an affiliate to a membership and pays them the commission you set on its future payments; past payments are not recalculated. A user who is not yet an affiliate of your account becomes one, which also requires `affiliate:create`. Send a new `commission_type` or `commission_value` for the membership's current affiliate to change their commission; a membership that already has a different affiliate returns a conflict. Works for active or trialing memberships with one recurring variant that bill through Stripe or Whop's billing engine, and not for marketplace memberships, paused payments, or a scheduled cancellation. You cannot assign yourself. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.memberships.assign_affiliate( + id="id", + commission_type="flat_fee", + commission_value=5, + email="affiliate@example.com", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Membership ID (`mem_` tag).
@@ -29324,7 +31466,7 @@ client.memberships.list(
-**created_after:** `typing.Optional[str]` — Only memberships created after this ISO 8601 timestamp. +**commission_type:** `AssignAffiliateMembershipsRequestCommissionType` — Whether the commission is a percentage of each payment or a fixed amount per payment.
@@ -29332,7 +31474,7 @@ client.memberships.list(
-**created_before:** `typing.Optional[str]` — Only memberships created before this ISO 8601 timestamp. +**commission_value:** `float` — A whole number from 1 to 90 for `percentage`, or an amount greater than 1 in the membership currency for `flat_fee`. The payout cannot exceed 90% of the next renewal amount. Flat fees need matching billing and settlement currencies.
@@ -29340,7 +31482,7 @@ client.memberships.list(
-**order:** `typing.Optional[ListMembershipsRequestOrder]` — Sort field. +**email:** `typing.Optional[str]` — Email address of the user to assign. Pass exactly one of `user_id`, `email`, or `username`.
@@ -29348,7 +31490,7 @@ client.memberships.list(
-**direction:** `typing.Optional[ListMembershipsRequestDirection]` — Sort direction. +**user_id:** `typing.Optional[str]` — The user to assign, prefixed `user_`. Pass exactly one of `user_id`, `email`, or `username`.
@@ -29356,7 +31498,7 @@ client.memberships.list(
-**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +**username:** `typing.Optional[str]` — Whop username of the user to assign. Pass exactly one of `user_id`, `email`, or `username`.
@@ -29364,15 +31506,72 @@ client.memberships.list(
-**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+ +
+
+
+ +
client.memberships.cancel(...) -> Membership
-**last:** `typing.Optional[int]` — Number of results to return from the end of the range. +#### 📝 Description + +
+
+ +
+
+ +Cancels a membership, either immediately or at the end of the current billing period. Buyers cannot cancel buy-now-pay-later (`splitit`, `sezzle`) or non-trial split-pay memberships. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.memberships.cancel( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — Membership ID (`mem_` tag).
@@ -29380,7 +31579,7 @@ client.memberships.list(
-**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. +**cancel_at_period_end:** `typing.Optional[bool]` — `true` stops auto-renewal and keeps access until the current billing period ends. Omit or `false` revokes access immediately.
@@ -29388,7 +31587,15 @@ client.memberships.list(
-**include_total_count:** `typing.Optional[bool]` — Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. +**feedback_option_id:** `typing.Optional[str]` — The ID of the feedback option the customer picked as their reason for canceling, from the account's `feedback_options` preference. The membership records the option's label as the customer saw it and its category as `cancel_option`. + +
+
+ +
+
+ +**reason:** `typing.Optional[str]` — Free-form note recording why the membership was canceled.
@@ -29408,7 +31615,7 @@ client.memberships.list(
-
client.memberships.invite(...) -> InviteMembershipsResponse +
client.memberships.extend(...) -> Membership
@@ -29420,7 +31627,7 @@ client.memberships.list(
-Emails one recipient an invitation to a free variant's membership. The invitation is bound to that recipient; after signing in, accepting it immediately grants the membership without checkout. This Experimental endpoint is available only to accounts enabled for membership invitations. +Adds free days to a membership, extending its current billing period, expiration date, or trial depending on the plan type.
@@ -29437,18 +31644,15 @@ Emails one recipient an invitation to a free variant's membership. The invitatio ```python from whop_sdk import Whop from whop_sdk.environment import WhopEnvironment -from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = Whop( token="", environment=WhopEnvironment.PRODUCTION, ) -client.memberships.invite( - request=InviteMembershipsRequestBodyUserId( - user_id="user_xxxxxxxxxxxxxx", - variant_id="plan_xxxxxxxxxxxxxx", - ), +client.memberships.extend( + id="id", + days=7, ) ``` @@ -29465,7 +31669,15 @@ client.memberships.invite(
-**request:** `InviteMembershipsRequestBody` +**id:** `str` — Membership ID (`mem_` tag). + +
+
+ +
+
+ +**days:** `int` — Number of free days to add (1-1095).
@@ -29485,7 +31697,7 @@ client.memberships.invite(
-
client.memberships.retrieve(...) -> Membership +
client.memberships.pause(...) -> Membership
@@ -29497,7 +31709,7 @@ client.memberships.invite(
-Retrieves a membership by ID or license key. Accessible to the account and to the membership's own user. +Pauses a membership's recurring payment collection. The customer keeps access but is not charged until the membership is resumed.
@@ -29520,7 +31732,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.retrieve( +client.memberships.pause( id="id", ) @@ -29538,7 +31750,15 @@ client.memberships.retrieve(
-**id:** `str` — Membership ID (`mem_` tag), or a software license key. +**id:** `str` — Membership ID (`mem_` tag). + +
+
+ +
+
+ +**until:** `typing.Optional[str]` — ISO 8601 time to automatically resume payment collection. Must be in the future; only supported for memberships billed by Whop.
@@ -29558,7 +31778,7 @@ client.memberships.retrieve(
-
client.memberships.update(...) -> Membership +
client.memberships.reactivate(...) -> Membership
@@ -29570,7 +31790,7 @@ client.memberships.retrieve(
-Updates a membership's metadata, scheduled cancellation, renewal payment method, renewal cadence, or next renewal date. +Restores access to a `canceled` or `expired` membership that contains only one-time purchases and sets its `status` to `completed`. Lifetime memberships regain lifetime access; for memberships with an expiration, `days` sets the new `current_period_end`. Active and recurring memberships cannot be reactivated.
@@ -29593,9 +31813,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.update( +client.memberships.reactivate( id="id", - billing_period_days=45, ) ``` @@ -29612,39 +31831,7 @@ client.memberships.update(
-**id:** `str` — Membership ID (`mem_` tag), or a software license key. - -
-
- -
-
- -**billing_period_days:** `typing.Optional[int]` — Number of days between recurring charges, applied to every recurring variant so future renewals use the same cadence. Sets the current period end to the current period start plus this value; when the value is a multiple of 30 or is 365, a membership that renews on a fixed day of the month (for example, after `current_period_end` was set) ends on that day instead. The new period end must remain in the future. Only for active, trialing, or past-due memberships billed automatically by Whop; invoice, externally billed, and canceling memberships are not supported. Existing non-daily memberships cannot be changed to daily billing. Cannot be combined with other fields. - -
-
- -
-
- -**cancel_at_period_end:** `typing.Optional[bool]` — `true` cancels at the end of the current billing period (the customer keeps access until then); `false` reverses a pending cancellation. - -
-
- -
-
- -**current_period_end:** `typing.Optional[datetime.datetime]` — When the next renewal charges, as an ISO 8601 timestamp; a date without a time means midnight UTC. Must fall after today in UTC. Later renewals follow on from this date, and a membership charged automatically on a variant billed every 30, 60, 90 … 360 or 365 days keeps renewing on this day of the month in UTC, or on the month's last day when a month is shorter. Only for active or trialing renewing memberships billed by Whop whose payments are not paused. Cannot be combined with other fields. - -
-
- -
-
- -**metadata:** `typing.Optional[typing.Dict[str, typing.Any]]` — Key-value pairs to merge into the membership's metadata. Pass an empty object to clear it. +**id:** `str` — Membership ID (`mem_` tag).
@@ -29652,7 +31839,7 @@ client.memberships.update(
-**payment_method_id:** `typing.Optional[str]` — The ID of a payment method the customer has saved with your account. Future renewals charge it, and an open past-due payment is retried on it right away. Requires the `member:payment_methods:manage` permission. +**days:** `typing.Optional[int]` — Days of access from now (1-1095), which sets `current_period_end`. Omit to keep the original `current_period_end`; required once it has passed. Ignored for lifetime memberships.
@@ -29672,7 +31859,7 @@ client.memberships.update(
-
client.memberships.apply_promo_code(...) -> Membership +
client.memberships.resume(...) -> Membership
@@ -29684,7 +31871,7 @@ client.memberships.update(
-Applies a promo code to an `active` or `trialing` membership that does not already have one and has exactly one recurring item, for Stripe-billed memberships and memberships billed by Whop's billing engine. The discount lands on the next invoice and follows the code's duration (`once`, `repeating`, or `forever`). +Resumes a previously paused membership's recurring payment collection. Billing resumes on the next cycle.
@@ -29707,9 +31894,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.apply_promo_code( +client.memberships.resume( id="id", - promo_code="SAVE20", ) ``` @@ -29734,14 +31920,6 @@ client.memberships.apply_promo_code(
-**promo_code:** `str` — The promo code to apply, as customers enter it at checkout (for example `SAVE20`). Its stock, variant eligibility, and expiry are checked as at checkout. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -29754,7 +31932,7 @@ client.memberships.apply_promo_code(
-
client.memberships.assign_affiliate(...) -> Membership +
client.memberships.resync_access(...) -> Membership
@@ -29766,7 +31944,7 @@ client.memberships.apply_promo_code(
-Assigns an affiliate to a membership and pays them the commission you set on its future payments; past payments are not recalculated. A user who is not yet an affiliate of your account becomes one, which also requires `affiliate:create`. Send a new `commission_type` or `commission_value` for the membership's current affiliate to change their commission; a membership that already has a different affiliate returns a conflict. Works for active or trialing memberships with one recurring variant that bill through Stripe or Whop's billing engine, and not for marketplace memberships, paused payments, or a scheduled cancellation. You cannot assign yourself. +Re-runs 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 is not resynced. The work runs in the background and the outcome is written to the membership's logs.
@@ -29789,11 +31967,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.assign_affiliate( +client.memberships.resync_access( id="id", - commission_type="flat_fee", - commission_value=5, - email="affiliate@example.com", ) ``` @@ -29818,46 +31993,6 @@ client.memberships.assign_affiliate(
-**commission_type:** `AssignAffiliateMembershipsRequestCommissionType` — Whether the commission is a percentage of each payment or a fixed amount per payment. - -
-
- -
-
- -**commission_value:** `float` — A whole number from 1 to 90 for `percentage`, or an amount greater than 1 in the membership currency for `flat_fee`. The payout cannot exceed 90% of the next renewal amount. Flat fees need matching billing and settlement currencies. - -
-
- -
-
- -**email:** `typing.Optional[str]` — Email address of the user to assign. Pass exactly one of `user_id`, `email`, or `username`. - -
-
- -
-
- -**user_id:** `typing.Optional[str]` — The user to assign, prefixed `user_`. Pass exactly one of `user_id`, `email`, or `username`. - -
-
- -
-
- -**username:** `typing.Optional[str]` — Whop username of the user to assign. Pass exactly one of `user_id`, `email`, or `username`. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -29870,7 +32005,7 @@ client.memberships.assign_affiliate(
-
client.memberships.cancel(...) -> Membership +
client.memberships.transfer(...) -> TransferMembershipsResponse
@@ -29882,7 +32017,7 @@ client.memberships.assign_affiliate(
-Cancels a membership, either immediately or at the end of the current billing period. Buyers cannot cancel buy-now-pay-later (`splitit`, `sezzle`) or non-trial split-pay memberships. +Creates a one-use transfer URL for a membership. Opening the URL while logged into a different Whop account claims the membership onto that account. The membership's buyer can generate a link for their own membership with `membership:transfer` when the product allows transfers and the membership is `trialing`, `active`, or `completed`. An account credential with `membership:update` bypasses both restrictions.
@@ -29905,7 +32040,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.cancel( +client.memberships.transfer( id="id", ) @@ -29931,30 +32066,6 @@ client.memberships.cancel(
-**cancel_at_period_end:** `typing.Optional[bool]` — `true` stops auto-renewal and keeps access until the current billing period ends. Omit or `false` revokes access immediately. - -
-
- -
-
- -**feedback_option_id:** `typing.Optional[str]` — The ID of the feedback option the customer picked as their reason for canceling, from the account's `feedback_options` preference. The membership records the option's label as the customer saw it and its category as `cancel_option`. - -
-
- -
-
- -**reason:** `typing.Optional[str]` — Free-form note recording why the membership was canceled. - -
-
- -
-
- **request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -29967,7 +32078,8 @@ client.memberships.cancel(
-
client.memberships.extend(...) -> Membership +## Messages +
client.messages.list(...) -> ListMessagesResponse
@@ -29979,7 +32091,7 @@ client.memberships.cancel(
-Adds free days to a membership, extending its current billing period, expiration date, or trial depending on the plan type. +Lists messages in a channel. Existing public message and channel IDs are preserved. For reconnect synchronization, use inclusive updated_after with include_deleted=true; results use ascending change order. Follow the returned cursors and replace cached messages by ID, including when updated_at is unchanged. The returned updated_at is the stored message update time; reaction changes only affect synchronization ordering. Deleted entries contain identity and timestamps with their content redacted. To jump into history, specify channel_id and one around anchor; results use ascending creation-time order. For older messages in chronological order, use before_message_id with last and direction=asc; for newer messages, use after_message_id with first and direction=asc. Do not supply order or direction with updated_after or an around anchor. Keep message-ID filters when continuing with cursors. For around queries, omit the around anchor and continue with direction=asc.
@@ -30002,9 +32114,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.extend( - id="id", - days=7, +client.messages.list( + channel_id="channel_id", ) ``` @@ -30021,7 +32132,7 @@ client.memberships.extend(
-**id:** `str` — Membership ID (`mem_` tag). +**channel_id:** `str` — Filter by public channel ID. An experience ID is also accepted for experience chat.
@@ -30029,7 +32140,7 @@ client.memberships.extend(
-**days:** `int` — Number of free days to add (1-1095). +**replying_to_message_id:** `typing.Optional[str]` — Return replies to this message.
@@ -30037,72 +32148,47 @@ client.memberships.extend(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**pinned:** `typing.Optional[bool]` — Filter by message pin state.
- -
+
+
+**include_deleted:** `typing.Optional[bool]` — Include redacted deletion entries for cache synchronization. +
-
-
client.memberships.pause(...) -> Membership
-#### 📝 Description - -
-
+**created_after:** `typing.Optional[str]` — Return messages created strictly after this ISO 8601 timestamp. + +
+
-Pauses a membership's recurring payment collection. The customer keeps access but is not charged until the membership is resumed. -
-
+**created_before:** `typing.Optional[str]` — Return messages created strictly before this ISO 8601 timestamp. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.memberships.pause( - id="id", -) - -``` -
-
+**updated_after:** `typing.Optional[str]` — Return messages changed at or after this ISO 8601 timestamp in ascending change order. Cannot be combined with history filters, around anchors, order, or direction. +
-#### ⚙️ Parameters -
-
-
- -**id:** `str` — Membership ID (`mem_` tag). +**before_message_id:** `typing.Optional[str]` — Filter messages strictly before this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after.
@@ -30110,7 +32196,7 @@ client.memberships.pause(
-**until:** `typing.Optional[str]` — ISO 8601 time to automatically resume payment collection. Must be in the future; only supported for memberships billed by Whop. +**after_message_id:** `typing.Optional[str]` — Filter messages strictly after this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after.
@@ -30118,72 +32204,55 @@ client.memberships.pause(
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. +**around_message_id:** `typing.Optional[str]` — Center the first page around this live message in the selected channel.
-
-
+
+
+**around_timestamp:** `typing.Optional[str]` — Center the first page around this ISO 8601 timestamp in the selected channel. +
-
-
client.memberships.reactivate(...) -> Membership
-#### 📝 Description - -
-
+**order:** `typing.Optional[ListMessagesRequestOrder]` — History sort field. Defaults to created_at. Cannot be supplied with updated_after or around anchors. + +
+
-Restores access to a `canceled` or `expired` membership that contains only one-time purchases and sets its `status` to `completed`. Lifetime memberships regain lifetime access; for memberships with an expiration, `days` sets the new `current_period_end`. Active and recurring memberships cannot be reactivated. -
-
+**direction:** `typing.Optional[ListMessagesRequestDirection]` — History sort direction. Defaults to desc. Cannot be supplied with updated_after or around anchors. +
-#### 🔌 Usage -
-
-
- -```python -from whop_sdk import Whop -from whop_sdk.environment import WhopEnvironment - -client = Whop( - token="", - environment=WhopEnvironment.PRODUCTION, -) - -client.memberships.reactivate( - id="id", -) - -``` -
-
+**first:** `typing.Optional[int]` — Number of results to return from the start of the range. +
-#### ⚙️ Parameters -
+**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + +
+
+
-**id:** `str` — Membership ID (`mem_` tag). +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -30191,7 +32260,7 @@ client.memberships.reactivate(
-**days:** `typing.Optional[int]` — Days of access from now (1-1095), which sets `current_period_end`. Omit to keep the original `current_period_end`; required once it has passed. Ignored for lifetime memberships. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -30211,7 +32280,7 @@ client.memberships.reactivate(
-
client.memberships.resume(...) -> Membership +
client.messages.create(...) -> ChatMessage
@@ -30223,7 +32292,7 @@ client.memberships.reactivate(
-Resumes a previously paused membership's recurring payment collection. Billing resumes on the next cycle. +Sends a Markdown message as the authenticated user or app agent. Channel access, posting restrictions, moderation, and delivery follow the existing chat services. Use Idempotency-Key to safely retry a send. The response and realtime message use the same message ID. Custom author presentation and embeds are read-only.
@@ -30246,8 +32315,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.resume( - id="id", +client.messages.create( + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + content="New **message**", ) ``` @@ -30264,7 +32334,55 @@ client.memberships.resume(
-**id:** `str` — Membership ID (`mem_` tag). +**channel_id:** `str` — Public channel ID, or an experience ID for experience chat. + +
+
+ +
+
+ +**content:** `str` — Markdown content. May be empty when the message contains media or a poll. + +
+
+ +
+
+ +**attachments:** `typing.Optional[typing.List[CreateMessagesRequestAttachmentsItem]]` — Files to attach to the message. + +
+
+ +
+
+ +**auto_detect_links:** `typing.Optional[bool]` — Generate previews for URLs in content. Mutually exclusive with link_previews. + +
+
+ +
+
+ +**link_previews:** `typing.Optional[typing.List[CreateMessagesRequestLinkPreviewsItem]]` — Explicit URLs for the server to preview. + +
+
+ +
+
+ +**poll:** `typing.Optional[CreateMessagesRequestPoll]` + +
+
+ +
+
+ +**replying_to_message_id:** `typing.Optional[str]` — A live message in the same channel to reply to.
@@ -30284,7 +32402,7 @@ client.memberships.resume(
-
client.memberships.resync_access(...) -> Membership +
client.messages.retrieve(...) -> ChatMessage
@@ -30296,7 +32414,7 @@ client.memberships.resume(
-Re-runs 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 is not resynced. The work runs in the background and the outcome is written to the membership's logs. +Retrieves a live message from an accessible channel. Use list synchronization to retrieve deletion entries.
@@ -30319,7 +32437,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.resync_access( +client.messages.retrieve( id="id", ) @@ -30337,7 +32455,7 @@ client.memberships.resync_access(
-**id:** `str` — Membership ID (`mem_` tag). +**id:** `str` — Existing public message ID.
@@ -30357,7 +32475,7 @@ client.memberships.resync_access(
-
client.memberships.transfer(...) -> TransferMembershipsResponse +
client.messages.delete(...)
@@ -30369,7 +32487,7 @@ client.memberships.resync_access(
-Creates a one-use transfer URL for a membership. Opening the URL while logged into a different Whop account claims the membership onto that account. The membership's buyer can generate a link for their own membership with `membership:transfer` when the product allows transfers and the membership is `trialing`, `active`, or `completed`. An account credential with `membership:update` bypasses both restrictions. +Deletes a message as its author or a permitted moderator. Deleted messages remain available as redacted entries through list synchronization.
@@ -30392,7 +32510,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.memberships.transfer( +client.messages.delete( id="id", ) @@ -30410,7 +32528,7 @@ client.memberships.transfer(
-**id:** `str` — Membership ID (`mem_` tag). +**id:** `str` — Existing public message ID.
@@ -30430,8 +32548,7 @@ client.memberships.transfer(
-## Messages -
client.messages.list(...) -> ListMessagesResponse +
client.messages.update(...) -> ChatMessage
@@ -30443,12 +32560,7 @@ client.memberships.transfer(
-Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. - -Required permissions (one of): - - `chat:read` - - `dms:read` - - `support_chat:read` +Updates the author's message. Use the pin and unpin actions to change its pin state. Omitted fields are preserved; attachment and preview collections replace their previous values.
@@ -30471,10 +32583,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.messages.list( - first=42, - last=42, - channel_id="channel_id", +client.messages.update( + id="id", ) ``` @@ -30491,7 +32601,7 @@ client.messages.list(
-**channel_id:** `str` — The unique identifier of the channel or experience to list messages for. +**id:** `str` — Existing public message ID.
@@ -30499,7 +32609,7 @@ client.messages.list(
-**after:** `typing.Optional[str]` — Returns the elements in the list that come after the specified cursor. +**attachments:** `typing.Optional[typing.List[UpdateMessagesRequestAttachmentsItem]]` — Replacement attachment list; pass an empty list to remove attachments.
@@ -30507,7 +32617,7 @@ client.messages.list(
-**before:** `typing.Optional[str]` — Returns the elements in the list that come before the specified cursor. +**content:** `typing.Optional[str]` — Replacement Markdown content.
@@ -30515,7 +32625,7 @@ client.messages.list(
-**first:** `typing.Optional[int]` — Returns the first _n_ elements from the list. +**link_previews:** `typing.Optional[typing.List[UpdateMessagesRequestLinkPreviewsItem]]` — Replacement preview URLs; pass an empty list to remove previews.
@@ -30523,15 +32633,72 @@ client.messages.list(
-**last:** `typing.Optional[int]` — Returns the last _n_ elements from the list. +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+ +
+ + + + +
+
client.messages.pin(...) -> ChatMessage
-**direction:** `typing.Optional[Direction]` +#### 📝 Description + +
+
+ +
+
+ +Pins a message in its channel. Requires the channel's pin permission. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.messages.pin( + id="id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The message to pin.
@@ -30551,7 +32718,7 @@ client.messages.list(
-
client.messages.create(...) -> Message +
client.messages.react(...) -> ChatMessage
@@ -30563,13 +32730,89 @@ client.messages.list(
-Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. +Add your emoji reaction to a message. Reacting again with the same emoji changes nothing. +
+
+
+
-Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` +#### 🔌 Usage + +
+
+ +
+
+ +```python +from whop_sdk import Whop +from whop_sdk.environment import WhopEnvironment + +client = Whop( + token="", + environment=WhopEnvironment.PRODUCTION, +) + +client.messages.react( + id="id", + emoji="❤️", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**id:** `str` — The ID of the message to react to. + +
+
+ +
+
+ +**emoji:** `str` — A single Unicode emoji or a supported shortcode such as `:heart:`. + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + + + +
+ +
client.messages.list_reactions(...) -> ListReactionsMessagesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +List who reacted to a message, newest first. Optionally filter by emoji.
@@ -30592,9 +32835,8 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.messages.create( - channel_id="channel_id", - content="content", +client.messages.list_reactions( + id="id", ) ``` @@ -30611,7 +32853,7 @@ client.messages.create(
-**channel_id:** `str` — The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'. +**id:** `str` — The ID of the message.
@@ -30619,7 +32861,7 @@ client.messages.create(
-**content:** `str` — The body of the message in Markdown format. For example, 'Hello **world**'. +**first:** `typing.Optional[int]` — Number of results to return from the start of the range.
@@ -30627,7 +32869,7 @@ client.messages.create(
-**attachments:** `typing.Optional[typing.List[CreateMessagesRequestAttachmentsItem]]` — A list of file attachments to include with the message, such as images or videos. +**after:** `typing.Optional[str]` — Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page.
@@ -30635,7 +32877,7 @@ client.messages.create(
-**auto_detect_links:** `typing.Optional[bool]` — Automatically detect URLs in the message and generate link previews. +**last:** `typing.Optional[int]` — Number of results to return from the end of the range.
@@ -30643,7 +32885,7 @@ client.messages.create(
-**poll:** `typing.Optional[CreateMessagesRequestPoll]` — A poll to attach to this message, allowing recipients to vote on options. +**before:** `typing.Optional[str]` — Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page.
@@ -30651,7 +32893,7 @@ client.messages.create(
-**replying_to_message_id:** `typing.Optional[str]` — The unique identifier of the message this is replying to, creating a threaded reply. +**emoji:** `typing.Optional[str]` — Only return reactions with this emoji, as a Unicode emoji or a supported shortcode.
@@ -30671,7 +32913,7 @@ client.messages.create(
-
client.messages.retrieve(...) -> Message +
client.messages.unpin(...) -> ChatMessage
@@ -30683,13 +32925,7 @@ client.messages.create(
-Retrieves the details of an existing message. - -Required permissions (one of): - - `chat:read` - - `dms:read` - - `livestream:chat:read` - - `support_chat:read` +Unpins a message in its channel. Requires the channel's pin permission.
@@ -30712,7 +32948,7 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.messages.retrieve( +client.messages.unpin( id="id", ) @@ -30730,7 +32966,7 @@ client.messages.retrieve(
-**id:** `str` — The unique identifier of the message to retrieve. +**id:** `str` — The message to unpin.
@@ -30750,7 +32986,7 @@ client.messages.retrieve(
-
client.messages.delete(...) -> bool +
client.messages.unreact(...) -> ChatMessage
@@ -30762,13 +32998,7 @@ client.messages.retrieve(
-Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. - -Required permissions (one of): - - `chat:message:create` and `chat:read` - - `dms:message:manage` and `dms:read` - - `livestream:chat:write` and `livestream:chat:read` - - `support_chat:message:create` and `support_chat:read` +Remove your emoji reaction from a message. Removing a reaction you have not added changes nothing.
@@ -30791,8 +33021,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.messages.delete( +client.messages.unreact( id="id", + emoji="❤️", ) ``` @@ -30809,7 +33040,15 @@ client.messages.delete(
-**id:** `str` — The unique identifier of the message to delete. +**id:** `str` — The ID of the message to remove your reaction from. + +
+
+ +
+
+ +**emoji:** `str` — The emoji to remove, as a Unicode emoji or a supported shortcode.
@@ -30829,7 +33068,7 @@ client.messages.delete(
-
client.messages.update(...) -> Message +
client.messages.vote(...) -> ChatMessage
@@ -30841,13 +33080,7 @@ client.messages.delete(
-Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. - -Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` +Vote for one option on a message poll. Each user can vote once per poll.
@@ -30870,8 +33103,9 @@ client = Whop( environment=WhopEnvironment.PRODUCTION, ) -client.messages.update( +client.messages.vote( id="id", + poll_option_id="2", ) ``` @@ -30888,23 +33122,7 @@ client.messages.update(
-**id:** `str` — The unique identifier of the message to update. - -
-
- -
-
- -**attachments:** `typing.Optional[typing.List[UpdateMessagesRequestAttachmentsItem]]` — A replacement list of file attachments for this message, such as images or videos. - -
-
- -
-
- -**content:** `typing.Optional[str]` — The updated body of the message in Markdown format. For example, 'Hello **world**'. +**id:** `str` — The ID of the message containing the poll.
@@ -30912,7 +33130,7 @@ client.messages.update(
-**is_pinned:** `typing.Optional[bool]` — Whether this message should be pinned to the top of the channel. +**poll_option_id:** `str` — The option ID from the poll, not its display text.
@@ -47112,6 +49330,14 @@ client.users.list()
+**context_channel_id:** `typing.Optional[str]` — Prioritize people relevant to this channel for mentions. Results remain global; channel access is required. + +
+
+ +
+
+ **query:** `typing.Optional[str]` — A search term to filter users by name or username.
diff --git a/src/whop_sdk/__init__.py b/src/whop_sdk/__init__.py index 64d84a844..3e2b50bf3 100644 --- a/src/whop_sdk/__init__.py +++ b/src/whop_sdk/__init__.py @@ -328,10 +328,28 @@ CashbackPayout, CashbackPayoutStatus, CashbackRule, + Channel, + ChannelKind, + ChannelListItem, + ChannelListItemKind, + ChannelMember, + ChannelMemberInboxStatus, + ChannelMemberNotificationPreference, + ChannelModeration, + ChannelModerationWhoCanPost, + ChannelModerationWhoCanReact, + ChannelSupportState, + ChannelSupportStateLastMessageBy, + ChannelSupportStateStatus, ChatChannel, ChatChannelExperience, ChatChannelListItem, ChatChannelListItemExperience, + ChatMessage, + ChatMessageMessageType, + ChatMessagePoll, + ChatMessagePollOption, + ChatReaction, CheckoutConfiguration, CheckoutConfigurationCurrency, CheckoutConfigurationListItem, @@ -513,6 +531,10 @@ EconomicIntelligenceSentiment, EconomicIntelligenceStatus, EmailAddress, + Embed, + EmbedField, + EmbedFooter, + EmbedImage, EmbedTypes, Entry, EntryCustomFieldResponsesItem, @@ -609,6 +631,7 @@ FunnelStep, FunnelStepResult, FutureUsageTypes, + Gif, GlobalAffiliateStatuses, GrantableAuthorizedUserRoles, IdentityProfile, @@ -790,6 +813,9 @@ MembershipsSortableColumns, Message, MessageChannelOrder, + MessageCustomAuthor, + MessageLinkFooter, + MessageLinkPreview, MessageListItem, MessageListItemPoll, MessageListItemPollOptionsItem, @@ -799,6 +825,8 @@ MessagePoll, MessagePollOptionsItem, MessagePollVotesItem, + MessageReactionCount, + MessageReactionCountKind, MessageReactionCountsItem, MessageUser, Money, @@ -1494,6 +1522,8 @@ card_transactions, cards, cashback_rules, + channel_members, + channels, chat_channels, checkout_configurations, claim_links, @@ -2047,6 +2077,25 @@ ListCashbackRulesResponse, ListCashbackRulesResponsePageInfo, ) + from .channel_members import ( + ListChannelMembersResponse, + ListChannelMembersResponsePageInfo, + UpdateChannelMembersRequestNotificationPreference, + ) + from .channels import ( + CreateChannelsRequestKind, + ListChannelsRequestDirection, + ListChannelsRequestKindItem, + ListChannelsRequestOrder, + ListChannelsRequestStatus, + ListChannelsRequestSupportRole, + ListChannelsResponse, + ListChannelsResponsePageInfo, + UpdateChannelsRequestIcon, + UpdateChannelsRequestModeration, + UpdateChannelsRequestModerationWhoCanPost, + UpdateChannelsRequestModerationWhoCanReact, + ) from .chat_channels import ListChatChannelsResponse from .checkout_configurations import ( CreateCheckoutConfigurationsRequestMode, @@ -2551,9 +2600,15 @@ ) from .messages import ( CreateMessagesRequestAttachmentsItem, + CreateMessagesRequestLinkPreviewsItem, CreateMessagesRequestPoll, CreateMessagesRequestPollOptionsItem, + ListMessagesRequestDirection, + ListMessagesRequestOrder, ListMessagesResponse, + ListMessagesResponsePageInfo, + ListReactionsMessagesResponse, + ListReactionsMessagesResponsePageInfo, PostChatMessageCreatedPayload, PostChatMessageCreatedPayloadApiVersion, PostChatMessageCreatedPayloadData, @@ -2563,6 +2618,7 @@ PostChatMessageCreatedPayloadDataChannelType, PostChatMessageCreatedPayloadType, UpdateMessagesRequestAttachmentsItem, + UpdateMessagesRequestLinkPreviewsItem, ) from .notifications import ( BadgesNotificationsResponse, @@ -3767,10 +3823,28 @@ "CashbackPayout": ".types", "CashbackPayoutStatus": ".types", "CashbackRule": ".types", + "Channel": ".types", + "ChannelKind": ".types", + "ChannelListItem": ".types", + "ChannelListItemKind": ".types", + "ChannelMember": ".types", + "ChannelMemberInboxStatus": ".types", + "ChannelMemberNotificationPreference": ".types", + "ChannelModeration": ".types", + "ChannelModerationWhoCanPost": ".types", + "ChannelModerationWhoCanReact": ".types", + "ChannelSupportState": ".types", + "ChannelSupportStateLastMessageBy": ".types", + "ChannelSupportStateStatus": ".types", "ChatChannel": ".types", "ChatChannelExperience": ".types", "ChatChannelListItem": ".types", "ChatChannelListItemExperience": ".types", + "ChatMessage": ".types", + "ChatMessageMessageType": ".types", + "ChatMessagePoll": ".types", + "ChatMessagePollOption": ".types", + "ChatReaction": ".types", "CheckAccessUsersResponse": ".users", "CheckAccessUsersResponseAccessLevel": ".users", "CheckoutConfiguration": ".types", @@ -3924,6 +3998,7 @@ "CreateCardsResponseSecrets": ".cards", "CreateCardsResponseStatus": ".cards", "CreateCardsResponseType": ".cards", + "CreateChannelsRequestKind": ".channels", "CreateCheckoutConfigurationsRequestMode": ".checkout_configurations", "CreateCheckoutConfigurationsRequestPaymentMethodConfiguration": ".checkout_configurations", "CreateCheckoutConfigurationsRequestThreeDsLevel": ".checkout_configurations", @@ -4015,6 +4090,7 @@ "CreateInvoicesRequestItemsItemVariantProductVisibility": ".invoices", "CreateInvoicesRequestItemsItemVariantVisibility": ".invoices", "CreateMessagesRequestAttachmentsItem": ".messages", + "CreateMessagesRequestLinkPreviewsItem": ".messages", "CreateMessagesRequestPoll": ".messages", "CreateMessagesRequestPollOptionsItem": ".messages", "CreateNotificationsResponse": ".notifications", @@ -4311,6 +4387,10 @@ "EconomicIntelligenceSentiment": ".types", "EconomicIntelligenceStatus": ".types", "EmailAddress": ".types", + "Embed": ".types", + "EmbedField": ".types", + "EmbedFooter": ".types", + "EmbedImage": ".types", "EmbedTypes": ".types", "Entry": ".types", "EntryCustomFieldResponsesItem": ".types", @@ -4429,6 +4509,7 @@ "FutureUsageTypes": ".types", "GenerateMediaRequestResolution": ".media", "GenerateMediaRequestType": ".media", + "Gif": ".types", "GlobalAffiliateStatuses": ".types", "GrantableAuthorizedUserRoles": ".types", "IdentityProfile": ".types", @@ -4671,6 +4752,15 @@ "ListCashbackRulesRequestOrder": ".cashback_rules", "ListCashbackRulesResponse": ".cashback_rules", "ListCashbackRulesResponsePageInfo": ".cashback_rules", + "ListChannelMembersResponse": ".channel_members", + "ListChannelMembersResponsePageInfo": ".channel_members", + "ListChannelsRequestDirection": ".channels", + "ListChannelsRequestKindItem": ".channels", + "ListChannelsRequestOrder": ".channels", + "ListChannelsRequestStatus": ".channels", + "ListChannelsRequestSupportRole": ".channels", + "ListChannelsResponse": ".channels", + "ListChannelsResponsePageInfo": ".channels", "ListChatChannelsResponse": ".chat_channels", "ListCheckoutConfigurationsRequestDirection": ".checkout_configurations", "ListCheckoutConfigurationsRequestOrder": ".checkout_configurations", @@ -4816,7 +4906,10 @@ "ListMembershipsRequestStatusesItem": ".memberships", "ListMembershipsResponse": ".memberships", "ListMembershipsResponsePageInfo": ".memberships", + "ListMessagesRequestDirection": ".messages", + "ListMessagesRequestOrder": ".messages", "ListMessagesResponse": ".messages", + "ListMessagesResponsePageInfo": ".messages", "ListNotificationsResponse": ".notifications", "ListNotificationsResponsePageInfo": ".notifications", "ListPartnerReferralRequestsRequestDirection": ".partner_referral_requests", @@ -4908,6 +5001,8 @@ "ListPromoCodesRequestStatus": ".promo_codes", "ListPromoCodesResponse": ".promo_codes", "ListPromoCodesResponsePageInfo": ".promo_codes", + "ListReactionsMessagesResponse": ".messages", + "ListReactionsMessagesResponsePageInfo": ".messages", "ListReactionsResponse": ".reactions", "ListRecipientsTransfersResponse": ".transfers", "ListRecipientsTransfersResponseDataItem": ".transfers", @@ -5093,6 +5188,9 @@ "MembershipsSortableColumns": ".types", "Message": ".types", "MessageChannelOrder": ".types", + "MessageCustomAuthor": ".types", + "MessageLinkFooter": ".types", + "MessageLinkPreview": ".types", "MessageListItem": ".types", "MessageListItemPoll": ".types", "MessageListItemPollOptionsItem": ".types", @@ -5102,6 +5200,8 @@ "MessagePoll": ".types", "MessagePollOptionsItem": ".types", "MessagePollVotesItem": ".types", + "MessageReactionCount": ".types", + "MessageReactionCountKind": ".types", "MessageReactionCountsItem": ".types", "MessageUser": ".types", "Money": ".types", @@ -6391,6 +6491,11 @@ "UpdateCardsResponseSecrets": ".cards", "UpdateCardsResponseStatus": ".cards", "UpdateCardsResponseType": ".cards", + "UpdateChannelMembersRequestNotificationPreference": ".channel_members", + "UpdateChannelsRequestIcon": ".channels", + "UpdateChannelsRequestModeration": ".channels", + "UpdateChannelsRequestModerationWhoCanPost": ".channels", + "UpdateChannelsRequestModerationWhoCanReact": ".channels", "UpdateCourseLessonsRequestAssessmentCompletionRequirement": ".course_lessons", "UpdateCourseLessonsRequestAssessmentQuestionsItem": ".course_lessons", "UpdateCourseLessonsRequestAssessmentQuestionsItemImage": ".course_lessons", @@ -6446,6 +6551,7 @@ "UpdateMeUsersRequestBanner": ".users", "UpdateMeUsersRequestProfilePicture": ".users", "UpdateMessagesRequestAttachmentsItem": ".messages", + "UpdateMessagesRequestLinkPreviewsItem": ".messages", "UpdatePaymentsRequestShippingAddress": ".payments", "UpdatePermissionsAppsRequestRequestedPermissionsItem": ".apps", "UpdatePlansRequestCustomFieldsItem": ".plans", @@ -6593,6 +6699,8 @@ "card_transactions": ".card_transactions", "cards": ".cards", "cashback_rules": ".cashback_rules", + "channel_members": ".channel_members", + "channels": ".channels", "chat_channels": ".chat_channels", "checkout_configurations": ".checkout_configurations", "claim_links": ".claim_links", @@ -7048,10 +7156,28 @@ def __dir__(): "CashbackPayout", "CashbackPayoutStatus", "CashbackRule", + "Channel", + "ChannelKind", + "ChannelListItem", + "ChannelListItemKind", + "ChannelMember", + "ChannelMemberInboxStatus", + "ChannelMemberNotificationPreference", + "ChannelModeration", + "ChannelModerationWhoCanPost", + "ChannelModerationWhoCanReact", + "ChannelSupportState", + "ChannelSupportStateLastMessageBy", + "ChannelSupportStateStatus", "ChatChannel", "ChatChannelExperience", "ChatChannelListItem", "ChatChannelListItemExperience", + "ChatMessage", + "ChatMessageMessageType", + "ChatMessagePoll", + "ChatMessagePollOption", + "ChatReaction", "CheckAccessUsersResponse", "CheckAccessUsersResponseAccessLevel", "CheckoutConfiguration", @@ -7205,6 +7331,7 @@ def __dir__(): "CreateCardsResponseSecrets", "CreateCardsResponseStatus", "CreateCardsResponseType", + "CreateChannelsRequestKind", "CreateCheckoutConfigurationsRequestMode", "CreateCheckoutConfigurationsRequestPaymentMethodConfiguration", "CreateCheckoutConfigurationsRequestThreeDsLevel", @@ -7296,6 +7423,7 @@ def __dir__(): "CreateInvoicesRequestItemsItemVariantProductVisibility", "CreateInvoicesRequestItemsItemVariantVisibility", "CreateMessagesRequestAttachmentsItem", + "CreateMessagesRequestLinkPreviewsItem", "CreateMessagesRequestPoll", "CreateMessagesRequestPollOptionsItem", "CreateNotificationsResponse", @@ -7592,6 +7720,10 @@ def __dir__(): "EconomicIntelligenceSentiment", "EconomicIntelligenceStatus", "EmailAddress", + "Embed", + "EmbedField", + "EmbedFooter", + "EmbedImage", "EmbedTypes", "Entry", "EntryCustomFieldResponsesItem", @@ -7710,6 +7842,7 @@ def __dir__(): "FutureUsageTypes", "GenerateMediaRequestResolution", "GenerateMediaRequestType", + "Gif", "GlobalAffiliateStatuses", "GrantableAuthorizedUserRoles", "IdentityProfile", @@ -7952,6 +8085,15 @@ def __dir__(): "ListCashbackRulesRequestOrder", "ListCashbackRulesResponse", "ListCashbackRulesResponsePageInfo", + "ListChannelMembersResponse", + "ListChannelMembersResponsePageInfo", + "ListChannelsRequestDirection", + "ListChannelsRequestKindItem", + "ListChannelsRequestOrder", + "ListChannelsRequestStatus", + "ListChannelsRequestSupportRole", + "ListChannelsResponse", + "ListChannelsResponsePageInfo", "ListChatChannelsResponse", "ListCheckoutConfigurationsRequestDirection", "ListCheckoutConfigurationsRequestOrder", @@ -8097,7 +8239,10 @@ def __dir__(): "ListMembershipsRequestStatusesItem", "ListMembershipsResponse", "ListMembershipsResponsePageInfo", + "ListMessagesRequestDirection", + "ListMessagesRequestOrder", "ListMessagesResponse", + "ListMessagesResponsePageInfo", "ListNotificationsResponse", "ListNotificationsResponsePageInfo", "ListPartnerReferralRequestsRequestDirection", @@ -8189,6 +8334,8 @@ def __dir__(): "ListPromoCodesRequestStatus", "ListPromoCodesResponse", "ListPromoCodesResponsePageInfo", + "ListReactionsMessagesResponse", + "ListReactionsMessagesResponsePageInfo", "ListReactionsResponse", "ListRecipientsTransfersResponse", "ListRecipientsTransfersResponseDataItem", @@ -8374,6 +8521,9 @@ def __dir__(): "MembershipsSortableColumns", "Message", "MessageChannelOrder", + "MessageCustomAuthor", + "MessageLinkFooter", + "MessageLinkPreview", "MessageListItem", "MessageListItemPoll", "MessageListItemPollOptionsItem", @@ -8383,6 +8533,8 @@ def __dir__(): "MessagePoll", "MessagePollOptionsItem", "MessagePollVotesItem", + "MessageReactionCount", + "MessageReactionCountKind", "MessageReactionCountsItem", "MessageUser", "Money", @@ -9672,6 +9824,11 @@ def __dir__(): "UpdateCardsResponseSecrets", "UpdateCardsResponseStatus", "UpdateCardsResponseType", + "UpdateChannelMembersRequestNotificationPreference", + "UpdateChannelsRequestIcon", + "UpdateChannelsRequestModeration", + "UpdateChannelsRequestModerationWhoCanPost", + "UpdateChannelsRequestModerationWhoCanReact", "UpdateCourseLessonsRequestAssessmentCompletionRequirement", "UpdateCourseLessonsRequestAssessmentQuestionsItem", "UpdateCourseLessonsRequestAssessmentQuestionsItemImage", @@ -9727,6 +9884,7 @@ def __dir__(): "UpdateMeUsersRequestBanner", "UpdateMeUsersRequestProfilePicture", "UpdateMessagesRequestAttachmentsItem", + "UpdateMessagesRequestLinkPreviewsItem", "UpdatePaymentsRequestShippingAddress", "UpdatePermissionsAppsRequestRequestedPermissionsItem", "UpdatePlansRequestCustomFieldsItem", @@ -9874,6 +10032,8 @@ def __dir__(): "card_transactions", "cards", "cashback_rules", + "channel_members", + "channels", "chat_channels", "checkout_configurations", "claim_links", diff --git a/src/whop_sdk/access_tokens/client.py b/src/whop_sdk/access_tokens/client.py index 2e8e2ddeb..263dc8b46 100644 --- a/src/whop_sdk/access_tokens/client.py +++ b/src/whop_sdk/access_tokens/client.py @@ -66,7 +66,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -138,7 +138,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/account_links/client.py b/src/whop_sdk/account_links/client.py index 075d51a14..c2989ea9c 100644 --- a/src/whop_sdk/account_links/client.py +++ b/src/whop_sdk/account_links/client.py @@ -66,7 +66,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/client.py b/src/whop_sdk/accounts/client.py index db1e073f5..cd1999981 100644 --- a/src/whop_sdk/accounts/client.py +++ b/src/whop_sdk/accounts/client.py @@ -160,7 +160,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -252,7 +252,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -297,7 +297,7 @@ def me( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -357,7 +357,7 @@ def search( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -412,7 +412,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -445,7 +445,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -668,7 +668,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -805,7 +805,7 @@ def form_company( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -895,7 +895,7 @@ def retry_ads_payment( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -928,7 +928,7 @@ def suspend(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -986,7 +986,7 @@ def transfer_ownership( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1149,7 +1149,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1250,7 +1250,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1303,7 +1303,7 @@ async def me( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1371,7 +1371,7 @@ async def search( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1435,7 +1435,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1480,7 +1480,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1711,7 +1711,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1856,7 +1856,7 @@ async def form_company( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1954,7 +1954,7 @@ async def retry_ads_payment( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1995,7 +1995,7 @@ async def suspend(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -2061,7 +2061,7 @@ async def transfer_ownership( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/customer_tracking/client.py b/src/whop_sdk/accounts/customer_tracking/client.py index 644a91356..055aed50c 100644 --- a/src/whop_sdk/accounts/customer_tracking/client.py +++ b/src/whop_sdk/accounts/customer_tracking/client.py @@ -47,7 +47,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -100,7 +100,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/fees/client.py b/src/whop_sdk/accounts/fees/client.py index 13e04c86f..17b1068be 100644 --- a/src/whop_sdk/accounts/fees/client.py +++ b/src/whop_sdk/accounts/fees/client.py @@ -81,7 +81,7 @@ def retrieve(self, account_id: str, *, request_options: typing.Optional[RequestO from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -255,7 +255,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -345,7 +345,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -527,7 +527,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/financing_providers/client.py b/src/whop_sdk/accounts/financing_providers/client.py index ffd00afcc..029d01246 100644 --- a/src/whop_sdk/accounts/financing_providers/client.py +++ b/src/whop_sdk/accounts/financing_providers/client.py @@ -73,7 +73,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/preferences/client.py b/src/whop_sdk/accounts/preferences/client.py index 3606db4a5..1b756a957 100644 --- a/src/whop_sdk/accounts/preferences/client.py +++ b/src/whop_sdk/accounts/preferences/client.py @@ -66,7 +66,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -371,7 +371,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/accounts/reserves/client.py b/src/whop_sdk/accounts/reserves/client.py index 464f24568..da73bce57 100644 --- a/src/whop_sdk/accounts/reserves/client.py +++ b/src/whop_sdk/accounts/reserves/client.py @@ -45,7 +45,7 @@ def list(self, account_id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -98,7 +98,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_campaigns/client.py b/src/whop_sdk/ad_campaigns/client.py index 813da40f3..81956eb9c 100644 --- a/src/whop_sdk/ad_campaigns/client.py +++ b/src/whop_sdk/ad_campaigns/client.py @@ -137,7 +137,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -308,7 +308,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -348,7 +348,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -430,7 +430,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -482,7 +482,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -515,7 +515,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -548,7 +548,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -664,7 +664,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -775,7 +775,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -852,7 +852,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -902,7 +902,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -992,7 +992,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1052,7 +1052,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1093,7 +1093,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1134,7 +1134,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_groups/client.py b/src/whop_sdk/ad_groups/client.py index 5f6e83f67..0797988eb 100644 --- a/src/whop_sdk/ad_groups/client.py +++ b/src/whop_sdk/ad_groups/client.py @@ -141,7 +141,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -269,7 +269,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -343,7 +343,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -383,7 +383,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -488,7 +488,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -554,7 +554,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -589,7 +589,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -622,7 +622,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -742,7 +742,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -879,7 +879,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -961,7 +961,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1011,7 +1011,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1124,7 +1124,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1198,7 +1198,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1241,7 +1241,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1282,7 +1282,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ad_pixels/client.py b/src/whop_sdk/ad_pixels/client.py index ffd192648..22c86a0b5 100644 --- a/src/whop_sdk/ad_pixels/client.py +++ b/src/whop_sdk/ad_pixels/client.py @@ -81,7 +81,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -142,7 +142,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -182,7 +182,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -251,7 +251,7 @@ def update(self, id: str, *, access_token: str, request_options: typing.Optional from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -330,7 +330,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -400,7 +400,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -448,7 +448,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -491,7 +491,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -537,7 +537,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ads/client.py b/src/whop_sdk/ads/client.py index 51e7995f1..35d32faa6 100644 --- a/src/whop_sdk/ads/client.py +++ b/src/whop_sdk/ads/client.py @@ -88,7 +88,7 @@ def report_issues( from whop_sdk.ads import ReportIssuesAdsRequestIssuesItem client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -150,7 +150,7 @@ def report_stats( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -271,7 +271,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -371,7 +371,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -435,7 +435,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -475,7 +475,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -545,7 +545,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -602,7 +602,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -637,7 +637,7 @@ def pause(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -670,7 +670,7 @@ def unpause(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -735,7 +735,7 @@ async def report_issues( from whop_sdk.ads import ReportIssuesAdsRequestIssuesItem client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -804,7 +804,7 @@ async def report_stats( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -933,7 +933,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1042,7 +1042,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1114,7 +1114,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1162,7 +1162,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1240,7 +1240,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1305,7 +1305,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1348,7 +1348,7 @@ async def pause(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1389,7 +1389,7 @@ async def unpause(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/affiliates/client.py b/src/whop_sdk/affiliates/client.py index e6ff4d332..a4d45ca43 100644 --- a/src/whop_sdk/affiliates/client.py +++ b/src/whop_sdk/affiliates/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -155,7 +155,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -194,7 +194,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -230,7 +230,7 @@ def archive(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -266,7 +266,7 @@ def unarchive(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -431,7 +431,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -478,7 +478,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -522,7 +522,7 @@ async def archive(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -566,7 +566,7 @@ async def unarchive(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/affiliates/overrides/client.py b/src/whop_sdk/affiliates/overrides/client.py index 8df814471..f43840898 100644 --- a/src/whop_sdk/affiliates/overrides/client.py +++ b/src/whop_sdk/affiliates/overrides/client.py @@ -85,7 +85,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def create( from whop_sdk.affiliates.overrides import CreateOverridesRequestBody_Standard client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -186,7 +186,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -226,7 +226,7 @@ def delete(self, id: str, override_id: str, *, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -288,7 +288,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -375,7 +375,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -439,7 +439,7 @@ async def create( from whop_sdk.affiliates.overrides import CreateOverridesRequestBody_Standard client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -493,7 +493,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -543,7 +543,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -613,7 +613,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ai_chats/client.py b/src/whop_sdk/ai_chats/client.py index c179e1707..81be64522 100644 --- a/src/whop_sdk/ai_chats/client.py +++ b/src/whop_sdk/ai_chats/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -162,7 +162,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -204,7 +204,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -240,7 +240,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -293,7 +293,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -378,7 +378,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -466,7 +466,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -516,7 +516,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -560,7 +560,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -621,7 +621,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/api_keys/client.py b/src/whop_sdk/api_keys/client.py index 2945174f2..c4eed411c 100644 --- a/src/whop_sdk/api_keys/client.py +++ b/src/whop_sdk/api_keys/client.py @@ -103,7 +103,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -183,7 +183,7 @@ def create( from whop_sdk.api_keys import CreateApiKeysRequestPermissions client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def list_permissions( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -291,7 +291,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -349,7 +349,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -390,7 +390,7 @@ def rotate(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -482,7 +482,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -571,7 +571,7 @@ async def create( from whop_sdk.api_keys import CreateApiKeysRequestPermissions client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -623,7 +623,7 @@ async def list_permissions( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -662,7 +662,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -705,7 +705,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -771,7 +771,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -820,7 +820,7 @@ async def rotate(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py b/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py index c9516d09f..3f5211276 100644 --- a/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py +++ b/src/whop_sdk/api_keys/types/create_api_keys_request_api_version_date.py @@ -98,6 +98,7 @@ "2026-11-05", "2026-11-05-1", "2026-11-06", + "2026-11-07", ], typing.Any, ] diff --git a/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py b/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py index 033c860b4..3c72ffa03 100644 --- a/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py +++ b/src/whop_sdk/api_keys/types/update_api_keys_request_api_version_date.py @@ -98,6 +98,7 @@ "2026-11-05", "2026-11-05-1", "2026-11-06", + "2026-11-07", ], typing.Any, ] diff --git a/src/whop_sdk/api_logs/client.py b/src/whop_sdk/api_logs/client.py index 1ee3dd81b..ca356cb6b 100644 --- a/src/whop_sdk/api_logs/client.py +++ b/src/whop_sdk/api_logs/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -205,7 +205,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/app_builds/client.py b/src/whop_sdk/app_builds/client.py index 8be028ade..5207932f0 100644 --- a/src/whop_sdk/app_builds/client.py +++ b/src/whop_sdk/app_builds/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -173,7 +173,7 @@ def create( from whop_sdk.app_builds import CreateAppBuildsRequestAttachment client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -216,7 +216,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -249,7 +249,7 @@ def promote(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -337,7 +337,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -422,7 +422,7 @@ async def create( from whop_sdk.app_builds import CreateAppBuildsRequestAttachment client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -473,7 +473,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -514,7 +514,7 @@ async def promote(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/app_installations/client.py b/src/whop_sdk/app_installations/client.py index 3eb5c2f20..d49a984b2 100644 --- a/src/whop_sdk/app_installations/client.py +++ b/src/whop_sdk/app_installations/client.py @@ -102,7 +102,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -151,7 +151,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -299,7 +299,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -357,7 +357,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -411,7 +411,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/apps/client.py b/src/whop_sdk/apps/client.py index 0c3c011c7..06aa2b2e0 100644 --- a/src/whop_sdk/apps/client.py +++ b/src/whop_sdk/apps/client.py @@ -127,7 +127,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -259,7 +259,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -292,7 +292,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -422,7 +422,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -486,7 +486,7 @@ def deploy( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -556,7 +556,7 @@ def logs( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -614,7 +614,7 @@ def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -731,7 +731,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -828,7 +828,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -880,7 +880,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -921,7 +921,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1059,7 +1059,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1131,7 +1131,7 @@ async def deploy( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1209,7 +1209,7 @@ async def logs( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1276,7 +1276,7 @@ async def update_permissions( from whop_sdk.apps import UpdatePermissionsAppsRequestRequestedPermissionsItem client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/audiences/client.py b/src/whop_sdk/audiences/client.py index b68bf0a29..ac7f1a687 100644 --- a/src/whop_sdk/audiences/client.py +++ b/src/whop_sdk/audiences/client.py @@ -82,7 +82,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -172,7 +172,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -218,7 +218,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -300,7 +300,7 @@ def add_people(self, id: str, *, file_id: str, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -377,7 +377,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -476,7 +476,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -532,7 +532,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -586,7 +586,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -632,7 +632,7 @@ async def add_people( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/authorized_users/client.py b/src/whop_sdk/authorized_users/client.py index 43b49dd35..fe3b7734d 100644 --- a/src/whop_sdk/authorized_users/client.py +++ b/src/whop_sdk/authorized_users/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -270,7 +270,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -363,7 +363,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -454,7 +454,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -508,7 +508,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -561,7 +561,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/automation_enrollments/client.py b/src/whop_sdk/automation_enrollments/client.py index 5fd0ad7da..4d1c44408 100644 --- a/src/whop_sdk/automation_enrollments/client.py +++ b/src/whop_sdk/automation_enrollments/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -176,7 +176,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -272,7 +272,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -331,7 +331,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -372,7 +372,7 @@ async def cancel(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/automation_steps/client.py b/src/whop_sdk/automation_steps/client.py index 89df9b200..acf1c17ef 100644 --- a/src/whop_sdk/automation_steps/client.py +++ b/src/whop_sdk/automation_steps/client.py @@ -93,7 +93,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -159,7 +159,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -233,7 +233,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -330,7 +330,7 @@ def preview( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -421,7 +421,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -496,7 +496,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -545,7 +545,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -586,7 +586,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -643,7 +643,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -699,7 +699,7 @@ async def preview( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/automations/client.py b/src/whop_sdk/automations/client.py index 8d788e89a..c2604dcd7 100644 --- a/src/whop_sdk/automations/client.py +++ b/src/whop_sdk/automations/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -154,7 +154,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -189,7 +189,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -222,7 +222,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -276,7 +276,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -311,7 +311,7 @@ def publish(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -353,7 +353,7 @@ def trigger( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -442,7 +442,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -510,7 +510,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -553,7 +553,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -594,7 +594,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -656,7 +656,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -699,7 +699,7 @@ async def publish(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -749,7 +749,7 @@ async def trigger( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounties/client.py b/src/whop_sdk/bounties/client.py index 474f16135..351dc4b06 100644 --- a/src/whop_sdk/bounties/client.py +++ b/src/whop_sdk/bounties/client.py @@ -127,7 +127,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -360,7 +360,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -406,7 +406,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -528,7 +528,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -642,7 +642,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -700,7 +700,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -786,7 +786,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -840,7 +840,7 @@ async def cancel(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounties/submissions/client.py b/src/whop_sdk/bounties/submissions/client.py index 370c30d4a..7f3e75d34 100644 --- a/src/whop_sdk/bounties/submissions/client.py +++ b/src/whop_sdk/bounties/submissions/client.py @@ -91,7 +91,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -145,7 +145,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -238,7 +238,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -301,7 +301,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/bounty_submissions/client.py b/src/whop_sdk/bounty_submissions/client.py index 9ee704990..6520e800b 100644 --- a/src/whop_sdk/bounty_submissions/client.py +++ b/src/whop_sdk/bounty_submissions/client.py @@ -102,7 +102,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -167,7 +167,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -250,7 +250,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -292,7 +292,7 @@ def submit( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -388,7 +388,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -462,7 +462,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -518,7 +518,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -561,7 +561,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -611,7 +611,7 @@ async def submit( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/card_transactions/client.py b/src/whop_sdk/card_transactions/client.py index ed5da2a5f..a0e8c516b 100644 --- a/src/whop_sdk/card_transactions/client.py +++ b/src/whop_sdk/card_transactions/client.py @@ -107,7 +107,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -175,7 +175,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -285,7 +285,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -362,7 +362,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/cards/client.py b/src/whop_sdk/cards/client.py index edfa487ac..f33179094 100644 --- a/src/whop_sdk/cards/client.py +++ b/src/whop_sdk/cards/client.py @@ -67,7 +67,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -139,7 +139,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -195,7 +195,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -283,7 +283,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -358,7 +358,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -438,7 +438,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -502,7 +502,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -598,7 +598,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/cashback_rules/client.py b/src/whop_sdk/cashback_rules/client.py index a4decb1cb..b33517a52 100644 --- a/src/whop_sdk/cashback_rules/client.py +++ b/src/whop_sdk/cashback_rules/client.py @@ -85,7 +85,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -155,7 +155,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def payout( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -356,7 +356,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -434,7 +434,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -499,7 +499,7 @@ async def payout( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -564,7 +564,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/channel_members/__init__.py b/src/whop_sdk/channel_members/__init__.py new file mode 100644 index 000000000..1f3d60715 --- /dev/null +++ b/src/whop_sdk/channel_members/__init__.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + ListChannelMembersResponse, + ListChannelMembersResponsePageInfo, + UpdateChannelMembersRequestNotificationPreference, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ListChannelMembersResponse": ".types", + "ListChannelMembersResponsePageInfo": ".types", + "UpdateChannelMembersRequestNotificationPreference": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "ListChannelMembersResponse", + "ListChannelMembersResponsePageInfo", + "UpdateChannelMembersRequestNotificationPreference", +] diff --git a/src/whop_sdk/channel_members/client.py b/src/whop_sdk/channel_members/client.py new file mode 100644 index 000000000..58d6843c2 --- /dev/null +++ b/src/whop_sdk/channel_members/client.py @@ -0,0 +1,527 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.pagination import AsyncPager, SyncPager +from ..core.request_options import RequestOptions +from ..types.channel_member import ChannelMember +from .raw_client import AsyncRawChannelMembersClient, RawChannelMembersClient +from .types.list_channel_members_response import ListChannelMembersResponse +from .types.update_channel_members_request_notification_preference import ( + UpdateChannelMembersRequestNotificationPreference, +) + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ChannelMembersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawChannelMembersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawChannelMembersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawChannelMembersClient + """ + return self._raw_client + + def list( + self, + *, + channel_id: str, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + query: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[ChannelMember, ListChannelMembersResponse]: + """ + List or search the people in a channel. + + Parameters + ---------- + channel_id : str + The channel whose members to list. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + query : typing.Optional[str] + Search by name or username. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[ChannelMember, ListChannelMembersResponse] + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + response = client.channel_members.list( + channel_id="channel_id", + ) + for item in response: + yield item + # alternatively, you can paginate page-by-page + for page in response.iter_pages(): + yield page + """ + return self._raw_client.list( + channel_id=channel_id, + first=first, + after=after, + last=last, + before=before, + query=query, + request_options=request_options, + ) + + def create( + self, *, channel_id: str, user_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChannelMember: + """ + Add a member to a direct or support channel. + + Parameters + ---------- + channel_id : str + The channel to add the user to. + + user_id : str + The user to add. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channel_members.create( + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxxx", + ) + """ + _response = self._raw_client.create(channel_id=channel_id, user_id=user_id, request_options=request_options) + return _response.data + + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Retrieve a channel member and their read position. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channel_members.retrieve( + id="id", + ) + """ + _response = self._raw_client.retrieve(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Remove a channel member, or leave the channel yourself. Requires dms:channel:manage and access to the channel. Removing someone else also requires permission to manage its members. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channel_members.delete( + id="id", + ) + """ + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data + + def update( + self, + id: str, + *, + notification_preference: UpdateChannelMembersRequestNotificationPreference, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChannelMember: + """ + Update your notification preference using your stored membership ID in a private or support channel. + + Parameters + ---------- + id : str + Public resource ID. + + notification_preference : UpdateChannelMembersRequestNotificationPreference + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channel_members.update( + id="id", + notification_preference="all", + ) + """ + _response = self._raw_client.update( + id, notification_preference=notification_preference, request_options=request_options + ) + return _response.data + + +class AsyncChannelMembersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawChannelMembersClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawChannelMembersClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawChannelMembersClient + """ + return self._raw_client + + async def list( + self, + *, + channel_id: str, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + query: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChannelMember, ListChannelMembersResponse]: + """ + List or search the people in a channel. + + Parameters + ---------- + channel_id : str + The channel whose members to list. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + query : typing.Optional[str] + Search by name or username. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChannelMember, ListChannelMembersResponse] + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + response = await client.channel_members.list( + channel_id="channel_id", + ) + async for item in response: + yield item + + # alternatively, you can paginate page-by-page + async for page in response.iter_pages(): + yield page + + + asyncio.run(main()) + """ + return await self._raw_client.list( + channel_id=channel_id, + first=first, + after=after, + last=last, + before=before, + query=query, + request_options=request_options, + ) + + async def create( + self, *, channel_id: str, user_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChannelMember: + """ + Add a member to a direct or support channel. + + Parameters + ---------- + channel_id : str + The channel to add the user to. + + user_id : str + The user to add. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channel_members.create( + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + user_id="user_xxxxxxxxxxxxxx", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + channel_id=channel_id, user_id=user_id, request_options=request_options + ) + return _response.data + + async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Retrieve a channel member and their read position. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channel_members.retrieve( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(id, request_options=request_options) + return _response.data + + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Remove a channel member, or leave the channel yourself. Requires dms:channel:manage and access to the channel. Removing someone else also requires permission to manage its members. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channel_members.delete( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data + + async def update( + self, + id: str, + *, + notification_preference: UpdateChannelMembersRequestNotificationPreference, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChannelMember: + """ + Update your notification preference using your stored membership ID in a private or support channel. + + Parameters + ---------- + id : str + Public resource ID. + + notification_preference : UpdateChannelMembersRequestNotificationPreference + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channel_members.update( + id="id", + notification_preference="all", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + id, notification_preference=notification_preference, request_options=request_options + ) + return _response.data diff --git a/src/whop_sdk/channel_members/raw_client.py b/src/whop_sdk/channel_members/raw_client.py new file mode 100644 index 000000000..72786f96b --- /dev/null +++ b/src/whop_sdk/channel_members/raw_client.py @@ -0,0 +1,754 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import encode_path_param +from ..core.pagination import AsyncPager, SyncPager +from ..core.parse_error import ParsingError +from ..core.pydantic_utilities import parse_obj_as +from ..core.request_options import RequestOptions +from ..errors.bad_request_error import BadRequestError +from ..errors.conflict_error import ConflictError +from ..errors.unauthorized_error import UnauthorizedError +from ..types.channel_member import ChannelMember +from .types.list_channel_members_response import ListChannelMembersResponse +from .types.update_channel_members_request_notification_preference import ( + UpdateChannelMembersRequestNotificationPreference, +) +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawChannelMembersClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + channel_id: str, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + query: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[ChannelMember, ListChannelMembersResponse]: + """ + List or search the people in a channel. + + Parameters + ---------- + channel_id : str + The channel whose members to list. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + query : typing.Optional[str] + Search by name or username. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[ChannelMember, ListChannelMembersResponse] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + "channel_members", + base_url=self._client_wrapper.get_environment().api, + method="GET", + params={ + "first": first, + "after": after, + "last": last, + "before": before, + "channel_id": channel_id, + "query": query, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListChannelMembersResponse, + parse_obj_as( + type_=ListChannelMembersResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + _get_next = lambda: self.list( + channel_id=channel_id, + first=first, + after=_parsed_next, + last=last, + before=before, + query=query, + request_options=request_options, + ) + return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, *, channel_id: str, user_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChannelMember]: + """ + Add a member to a direct or support channel. + + Parameters + ---------- + channel_id : str + The channel to add the user to. + + user_id : str + The user to add. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + "channel_members", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "channel_id": channel_id, + "user_id": user_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChannelMember]: + """ + Retrieve a channel member and their read position. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: + """ + Remove a channel member, or leave the channel yourself. Requires dms:channel:manage and access to the channel. Removing someone else also requires permission to manage its members. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + notification_preference: UpdateChannelMembersRequestNotificationPreference, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ChannelMember]: + """ + Update your notification preference using your stored membership ID in a private or support channel. + + Parameters + ---------- + id : str + Public resource ID. + + notification_preference : UpdateChannelMembersRequestNotificationPreference + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="PATCH", + json={ + "notification_preference": notification_preference, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawChannelMembersClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + channel_id: str, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + query: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChannelMember, ListChannelMembersResponse]: + """ + List or search the people in a channel. + + Parameters + ---------- + channel_id : str + The channel whose members to list. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + query : typing.Optional[str] + Search by name or username. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChannelMember, ListChannelMembersResponse] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + "channel_members", + base_url=self._client_wrapper.get_environment().api, + method="GET", + params={ + "first": first, + "after": after, + "last": last, + "before": before, + "channel_id": channel_id, + "query": query, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListChannelMembersResponse, + parse_obj_as( + type_=ListChannelMembersResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + + async def _get_next(): + return await self.list( + channel_id=channel_id, + first=first, + after=_parsed_next, + last=last, + before=before, + query=query, + request_options=request_options, + ) + + return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, *, channel_id: str, user_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChannelMember]: + """ + Add a member to a direct or support channel. + + Parameters + ---------- + channel_id : str + The channel to add the user to. + + user_id : str + The user to add. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + "channel_members", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "channel_id": channel_id, + "user_id": user_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChannelMember]: + """ + Retrieve a channel member and their read position. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Remove a channel member, or leave the channel yourself. Requires dms:channel:manage and access to the channel. Removing someone else also requires permission to manage its members. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + notification_preference: UpdateChannelMembersRequestNotificationPreference, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ChannelMember]: + """ + Update your notification preference using your stored membership ID in a private or support channel. + + Parameters + ---------- + id : str + Public resource ID. + + notification_preference : UpdateChannelMembersRequestNotificationPreference + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channel_members/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="PATCH", + json={ + "notification_preference": notification_preference, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/whop_sdk/channel_members/types/__init__.py b/src/whop_sdk/channel_members/types/__init__.py new file mode 100644 index 000000000..ed12e4abd --- /dev/null +++ b/src/whop_sdk/channel_members/types/__init__.py @@ -0,0 +1,46 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .list_channel_members_response import ListChannelMembersResponse + from .list_channel_members_response_page_info import ListChannelMembersResponsePageInfo + from .update_channel_members_request_notification_preference import ( + UpdateChannelMembersRequestNotificationPreference, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ListChannelMembersResponse": ".list_channel_members_response", + "ListChannelMembersResponsePageInfo": ".list_channel_members_response_page_info", + "UpdateChannelMembersRequestNotificationPreference": ".update_channel_members_request_notification_preference", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "ListChannelMembersResponse", + "ListChannelMembersResponsePageInfo", + "UpdateChannelMembersRequestNotificationPreference", +] diff --git a/src/whop_sdk/channel_members/types/list_channel_members_response.py b/src/whop_sdk/channel_members/types/list_channel_members_response.py new file mode 100644 index 000000000..b3bc821c3 --- /dev/null +++ b/src/whop_sdk/channel_members/types/list_channel_members_response.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ...types.channel_member import ChannelMember +from .list_channel_members_response_page_info import ListChannelMembersResponsePageInfo + + +class ListChannelMembersResponse(UniversalBaseModel): + data: typing.List[ChannelMember] + page_info: ListChannelMembersResponsePageInfo + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channel_members/types/list_channel_members_response_page_info.py b/src/whop_sdk/channel_members/types/list_channel_members_response_page_info.py new file mode 100644 index 000000000..75e28116e --- /dev/null +++ b/src/whop_sdk/channel_members/types/list_channel_members_response_page_info.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ListChannelMembersResponsePageInfo(UniversalBaseModel): + end_cursor: typing.Optional[str] = None + has_next_page: bool + has_previous_page: bool + start_cursor: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channel_members/types/update_channel_members_request_notification_preference.py b/src/whop_sdk/channel_members/types/update_channel_members_request_notification_preference.py new file mode 100644 index 000000000..734c287a1 --- /dev/null +++ b/src/whop_sdk/channel_members/types/update_channel_members_request_notification_preference.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateChannelMembersRequestNotificationPreference = typing.Union[typing.Literal["all", "mentions", "none"], typing.Any] diff --git a/src/whop_sdk/channels/__init__.py b/src/whop_sdk/channels/__init__.py new file mode 100644 index 000000000..eaf20eaf2 --- /dev/null +++ b/src/whop_sdk/channels/__init__.py @@ -0,0 +1,73 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateChannelsRequestKind, + ListChannelsRequestDirection, + ListChannelsRequestKindItem, + ListChannelsRequestOrder, + ListChannelsRequestStatus, + ListChannelsRequestSupportRole, + ListChannelsResponse, + ListChannelsResponsePageInfo, + UpdateChannelsRequestIcon, + UpdateChannelsRequestModeration, + UpdateChannelsRequestModerationWhoCanPost, + UpdateChannelsRequestModerationWhoCanReact, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateChannelsRequestKind": ".types", + "ListChannelsRequestDirection": ".types", + "ListChannelsRequestKindItem": ".types", + "ListChannelsRequestOrder": ".types", + "ListChannelsRequestStatus": ".types", + "ListChannelsRequestSupportRole": ".types", + "ListChannelsResponse": ".types", + "ListChannelsResponsePageInfo": ".types", + "UpdateChannelsRequestIcon": ".types", + "UpdateChannelsRequestModeration": ".types", + "UpdateChannelsRequestModerationWhoCanPost": ".types", + "UpdateChannelsRequestModerationWhoCanReact": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateChannelsRequestKind", + "ListChannelsRequestDirection", + "ListChannelsRequestKindItem", + "ListChannelsRequestOrder", + "ListChannelsRequestStatus", + "ListChannelsRequestSupportRole", + "ListChannelsResponse", + "ListChannelsResponsePageInfo", + "UpdateChannelsRequestIcon", + "UpdateChannelsRequestModeration", + "UpdateChannelsRequestModerationWhoCanPost", + "UpdateChannelsRequestModerationWhoCanReact", +] diff --git a/src/whop_sdk/channels/client.py b/src/whop_sdk/channels/client.py new file mode 100644 index 000000000..6f5b3cea8 --- /dev/null +++ b/src/whop_sdk/channels/client.py @@ -0,0 +1,1423 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing + +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.pagination import AsyncPager, SyncPager +from ..core.request_options import RequestOptions +from ..types.channel import Channel +from ..types.channel_list_item import ChannelListItem +from ..types.channel_member import ChannelMember +from .raw_client import AsyncRawChannelsClient, RawChannelsClient +from .types.create_channels_request_kind import CreateChannelsRequestKind +from .types.list_channels_request_direction import ListChannelsRequestDirection +from .types.list_channels_request_kind_item import ListChannelsRequestKindItem +from .types.list_channels_request_order import ListChannelsRequestOrder +from .types.list_channels_request_status import ListChannelsRequestStatus +from .types.list_channels_request_support_role import ListChannelsRequestSupportRole +from .types.list_channels_response import ListChannelsResponse +from .types.update_channels_request_icon import UpdateChannelsRequestIcon +from .types.update_channels_request_moderation import UpdateChannelsRequestModeration + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class ChannelsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._raw_client = RawChannelsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> RawChannelsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + RawChannelsClient + """ + return self._raw_client + + def list( + self, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + include_total_count: typing.Optional[bool] = None, + kind: typing.Optional[ + typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]] + ] = None, + support_role: typing.Optional[ListChannelsRequestSupportRole] = None, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + status: typing.Optional[ListChannelsRequestStatus] = None, + awaiting_reply: typing.Optional[bool] = None, + unread: typing.Optional[bool] = None, + pinned: typing.Optional[bool] = None, + viewed: typing.Optional[bool] = None, + requested: typing.Optional[bool] = None, + order: typing.Optional[ListChannelsRequestOrder] = None, + include_members: typing.Optional[bool] = None, + include_last_message: typing.Optional[bool] = None, + direction: typing.Optional[ListChannelsRequestDirection] = None, + created_before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[ChannelListItem, ListChannelsResponse]: + """ + List channels you can access. + + Parameters + ---------- + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + include_total_count : typing.Optional[bool] + Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. + + kind : typing.Optional[typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]]] + Channel kinds to return. Combine `private` and `support`, or pass `community` alone. `private` includes one-to-one and group direct messages. + + support_role : typing.Optional[ListChannelsRequestSupportRole] + Which support channels to return. `customer` returns support chats you opened, including when `account_id` is set. `staff` returns the support inbox of the account in `account_id`, and requires permission to read that account's support chats. Applies only to `support` channels. + + account_id : typing.Optional[str] + Filter channels by their owning account, prefixed `biz_`. Applies to private, community and support channels. + + query : typing.Optional[str] + Return only channels whose name contains this text. Private and support channels also match a member's username or name. `%` and `_` match literally. + + status : typing.Optional[ListChannelsRequestStatus] + Return only support channels with this resolution. Requires `kind` to be `support` alone. + + awaiting_reply : typing.Optional[bool] + `true` returns unresolved support channels whose last message came from the customer; `false` returns the other support channels. Other channel kinds are returned either way. + + unread : typing.Optional[bool] + `true` returns channels with messages you have not read; `false` returns the rest. Requires authenticating as a user. + + pinned : typing.Optional[bool] + `true` returns private and support channels you have pinned; `false` returns those you have not. Requires authenticating as a user. + + viewed : typing.Optional[bool] + `true` returns community channels you have opened; `false` returns those you never have. Requires authenticating as a user. + + requested : typing.Optional[bool] + `true` returns your pending direct-message requests; `false` returns your accepted private channels. Requires `private` in `kind` and authenticating as a user. With `support` also in `kind`, `false` keeps support channels and `true` returns only pending requests. + + order : typing.Optional[ListChannelsRequestOrder] + The field to sort by. Defaults to `last_viewed_at` for community channels and `last_message_at` for private and support channels. Ties sort in a stable order. + + include_members : typing.Optional[bool] + Include the current members of private and support channels, including you, with their public profiles. + + include_last_message : typing.Optional[bool] + Include the most recent message you can see, with its author. + + direction : typing.Optional[ListChannelsRequestDirection] + The sort direction. Defaults to `desc`. + + created_before : typing.Optional[str] + Return only channels created before this ISO 8601 timestamp. + + created_after : typing.Optional[str] + Return only channels created after this ISO 8601 timestamp. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[ChannelListItem, ListChannelsResponse] + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + response = client.channels.list( + kind=["private"], + ) + for item in response: + yield item + # alternatively, you can paginate page-by-page + for page in response.iter_pages(): + yield page + """ + return self._raw_client.list( + first=first, + after=after, + last=last, + before=before, + include_total_count=include_total_count, + kind=kind, + support_role=support_role, + account_id=account_id, + query=query, + status=status, + awaiting_reply=awaiting_reply, + unread=unread, + pinned=pinned, + viewed=viewed, + requested=requested, + order=order, + include_members=include_members, + include_last_message=include_last_message, + direction=direction, + created_before=created_before, + created_after=created_after, + request_options=request_options, + ) + + def create( + self, + *, + kind: CreateChannelsRequestKind, + account_id: typing.Optional[str] = OMIT, + customer_user_id: typing.Optional[str] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + participant_user_ids: typing.Optional[typing.Sequence[str]] = OMIT, + product_id: typing.Optional[str] = OMIT, + sender_user_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Channel: + """ + Create a private, community or support channel. Returns an existing private or support channel unchanged with `200`, or a new channel with `201`. + + Parameters + ---------- + kind : CreateChannelsRequestKind + Channel kind. `private` is a one-to-one or group conversation, `community` creates a Chat experience on the account, and `support` opens a conversation between the account and a customer. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Accepted for all channel kinds. Required for community and support channels unless supplied by the credential's account context. + + customer_user_id : typing.Optional[str] + Customer ID, prefixed `user_`. Support channels only; requires support management permission. Omit to open your own support conversation. + + name : typing.Optional[str] + Channel display name, accepted for all channel kinds. Used only when a channel is created. For community channels, names the new Chat experience; defaults to the Chat app's name. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Defaults to `true`. Used only when a channel is created; change an existing channel with `PATCH /channels/:id`. + + participant_user_ids : typing.Optional[typing.Sequence[str]] + Other participant IDs, prefixed `user_`, excluding the sender. Required for private channels and accepted only for them. One ID creates a one-to-one conversation; more create a group. + + product_id : typing.Optional[str] + Product ID, prefixed `prod_`, to attach the new community channel to. Accepted only for community channels. Must belong to the owning account and requires the `experience:attach` permission on it. Omit to leave the channel unattached. + + sender_user_id : typing.Optional[str] + Sender ID, prefixed `user_`. Private channels only. Required for account API keys; omit when authenticating as a user. Requires channel management permission on the account. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + existing channel returned + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.create( + kind="private", + ) + """ + _response = self._raw_client.create( + kind=kind, + account_id=account_id, + customer_user_id=customer_user_id, + name=name, + notifications_enabled=notifications_enabled, + participant_user_ids=participant_user_ids, + product_id=product_id, + sender_user_id=sender_user_id, + request_options=request_options, + ) + return _response.data + + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Retrieve a channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.retrieve( + id="id", + ) + """ + _response = self._raw_client.retrieve(id, request_options=request_options) + return _response.data + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Delete a channel. Deleting a support channel requires `support_chat:create` on the account. Community channels delete their backing experience and accept account API keys with the `experience:delete` permission. Private and support channels require a user identity with channel management permission; account API keys cannot act as a channel participant. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.delete( + id="id", + ) + """ + _response = self._raw_client.delete(id, request_options=request_options) + return _response.data + + def update( + self, + id: str, + *, + icon: typing.Optional[UpdateChannelsRequestIcon] = OMIT, + moderation: typing.Optional[UpdateChannelsRequestModeration] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Channel: + """ + Update a channel. Community icon changes update the experience logo and require `experience:update`. Support rename and notification changes require `support_chat:create`. Private and support writes require a user identity with channel management permission; account API keys can update community channels only. + + Parameters + ---------- + id : str + Public resource ID. + + icon : typing.Optional[UpdateChannelsRequestIcon] + Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + + moderation : typing.Optional[UpdateChannelsRequestModeration] + Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + + name : typing.Optional[str] + Replacement display name for any channel kind. Send `null` to clear a private or support channel name. Community channels require a name and also rename the experience. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Omit to preserve the current setting. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.update( + id="id", + ) + """ + _response = self._raw_client.update( + id, + icon=icon, + moderation=moderation, + name=name, + notifications_enabled=notifications_enabled, + request_options=request_options, + ) + return _response.data + + def accept(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Accept a direct-message request. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.accept( + id="id", + ) + """ + _response = self._raw_client.accept(id, request_options=request_options) + return _response.data + + def hide(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Decline a DM request by hiding the channel from your inbox. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.hide( + id="id", + ) + """ + _response = self._raw_client.hide(id, request_options=request_options) + return _response.data + + def mark_read( + self, + id: str, + *, + last_viewed_at: typing.Optional[dt.datetime] = OMIT, + viewed_message_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChannelMember: + """ + Mark a channel as read and optionally record viewed messages. + + Parameters + ---------- + id : str + Public resource ID. + + last_viewed_at : typing.Optional[dt.datetime] + Required for DM-backed kinds; not accepted for experience. + + viewed_message_ids : typing.Optional[typing.Sequence[str]] + Messages actually seen in this channel. Optional for all channel kinds; up to 100 IDs. Omitted or empty records no message views. Experience view counts update asynchronously. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.mark_read( + id="id", + ) + """ + _response = self._raw_client.mark_read( + id, last_viewed_at=last_viewed_at, viewed_message_ids=viewed_message_ids, request_options=request_options + ) + return _response.data + + def mark_unread(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Mark a channel as unread for the authenticated user. Experience channels are unchanged. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.mark_unread( + id="id", + ) + """ + _response = self._raw_client.mark_unread(id, request_options=request_options) + return _response.data + + def pin( + self, id: str, *, position: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + Pin a private or support channel for yourself. Omit position to append a new pin or keep an existing pin in place. An explicit zero-based position inserts or moves the pin and shifts the rest. At most 12 channels can be pinned. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + position : typing.Optional[int] + Zero-based position in the resulting list. Must not exceed the last index after insertion. Omit to append a new pin or preserve an existing position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.pin( + id="id", + ) + """ + _response = self._raw_client.pin(id, position=position, request_options=request_options) + return _response.data + + def reopen(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Reopen a resolved support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.reopen( + id="id", + ) + """ + _response = self._raw_client.reopen(id, request_options=request_options) + return _response.data + + def resolve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Resolve a support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.resolve( + id="id", + ) + """ + _response = self._raw_client.resolve(id, request_options=request_options) + return _response.data + + def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Remove a channel from your pins and compact the remaining order. Your discarded memberships and inaccessible channels can be unpinned. Does not return channel data or grant read access. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.channels.unpin( + id="id", + ) + """ + _response = self._raw_client.unpin(id, request_options=request_options) + return _response.data + + +class AsyncChannelsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._raw_client = AsyncRawChannelsClient(client_wrapper=client_wrapper) + + @property + def with_raw_response(self) -> AsyncRawChannelsClient: + """ + Retrieves a raw implementation of this client that returns raw responses. + + Returns + ------- + AsyncRawChannelsClient + """ + return self._raw_client + + async def list( + self, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + include_total_count: typing.Optional[bool] = None, + kind: typing.Optional[ + typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]] + ] = None, + support_role: typing.Optional[ListChannelsRequestSupportRole] = None, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + status: typing.Optional[ListChannelsRequestStatus] = None, + awaiting_reply: typing.Optional[bool] = None, + unread: typing.Optional[bool] = None, + pinned: typing.Optional[bool] = None, + viewed: typing.Optional[bool] = None, + requested: typing.Optional[bool] = None, + order: typing.Optional[ListChannelsRequestOrder] = None, + include_members: typing.Optional[bool] = None, + include_last_message: typing.Optional[bool] = None, + direction: typing.Optional[ListChannelsRequestDirection] = None, + created_before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChannelListItem, ListChannelsResponse]: + """ + List channels you can access. + + Parameters + ---------- + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + include_total_count : typing.Optional[bool] + Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. + + kind : typing.Optional[typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]]] + Channel kinds to return. Combine `private` and `support`, or pass `community` alone. `private` includes one-to-one and group direct messages. + + support_role : typing.Optional[ListChannelsRequestSupportRole] + Which support channels to return. `customer` returns support chats you opened, including when `account_id` is set. `staff` returns the support inbox of the account in `account_id`, and requires permission to read that account's support chats. Applies only to `support` channels. + + account_id : typing.Optional[str] + Filter channels by their owning account, prefixed `biz_`. Applies to private, community and support channels. + + query : typing.Optional[str] + Return only channels whose name contains this text. Private and support channels also match a member's username or name. `%` and `_` match literally. + + status : typing.Optional[ListChannelsRequestStatus] + Return only support channels with this resolution. Requires `kind` to be `support` alone. + + awaiting_reply : typing.Optional[bool] + `true` returns unresolved support channels whose last message came from the customer; `false` returns the other support channels. Other channel kinds are returned either way. + + unread : typing.Optional[bool] + `true` returns channels with messages you have not read; `false` returns the rest. Requires authenticating as a user. + + pinned : typing.Optional[bool] + `true` returns private and support channels you have pinned; `false` returns those you have not. Requires authenticating as a user. + + viewed : typing.Optional[bool] + `true` returns community channels you have opened; `false` returns those you never have. Requires authenticating as a user. + + requested : typing.Optional[bool] + `true` returns your pending direct-message requests; `false` returns your accepted private channels. Requires `private` in `kind` and authenticating as a user. With `support` also in `kind`, `false` keeps support channels and `true` returns only pending requests. + + order : typing.Optional[ListChannelsRequestOrder] + The field to sort by. Defaults to `last_viewed_at` for community channels and `last_message_at` for private and support channels. Ties sort in a stable order. + + include_members : typing.Optional[bool] + Include the current members of private and support channels, including you, with their public profiles. + + include_last_message : typing.Optional[bool] + Include the most recent message you can see, with its author. + + direction : typing.Optional[ListChannelsRequestDirection] + The sort direction. Defaults to `desc`. + + created_before : typing.Optional[str] + Return only channels created before this ISO 8601 timestamp. + + created_after : typing.Optional[str] + Return only channels created after this ISO 8601 timestamp. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChannelListItem, ListChannelsResponse] + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + response = await client.channels.list( + kind=["private"], + ) + async for item in response: + yield item + + # alternatively, you can paginate page-by-page + async for page in response.iter_pages(): + yield page + + + asyncio.run(main()) + """ + return await self._raw_client.list( + first=first, + after=after, + last=last, + before=before, + include_total_count=include_total_count, + kind=kind, + support_role=support_role, + account_id=account_id, + query=query, + status=status, + awaiting_reply=awaiting_reply, + unread=unread, + pinned=pinned, + viewed=viewed, + requested=requested, + order=order, + include_members=include_members, + include_last_message=include_last_message, + direction=direction, + created_before=created_before, + created_after=created_after, + request_options=request_options, + ) + + async def create( + self, + *, + kind: CreateChannelsRequestKind, + account_id: typing.Optional[str] = OMIT, + customer_user_id: typing.Optional[str] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + participant_user_ids: typing.Optional[typing.Sequence[str]] = OMIT, + product_id: typing.Optional[str] = OMIT, + sender_user_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Channel: + """ + Create a private, community or support channel. Returns an existing private or support channel unchanged with `200`, or a new channel with `201`. + + Parameters + ---------- + kind : CreateChannelsRequestKind + Channel kind. `private` is a one-to-one or group conversation, `community` creates a Chat experience on the account, and `support` opens a conversation between the account and a customer. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Accepted for all channel kinds. Required for community and support channels unless supplied by the credential's account context. + + customer_user_id : typing.Optional[str] + Customer ID, prefixed `user_`. Support channels only; requires support management permission. Omit to open your own support conversation. + + name : typing.Optional[str] + Channel display name, accepted for all channel kinds. Used only when a channel is created. For community channels, names the new Chat experience; defaults to the Chat app's name. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Defaults to `true`. Used only when a channel is created; change an existing channel with `PATCH /channels/:id`. + + participant_user_ids : typing.Optional[typing.Sequence[str]] + Other participant IDs, prefixed `user_`, excluding the sender. Required for private channels and accepted only for them. One ID creates a one-to-one conversation; more create a group. + + product_id : typing.Optional[str] + Product ID, prefixed `prod_`, to attach the new community channel to. Accepted only for community channels. Must belong to the owning account and requires the `experience:attach` permission on it. Omit to leave the channel unattached. + + sender_user_id : typing.Optional[str] + Sender ID, prefixed `user_`. Private channels only. Required for account API keys; omit when authenticating as a user. Requires channel management permission on the account. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + existing channel returned + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.create( + kind="private", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.create( + kind=kind, + account_id=account_id, + customer_user_id=customer_user_id, + name=name, + notifications_enabled=notifications_enabled, + participant_user_ids=participant_user_ids, + product_id=product_id, + sender_user_id=sender_user_id, + request_options=request_options, + ) + return _response.data + + async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Retrieve a channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.retrieve( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.retrieve(id, request_options=request_options) + return _response.data + + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Delete a channel. Deleting a support channel requires `support_chat:create` on the account. Community channels delete their backing experience and accept account API keys with the `experience:delete` permission. Private and support channels require a user identity with channel management permission; account API keys cannot act as a channel participant. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.delete( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.delete(id, request_options=request_options) + return _response.data + + async def update( + self, + id: str, + *, + icon: typing.Optional[UpdateChannelsRequestIcon] = OMIT, + moderation: typing.Optional[UpdateChannelsRequestModeration] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> Channel: + """ + Update a channel. Community icon changes update the experience logo and require `experience:update`. Support rename and notification changes require `support_chat:create`. Private and support writes require a user identity with channel management permission; account API keys can update community channels only. + + Parameters + ---------- + id : str + Public resource ID. + + icon : typing.Optional[UpdateChannelsRequestIcon] + Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + + moderation : typing.Optional[UpdateChannelsRequestModeration] + Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + + name : typing.Optional[str] + Replacement display name for any channel kind. Send `null` to clear a private or support channel name. Community channels require a name and also rename the experience. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Omit to preserve the current setting. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.update( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.update( + id, + icon=icon, + moderation=moderation, + name=name, + notifications_enabled=notifications_enabled, + request_options=request_options, + ) + return _response.data + + async def accept(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Accept a direct-message request. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.accept( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.accept(id, request_options=request_options) + return _response.data + + async def hide(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Decline a DM request by hiding the channel from your inbox. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.hide( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.hide(id, request_options=request_options) + return _response.data + + async def mark_read( + self, + id: str, + *, + last_viewed_at: typing.Optional[dt.datetime] = OMIT, + viewed_message_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> ChannelMember: + """ + Mark a channel as read and optionally record viewed messages. + + Parameters + ---------- + id : str + Public resource ID. + + last_viewed_at : typing.Optional[dt.datetime] + Required for DM-backed kinds; not accepted for experience. + + viewed_message_ids : typing.Optional[typing.Sequence[str]] + Messages actually seen in this channel. Optional for all channel kinds; up to 100 IDs. Omitted or empty records no message views. Experience view counts update asynchronously. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.mark_read( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.mark_read( + id, last_viewed_at=last_viewed_at, viewed_message_ids=viewed_message_ids, request_options=request_options + ) + return _response.data + + async def mark_unread(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChannelMember: + """ + Mark a channel as unread for the authenticated user. Experience channels are unchanged. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChannelMember + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.mark_unread( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.mark_unread(id, request_options=request_options) + return _response.data + + async def pin( + self, id: str, *, position: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> None: + """ + Pin a private or support channel for yourself. Omit position to append a new pin or keep an existing pin in place. An explicit zero-based position inserts or moves the pin and shifts the rest. At most 12 channels can be pinned. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + position : typing.Optional[int] + Zero-based position in the resulting list. Must not exceed the last index after insertion. Omit to append a new pin or preserve an existing position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.pin( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.pin(id, position=position, request_options=request_options) + return _response.data + + async def reopen(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Reopen a resolved support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.reopen( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.reopen(id, request_options=request_options) + return _response.data + + async def resolve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Channel: + """ + Resolve a support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + Channel + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.resolve( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.resolve(id, request_options=request_options) + return _response.data + + async def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: + """ + Remove a channel from your pins and compact the remaining order. Your discarded memberships and inaccessible channels can be unpinned. Does not return channel data or grant read access. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + None + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.channels.unpin( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.unpin(id, request_options=request_options) + return _response.data diff --git a/src/whop_sdk/channels/raw_client.py b/src/whop_sdk/channels/raw_client.py new file mode 100644 index 000000000..78a1bcdc1 --- /dev/null +++ b/src/whop_sdk/channels/raw_client.py @@ -0,0 +1,2421 @@ +# This file was auto-generated by Fern from our API Definition. + +import datetime as dt +import typing +from json.decoder import JSONDecodeError + +from ..core.api_error import ApiError +from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ..core.http_response import AsyncHttpResponse, HttpResponse +from ..core.jsonable_encoder import encode_path_param +from ..core.pagination import AsyncPager, SyncPager +from ..core.parse_error import ParsingError +from ..core.pydantic_utilities import parse_obj_as +from ..core.request_options import RequestOptions +from ..core.serialization import convert_and_respect_annotation_metadata +from ..errors.bad_request_error import BadRequestError +from ..errors.conflict_error import ConflictError +from ..errors.forbidden_error import ForbiddenError +from ..errors.not_found_error import NotFoundError +from ..errors.unauthorized_error import UnauthorizedError +from ..types.channel import Channel +from ..types.channel_list_item import ChannelListItem +from ..types.channel_member import ChannelMember +from .types.create_channels_request_kind import CreateChannelsRequestKind +from .types.list_channels_request_direction import ListChannelsRequestDirection +from .types.list_channels_request_kind_item import ListChannelsRequestKindItem +from .types.list_channels_request_order import ListChannelsRequestOrder +from .types.list_channels_request_status import ListChannelsRequestStatus +from .types.list_channels_request_support_role import ListChannelsRequestSupportRole +from .types.list_channels_response import ListChannelsResponse +from .types.update_channels_request_icon import UpdateChannelsRequestIcon +from .types.update_channels_request_moderation import UpdateChannelsRequestModeration +from pydantic import ValidationError + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class RawChannelsClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def list( + self, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + include_total_count: typing.Optional[bool] = None, + kind: typing.Optional[ + typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]] + ] = None, + support_role: typing.Optional[ListChannelsRequestSupportRole] = None, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + status: typing.Optional[ListChannelsRequestStatus] = None, + awaiting_reply: typing.Optional[bool] = None, + unread: typing.Optional[bool] = None, + pinned: typing.Optional[bool] = None, + viewed: typing.Optional[bool] = None, + requested: typing.Optional[bool] = None, + order: typing.Optional[ListChannelsRequestOrder] = None, + include_members: typing.Optional[bool] = None, + include_last_message: typing.Optional[bool] = None, + direction: typing.Optional[ListChannelsRequestDirection] = None, + created_before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[ChannelListItem, ListChannelsResponse]: + """ + List channels you can access. + + Parameters + ---------- + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + include_total_count : typing.Optional[bool] + Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. + + kind : typing.Optional[typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]]] + Channel kinds to return. Combine `private` and `support`, or pass `community` alone. `private` includes one-to-one and group direct messages. + + support_role : typing.Optional[ListChannelsRequestSupportRole] + Which support channels to return. `customer` returns support chats you opened, including when `account_id` is set. `staff` returns the support inbox of the account in `account_id`, and requires permission to read that account's support chats. Applies only to `support` channels. + + account_id : typing.Optional[str] + Filter channels by their owning account, prefixed `biz_`. Applies to private, community and support channels. + + query : typing.Optional[str] + Return only channels whose name contains this text. Private and support channels also match a member's username or name. `%` and `_` match literally. + + status : typing.Optional[ListChannelsRequestStatus] + Return only support channels with this resolution. Requires `kind` to be `support` alone. + + awaiting_reply : typing.Optional[bool] + `true` returns unresolved support channels whose last message came from the customer; `false` returns the other support channels. Other channel kinds are returned either way. + + unread : typing.Optional[bool] + `true` returns channels with messages you have not read; `false` returns the rest. Requires authenticating as a user. + + pinned : typing.Optional[bool] + `true` returns private and support channels you have pinned; `false` returns those you have not. Requires authenticating as a user. + + viewed : typing.Optional[bool] + `true` returns community channels you have opened; `false` returns those you never have. Requires authenticating as a user. + + requested : typing.Optional[bool] + `true` returns your pending direct-message requests; `false` returns your accepted private channels. Requires `private` in `kind` and authenticating as a user. With `support` also in `kind`, `false` keeps support channels and `true` returns only pending requests. + + order : typing.Optional[ListChannelsRequestOrder] + The field to sort by. Defaults to `last_viewed_at` for community channels and `last_message_at` for private and support channels. Ties sort in a stable order. + + include_members : typing.Optional[bool] + Include the current members of private and support channels, including you, with their public profiles. + + include_last_message : typing.Optional[bool] + Include the most recent message you can see, with its author. + + direction : typing.Optional[ListChannelsRequestDirection] + The sort direction. Defaults to `desc`. + + created_before : typing.Optional[str] + Return only channels created before this ISO 8601 timestamp. + + created_after : typing.Optional[str] + Return only channels created after this ISO 8601 timestamp. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[ChannelListItem, ListChannelsResponse] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + "channels", + base_url=self._client_wrapper.get_environment().api, + method="GET", + params={ + "first": first, + "after": after, + "last": last, + "before": before, + "include_total_count": include_total_count, + "kind": kind, + "support_role": support_role, + "account_id": account_id, + "query": query, + "status": status, + "awaiting_reply": awaiting_reply, + "unread": unread, + "pinned": pinned, + "viewed": viewed, + "requested": requested, + "order": order, + "include_members": include_members, + "include_last_message": include_last_message, + "direction": direction, + "created_before": created_before, + "created_after": created_after, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListChannelsResponse, + parse_obj_as( + type_=ListChannelsResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + _get_next = lambda: self.list( + first=first, + after=_parsed_next, + last=last, + before=before, + include_total_count=include_total_count, + kind=kind, + support_role=support_role, + account_id=account_id, + query=query, + status=status, + awaiting_reply=awaiting_reply, + unread=unread, + pinned=pinned, + viewed=viewed, + requested=requested, + order=order, + include_members=include_members, + include_last_message=include_last_message, + direction=direction, + created_before=created_before, + created_after=created_after, + request_options=request_options, + ) + return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def create( + self, + *, + kind: CreateChannelsRequestKind, + account_id: typing.Optional[str] = OMIT, + customer_user_id: typing.Optional[str] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + participant_user_ids: typing.Optional[typing.Sequence[str]] = OMIT, + product_id: typing.Optional[str] = OMIT, + sender_user_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Channel]: + """ + Create a private, community or support channel. Returns an existing private or support channel unchanged with `200`, or a new channel with `201`. + + Parameters + ---------- + kind : CreateChannelsRequestKind + Channel kind. `private` is a one-to-one or group conversation, `community` creates a Chat experience on the account, and `support` opens a conversation between the account and a customer. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Accepted for all channel kinds. Required for community and support channels unless supplied by the credential's account context. + + customer_user_id : typing.Optional[str] + Customer ID, prefixed `user_`. Support channels only; requires support management permission. Omit to open your own support conversation. + + name : typing.Optional[str] + Channel display name, accepted for all channel kinds. Used only when a channel is created. For community channels, names the new Chat experience; defaults to the Chat app's name. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Defaults to `true`. Used only when a channel is created; change an existing channel with `PATCH /channels/:id`. + + participant_user_ids : typing.Optional[typing.Sequence[str]] + Other participant IDs, prefixed `user_`, excluding the sender. Required for private channels and accepted only for them. One ID creates a one-to-one conversation; more create a group. + + product_id : typing.Optional[str] + Product ID, prefixed `prod_`, to attach the new community channel to. Accepted only for community channels. Must belong to the owning account and requires the `experience:attach` permission on it. Omit to leave the channel unattached. + + sender_user_id : typing.Optional[str] + Sender ID, prefixed `user_`. Private channels only. Required for account API keys; omit when authenticating as a user. Requires channel management permission on the account. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Channel] + existing channel returned + """ + _response = self._client_wrapper.httpx_client.request( + "channels", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "account_id": account_id, + "customer_user_id": customer_user_id, + "kind": kind, + "name": name, + "notifications_enabled": notifications_enabled, + "participant_user_ids": participant_user_ids, + "product_id": product_id, + "sender_user_id": sender_user_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Channel]: + """ + Retrieve a channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Channel] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: + """ + Delete a channel. Deleting a support channel requires `support_chat:create` on the account. Community channels delete their backing experience and accept account API keys with the `experience:delete` permission. Private and support channels require a user identity with channel management permission; account API keys cannot act as a channel participant. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def update( + self, + id: str, + *, + icon: typing.Optional[UpdateChannelsRequestIcon] = OMIT, + moderation: typing.Optional[UpdateChannelsRequestModeration] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[Channel]: + """ + Update a channel. Community icon changes update the experience logo and require `experience:update`. Support rename and notification changes require `support_chat:create`. Private and support writes require a user identity with channel management permission; account API keys can update community channels only. + + Parameters + ---------- + id : str + Public resource ID. + + icon : typing.Optional[UpdateChannelsRequestIcon] + Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + + moderation : typing.Optional[UpdateChannelsRequestModeration] + Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + + name : typing.Optional[str] + Replacement display name for any channel kind. Send `null` to clear a private or support channel name. Community channels require a name and also rename the experience. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Omit to preserve the current setting. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Channel] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="PATCH", + json={ + "icon": convert_and_respect_annotation_metadata( + object_=icon, annotation=typing.Optional[UpdateChannelsRequestIcon], direction="write" + ), + "moderation": convert_and_respect_annotation_metadata( + object_=moderation, annotation=UpdateChannelsRequestModeration, direction="write" + ), + "name": name, + "notifications_enabled": notifications_enabled, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def accept( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChannelMember]: + """ + Accept a direct-message request. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/accept", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def hide(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[ChannelMember]: + """ + Decline a DM request by hiding the channel from your inbox. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/hide", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def mark_read( + self, + id: str, + *, + last_viewed_at: typing.Optional[dt.datetime] = OMIT, + viewed_message_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> HttpResponse[ChannelMember]: + """ + Mark a channel as read and optionally record viewed messages. + + Parameters + ---------- + id : str + Public resource ID. + + last_viewed_at : typing.Optional[dt.datetime] + Required for DM-backed kinds; not accepted for experience. + + viewed_message_ids : typing.Optional[typing.Sequence[str]] + Messages actually seen in this channel. Optional for all channel kinds; up to 100 IDs. Omitted or empty records no message views. Experience view counts update asynchronously. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/mark_read", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "last_viewed_at": last_viewed_at, + "viewed_message_ids": viewed_message_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def mark_unread( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChannelMember]: + """ + Mark a channel as unread for the authenticated user. Experience channels are unchanged. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChannelMember] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/mark_unread", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def pin( + self, id: str, *, position: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[None]: + """ + Pin a private or support channel for yourself. Omit position to append a new pin or keep an existing pin in place. An explicit zero-based position inserts or moves the pin and shifts the rest. At most 12 channels can be pinned. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + position : typing.Optional[int] + Zero-based position in the resulting list. Must not exceed the last index after insertion. Omit to append a new pin or preserve an existing position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/pin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "position": position, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def reopen(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Channel]: + """ + Reopen a resolved support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Channel] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/reopen", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def resolve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Channel]: + """ + Resolve a support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[Channel] + operation completed + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/resolve", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: + """ + Remove a channel from your pins and compact the remaining order. Your discarded memberships and inaccessible channels can be unpinned. Does not return channel data or grant read access. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[None] + """ + _response = self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/unpin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return HttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + +class AsyncRawChannelsClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + include_total_count: typing.Optional[bool] = None, + kind: typing.Optional[ + typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]] + ] = None, + support_role: typing.Optional[ListChannelsRequestSupportRole] = None, + account_id: typing.Optional[str] = None, + query: typing.Optional[str] = None, + status: typing.Optional[ListChannelsRequestStatus] = None, + awaiting_reply: typing.Optional[bool] = None, + unread: typing.Optional[bool] = None, + pinned: typing.Optional[bool] = None, + viewed: typing.Optional[bool] = None, + requested: typing.Optional[bool] = None, + order: typing.Optional[ListChannelsRequestOrder] = None, + include_members: typing.Optional[bool] = None, + include_last_message: typing.Optional[bool] = None, + direction: typing.Optional[ListChannelsRequestDirection] = None, + created_before: typing.Optional[str] = None, + created_after: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChannelListItem, ListChannelsResponse]: + """ + List channels you can access. + + Parameters + ---------- + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + include_total_count : typing.Optional[bool] + Set to `true` to return the number of matching results in `page_info.total_count`. Send `first=0` as well to return the count without any results. + + kind : typing.Optional[typing.Union[ListChannelsRequestKindItem, typing.Sequence[ListChannelsRequestKindItem]]] + Channel kinds to return. Combine `private` and `support`, or pass `community` alone. `private` includes one-to-one and group direct messages. + + support_role : typing.Optional[ListChannelsRequestSupportRole] + Which support channels to return. `customer` returns support chats you opened, including when `account_id` is set. `staff` returns the support inbox of the account in `account_id`, and requires permission to read that account's support chats. Applies only to `support` channels. + + account_id : typing.Optional[str] + Filter channels by their owning account, prefixed `biz_`. Applies to private, community and support channels. + + query : typing.Optional[str] + Return only channels whose name contains this text. Private and support channels also match a member's username or name. `%` and `_` match literally. + + status : typing.Optional[ListChannelsRequestStatus] + Return only support channels with this resolution. Requires `kind` to be `support` alone. + + awaiting_reply : typing.Optional[bool] + `true` returns unresolved support channels whose last message came from the customer; `false` returns the other support channels. Other channel kinds are returned either way. + + unread : typing.Optional[bool] + `true` returns channels with messages you have not read; `false` returns the rest. Requires authenticating as a user. + + pinned : typing.Optional[bool] + `true` returns private and support channels you have pinned; `false` returns those you have not. Requires authenticating as a user. + + viewed : typing.Optional[bool] + `true` returns community channels you have opened; `false` returns those you never have. Requires authenticating as a user. + + requested : typing.Optional[bool] + `true` returns your pending direct-message requests; `false` returns your accepted private channels. Requires `private` in `kind` and authenticating as a user. With `support` also in `kind`, `false` keeps support channels and `true` returns only pending requests. + + order : typing.Optional[ListChannelsRequestOrder] + The field to sort by. Defaults to `last_viewed_at` for community channels and `last_message_at` for private and support channels. Ties sort in a stable order. + + include_members : typing.Optional[bool] + Include the current members of private and support channels, including you, with their public profiles. + + include_last_message : typing.Optional[bool] + Include the most recent message you can see, with its author. + + direction : typing.Optional[ListChannelsRequestDirection] + The sort direction. Defaults to `desc`. + + created_before : typing.Optional[str] + Return only channels created before this ISO 8601 timestamp. + + created_after : typing.Optional[str] + Return only channels created after this ISO 8601 timestamp. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChannelListItem, ListChannelsResponse] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + "channels", + base_url=self._client_wrapper.get_environment().api, + method="GET", + params={ + "first": first, + "after": after, + "last": last, + "before": before, + "include_total_count": include_total_count, + "kind": kind, + "support_role": support_role, + "account_id": account_id, + "query": query, + "status": status, + "awaiting_reply": awaiting_reply, + "unread": unread, + "pinned": pinned, + "viewed": viewed, + "requested": requested, + "order": order, + "include_members": include_members, + "include_last_message": include_last_message, + "direction": direction, + "created_before": created_before, + "created_after": created_after, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListChannelsResponse, + parse_obj_as( + type_=ListChannelsResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + + async def _get_next(): + return await self.list( + first=first, + after=_parsed_next, + last=last, + before=before, + include_total_count=include_total_count, + kind=kind, + support_role=support_role, + account_id=account_id, + query=query, + status=status, + awaiting_reply=awaiting_reply, + unread=unread, + pinned=pinned, + viewed=viewed, + requested=requested, + order=order, + include_members=include_members, + include_last_message=include_last_message, + direction=direction, + created_before=created_before, + created_after=created_after, + request_options=request_options, + ) + + return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def create( + self, + *, + kind: CreateChannelsRequestKind, + account_id: typing.Optional[str] = OMIT, + customer_user_id: typing.Optional[str] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + participant_user_ids: typing.Optional[typing.Sequence[str]] = OMIT, + product_id: typing.Optional[str] = OMIT, + sender_user_id: typing.Optional[str] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Channel]: + """ + Create a private, community or support channel. Returns an existing private or support channel unchanged with `200`, or a new channel with `201`. + + Parameters + ---------- + kind : CreateChannelsRequestKind + Channel kind. `private` is a one-to-one or group conversation, `community` creates a Chat experience on the account, and `support` opens a conversation between the account and a customer. + + account_id : typing.Optional[str] + Owning account ID, prefixed `biz_`. Accepted for all channel kinds. Required for community and support channels unless supplied by the credential's account context. + + customer_user_id : typing.Optional[str] + Customer ID, prefixed `user_`. Support channels only; requires support management permission. Omit to open your own support conversation. + + name : typing.Optional[str] + Channel display name, accepted for all channel kinds. Used only when a channel is created. For community channels, names the new Chat experience; defaults to the Chat app's name. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Defaults to `true`. Used only when a channel is created; change an existing channel with `PATCH /channels/:id`. + + participant_user_ids : typing.Optional[typing.Sequence[str]] + Other participant IDs, prefixed `user_`, excluding the sender. Required for private channels and accepted only for them. One ID creates a one-to-one conversation; more create a group. + + product_id : typing.Optional[str] + Product ID, prefixed `prod_`, to attach the new community channel to. Accepted only for community channels. Must belong to the owning account and requires the `experience:attach` permission on it. Omit to leave the channel unattached. + + sender_user_id : typing.Optional[str] + Sender ID, prefixed `user_`. Private channels only. Required for account API keys; omit when authenticating as a user. Requires channel management permission on the account. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Channel] + existing channel returned + """ + _response = await self._client_wrapper.httpx_client.request( + "channels", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "account_id": account_id, + "customer_user_id": customer_user_id, + "kind": kind, + "name": name, + "notifications_enabled": notifications_enabled, + "participant_user_ids": participant_user_ids, + "product_id": product_id, + "sender_user_id": sender_user_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Channel]: + """ + Retrieve a channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Channel] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Delete a channel. Deleting a support channel requires `support_chat:create` on the account. Community channels delete their backing experience and accept account API keys with the `experience:delete` permission. Private and support channels require a user identity with channel management permission; account API keys cannot act as a channel participant. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + icon: typing.Optional[UpdateChannelsRequestIcon] = OMIT, + moderation: typing.Optional[UpdateChannelsRequestModeration] = OMIT, + name: typing.Optional[str] = OMIT, + notifications_enabled: typing.Optional[bool] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[Channel]: + """ + Update a channel. Community icon changes update the experience logo and require `experience:update`. Support rename and notification changes require `support_chat:create`. Private and support writes require a user identity with channel management permission; account API keys can update community channels only. + + Parameters + ---------- + id : str + Public resource ID. + + icon : typing.Optional[UpdateChannelsRequestIcon] + Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + + moderation : typing.Optional[UpdateChannelsRequestModeration] + Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + + name : typing.Optional[str] + Replacement display name for any channel kind. Send `null` to clear a private or support channel name. Community channels require a name and also rename the experience. + + notifications_enabled : typing.Optional[bool] + Whether app notifications are on for any channel kind. Webhooks fire either way. Omit to preserve the current setting. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Channel] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="PATCH", + json={ + "icon": convert_and_respect_annotation_metadata( + object_=icon, annotation=typing.Optional[UpdateChannelsRequestIcon], direction="write" + ), + "moderation": convert_and_respect_annotation_metadata( + object_=moderation, annotation=UpdateChannelsRequestModeration, direction="write" + ), + "name": name, + "notifications_enabled": notifications_enabled, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def accept( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChannelMember]: + """ + Accept a direct-message request. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/accept", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def hide( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChannelMember]: + """ + Decline a DM request by hiding the channel from your inbox. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/hide", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def mark_read( + self, + id: str, + *, + last_viewed_at: typing.Optional[dt.datetime] = OMIT, + viewed_message_ids: typing.Optional[typing.Sequence[str]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ChannelMember]: + """ + Mark a channel as read and optionally record viewed messages. + + Parameters + ---------- + id : str + Public resource ID. + + last_viewed_at : typing.Optional[dt.datetime] + Required for DM-backed kinds; not accepted for experience. + + viewed_message_ids : typing.Optional[typing.Sequence[str]] + Messages actually seen in this channel. Optional for all channel kinds; up to 100 IDs. Omitted or empty records no message views. Experience view counts update asynchronously. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/mark_read", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "last_viewed_at": last_viewed_at, + "viewed_message_ids": viewed_message_ids, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def mark_unread( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChannelMember]: + """ + Mark a channel as unread for the authenticated user. Experience channels are unchanged. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChannelMember] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/mark_unread", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChannelMember, + parse_obj_as( + type_=ChannelMember, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def pin( + self, id: str, *, position: typing.Optional[int] = OMIT, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Pin a private or support channel for yourself. Omit position to append a new pin or keep an existing pin in place. An explicit zero-based position inserts or moves the pin and shifts the rest. At most 12 channels can be pinned. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + position : typing.Optional[int] + Zero-based position in the resulting list. Must not exceed the last index after insertion. Omit to append a new pin or preserve an existing position. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/pin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "position": position, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 400: + raise BadRequestError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def reopen( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Channel]: + """ + Reopen a resolved support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Channel] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/reopen", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def resolve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[Channel]: + """ + Resolve a support channel. + + Parameters + ---------- + id : str + Public resource ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[Channel] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/resolve", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={}, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + Channel, + parse_obj_as( + type_=Channel, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def unpin( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Remove a channel from your pins and compact the remaining order. Your discarded memberships and inaccessible channels can be unpinned. Does not return channel data or grant read access. + + Parameters + ---------- + id : str + The channel ID, prefixed `feed_`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"channels/{encode_path_param(id)}/unpin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) diff --git a/src/whop_sdk/channels/types/__init__.py b/src/whop_sdk/channels/types/__init__.py new file mode 100644 index 000000000..e420e9a6a --- /dev/null +++ b/src/whop_sdk/channels/types/__init__.py @@ -0,0 +1,71 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_channels_request_kind import CreateChannelsRequestKind + from .list_channels_request_direction import ListChannelsRequestDirection + from .list_channels_request_kind_item import ListChannelsRequestKindItem + from .list_channels_request_order import ListChannelsRequestOrder + from .list_channels_request_status import ListChannelsRequestStatus + from .list_channels_request_support_role import ListChannelsRequestSupportRole + from .list_channels_response import ListChannelsResponse + from .list_channels_response_page_info import ListChannelsResponsePageInfo + from .update_channels_request_icon import UpdateChannelsRequestIcon + from .update_channels_request_moderation import UpdateChannelsRequestModeration + from .update_channels_request_moderation_who_can_post import UpdateChannelsRequestModerationWhoCanPost + from .update_channels_request_moderation_who_can_react import UpdateChannelsRequestModerationWhoCanReact +_dynamic_imports: typing.Dict[str, str] = { + "CreateChannelsRequestKind": ".create_channels_request_kind", + "ListChannelsRequestDirection": ".list_channels_request_direction", + "ListChannelsRequestKindItem": ".list_channels_request_kind_item", + "ListChannelsRequestOrder": ".list_channels_request_order", + "ListChannelsRequestStatus": ".list_channels_request_status", + "ListChannelsRequestSupportRole": ".list_channels_request_support_role", + "ListChannelsResponse": ".list_channels_response", + "ListChannelsResponsePageInfo": ".list_channels_response_page_info", + "UpdateChannelsRequestIcon": ".update_channels_request_icon", + "UpdateChannelsRequestModeration": ".update_channels_request_moderation", + "UpdateChannelsRequestModerationWhoCanPost": ".update_channels_request_moderation_who_can_post", + "UpdateChannelsRequestModerationWhoCanReact": ".update_channels_request_moderation_who_can_react", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = [ + "CreateChannelsRequestKind", + "ListChannelsRequestDirection", + "ListChannelsRequestKindItem", + "ListChannelsRequestOrder", + "ListChannelsRequestStatus", + "ListChannelsRequestSupportRole", + "ListChannelsResponse", + "ListChannelsResponsePageInfo", + "UpdateChannelsRequestIcon", + "UpdateChannelsRequestModeration", + "UpdateChannelsRequestModerationWhoCanPost", + "UpdateChannelsRequestModerationWhoCanReact", +] diff --git a/src/whop_sdk/channels/types/create_channels_request_kind.py b/src/whop_sdk/channels/types/create_channels_request_kind.py new file mode 100644 index 000000000..c58234eaf --- /dev/null +++ b/src/whop_sdk/channels/types/create_channels_request_kind.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +CreateChannelsRequestKind = typing.Union[typing.Literal["private", "community", "support"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_request_direction.py b/src/whop_sdk/channels/types/list_channels_request_direction.py new file mode 100644 index 000000000..ca1c34c71 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_request_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChannelsRequestDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_request_kind_item.py b/src/whop_sdk/channels/types/list_channels_request_kind_item.py new file mode 100644 index 000000000..3dea79810 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_request_kind_item.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChannelsRequestKindItem = typing.Union[typing.Literal["private", "community", "support"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_request_order.py b/src/whop_sdk/channels/types/list_channels_request_order.py new file mode 100644 index 000000000..a94b064e3 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChannelsRequestOrder = typing.Union[typing.Literal["created_at", "last_message_at", "last_viewed_at"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_request_status.py b/src/whop_sdk/channels/types/list_channels_request_status.py new file mode 100644 index 000000000..5cda1bad3 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_request_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChannelsRequestStatus = typing.Union[typing.Literal["unresolved", "resolved"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_request_support_role.py b/src/whop_sdk/channels/types/list_channels_request_support_role.py new file mode 100644 index 000000000..7c3bb4157 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_request_support_role.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListChannelsRequestSupportRole = typing.Union[typing.Literal["customer", "staff"], typing.Any] diff --git a/src/whop_sdk/channels/types/list_channels_response.py b/src/whop_sdk/channels/types/list_channels_response.py new file mode 100644 index 000000000..42b1a0099 --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_response.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ...types.channel_list_item import ChannelListItem +from .list_channels_response_page_info import ListChannelsResponsePageInfo + + +class ListChannelsResponse(UniversalBaseModel): + data: typing.List[ChannelListItem] + page_info: ListChannelsResponsePageInfo + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channels/types/list_channels_response_page_info.py b/src/whop_sdk/channels/types/list_channels_response_page_info.py new file mode 100644 index 000000000..4ae341e8f --- /dev/null +++ b/src/whop_sdk/channels/types/list_channels_response_page_info.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ListChannelsResponsePageInfo(UniversalBaseModel): + end_cursor: typing.Optional[str] = None + has_next_page: bool + has_previous_page: bool + start_cursor: typing.Optional[str] = None + total_count: typing.Optional[int] = pydantic.Field(default=None) + """ + Number of results matching the filters, across every page. Counting stops at 10,000. `null` when `include_total_count` isn't `true`, or when the count ran out of time. + """ + + total_count_capped: bool = pydantic.Field() + """ + Whether counting stopped at the limit. `true` means `total_count` is 10,000 or more. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channels/types/update_channels_request_icon.py b/src/whop_sdk/channels/types/update_channels_request_icon.py new file mode 100644 index 000000000..4e905246e --- /dev/null +++ b/src/whop_sdk/channels/types/update_channels_request_icon.py @@ -0,0 +1,23 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class UpdateChannelsRequestIcon(UniversalBaseModel): + """ + Community channels only. File reference for the experience logo; `null` clears it and restores the app icon fallback. Omit to preserve the current logo. + """ + + id: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channels/types/update_channels_request_moderation.py b/src/whop_sdk/channels/types/update_channels_request_moderation.py new file mode 100644 index 000000000..9728fa078 --- /dev/null +++ b/src/whop_sdk/channels/types/update_channels_request_moderation.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .update_channels_request_moderation_who_can_post import UpdateChannelsRequestModerationWhoCanPost +from .update_channels_request_moderation_who_can_react import UpdateChannelsRequestModerationWhoCanReact + + +class UpdateChannelsRequestModeration(UniversalBaseModel): + """ + Moderation settings, accepted only for community channels. Requires chat moderation permission. Omitted settings are preserved. + """ + + ban_media: typing.Optional[bool] = pydantic.Field(default=None) + """ + Prevent members from posting media. + """ + + ban_urls: typing.Optional[bool] = pydantic.Field(default=None) + """ + Prevent members from posting links. + """ + + banned_words: typing.Optional[typing.List[str]] = pydantic.Field(default=None) + """ + Words blocked in the channel. An empty list clears the blocklist. + """ + + user_posts_cooldown_seconds: typing.Optional[int] = pydantic.Field(default=None) + """ + Seconds a member must wait between messages. `0` or `null` turns the cooldown off. + """ + + who_can_post: typing.Optional[UpdateChannelsRequestModerationWhoCanPost] = pydantic.Field(default=None) + """ + Who can post messages. + """ + + who_can_react: typing.Optional[UpdateChannelsRequestModerationWhoCanReact] = pydantic.Field(default=None) + """ + Who can react to messages. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_post.py b/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_post.py new file mode 100644 index 000000000..4ba306588 --- /dev/null +++ b/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_post.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateChannelsRequestModerationWhoCanPost = typing.Union[typing.Literal["everyone", "admins"], typing.Any] diff --git a/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_react.py b/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_react.py new file mode 100644 index 000000000..a84039c59 --- /dev/null +++ b/src/whop_sdk/channels/types/update_channels_request_moderation_who_can_react.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +UpdateChannelsRequestModerationWhoCanReact = typing.Union[typing.Literal["everyone", "no_one"], typing.Any] diff --git a/src/whop_sdk/chat_channels/client.py b/src/whop_sdk/chat_channels/client.py index 771e93554..52201a8c5 100644 --- a/src/whop_sdk/chat_channels/client.py +++ b/src/whop_sdk/chat_channels/client.py @@ -81,7 +81,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -132,7 +132,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -285,7 +285,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -345,7 +345,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -418,7 +418,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/checkout_configurations/client.py b/src/whop_sdk/checkout_configurations/client.py index 1eac4603e..38fa47fd8 100644 --- a/src/whop_sdk/checkout_configurations/client.py +++ b/src/whop_sdk/checkout_configurations/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -267,7 +267,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -351,7 +351,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -450,7 +450,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -506,7 +506,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -549,7 +549,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/claim_links/client.py b/src/whop_sdk/claim_links/client.py index 49692be77..ba84d55fa 100644 --- a/src/whop_sdk/claim_links/client.py +++ b/src/whop_sdk/claim_links/client.py @@ -48,7 +48,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -81,7 +81,7 @@ def claim(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -134,7 +134,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -177,7 +177,7 @@ async def claim( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/client.py b/src/whop_sdk/client.py index 711a50991..40a0485b5 100644 --- a/src/whop_sdk/client.py +++ b/src/whop_sdk/client.py @@ -34,6 +34,8 @@ from .card_transactions.client import AsyncCardTransactionsClient, CardTransactionsClient from .cards.client import AsyncCardsClient, CardsClient from .cashback_rules.client import AsyncCashbackRulesClient, CashbackRulesClient + from .channel_members.client import AsyncChannelMembersClient, ChannelMembersClient + from .channels.client import AsyncChannelsClient, ChannelsClient from .chat_channels.client import AsyncChatChannelsClient, ChatChannelsClient from .checkout_configurations.client import AsyncCheckoutConfigurationsClient, CheckoutConfigurationsClient from .claim_links.client import AsyncClaimLinksClient, ClaimLinksClient @@ -160,7 +162,7 @@ class Whop: from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -170,7 +172,7 @@ def __init__( self, *, environment: WhopEnvironment = WhopEnvironment.PRODUCTION, - api_version_date: typing.Optional[str] = "2026-11-06", + api_version_date: typing.Optional[str] = "2026-11-07", idempotency_key: typing.Optional[str] = None, token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, @@ -225,6 +227,8 @@ def __init__( self._card_transactions: typing.Optional[CardTransactionsClient] = None self._cards: typing.Optional[CardsClient] = None self._cashback_rules: typing.Optional[CashbackRulesClient] = None + self._channel_members: typing.Optional[ChannelMembersClient] = None + self._channels: typing.Optional[ChannelsClient] = None self._chat_channels: typing.Optional[ChatChannelsClient] = None self._checkout_configurations: typing.Optional[CheckoutConfigurationsClient] = None self._claim_links: typing.Optional[ClaimLinksClient] = None @@ -495,6 +499,22 @@ def cashback_rules(self): self._cashback_rules = CashbackRulesClient(client_wrapper=self._client_wrapper) return self._cashback_rules + @property + def channel_members(self): + if self._channel_members is None: + from .channel_members.client import ChannelMembersClient # noqa: E402 + + self._channel_members = ChannelMembersClient(client_wrapper=self._client_wrapper) + return self._channel_members + + @property + def channels(self): + if self._channels is None: + from .channels.client import ChannelsClient # noqa: E402 + + self._channels = ChannelsClient(client_wrapper=self._client_wrapper) + return self._channels + @property def chat_channels(self): if self._chat_channels is None: @@ -1180,7 +1200,7 @@ class AsyncWhop: from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1190,7 +1210,7 @@ def __init__( self, *, environment: WhopEnvironment = WhopEnvironment.PRODUCTION, - api_version_date: typing.Optional[str] = "2026-11-06", + api_version_date: typing.Optional[str] = "2026-11-07", idempotency_key: typing.Optional[str] = None, token: typing.Optional[typing.Union[str, typing.Callable[[], str]]] = None, headers: typing.Optional[typing.Dict[str, str]] = None, @@ -1245,6 +1265,8 @@ def __init__( self._card_transactions: typing.Optional[AsyncCardTransactionsClient] = None self._cards: typing.Optional[AsyncCardsClient] = None self._cashback_rules: typing.Optional[AsyncCashbackRulesClient] = None + self._channel_members: typing.Optional[AsyncChannelMembersClient] = None + self._channels: typing.Optional[AsyncChannelsClient] = None self._chat_channels: typing.Optional[AsyncChatChannelsClient] = None self._checkout_configurations: typing.Optional[AsyncCheckoutConfigurationsClient] = None self._claim_links: typing.Optional[AsyncClaimLinksClient] = None @@ -1515,6 +1537,22 @@ def cashback_rules(self): self._cashback_rules = AsyncCashbackRulesClient(client_wrapper=self._client_wrapper) return self._cashback_rules + @property + def channel_members(self): + if self._channel_members is None: + from .channel_members.client import AsyncChannelMembersClient # noqa: E402 + + self._channel_members = AsyncChannelMembersClient(client_wrapper=self._client_wrapper) + return self._channel_members + + @property + def channels(self): + if self._channels is None: + from .channels.client import AsyncChannelsClient # noqa: E402 + + self._channels = AsyncChannelsClient(client_wrapper=self._client_wrapper) + return self._channels + @property def chat_channels(self): if self._chat_channels is None: diff --git a/src/whop_sdk/company_token_transactions/client.py b/src/whop_sdk/company_token_transactions/client.py index 4084764b8..36808419b 100644 --- a/src/whop_sdk/company_token_transactions/client.py +++ b/src/whop_sdk/company_token_transactions/client.py @@ -86,7 +86,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -144,7 +144,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -187,7 +187,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -271,7 +271,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -338,7 +338,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -391,7 +391,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/confirmation_tokens/client.py b/src/whop_sdk/confirmation_tokens/client.py index 3e5e75784..bbf7118c7 100644 --- a/src/whop_sdk/confirmation_tokens/client.py +++ b/src/whop_sdk/confirmation_tokens/client.py @@ -50,7 +50,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -107,7 +107,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_chapters/client.py b/src/whop_sdk/course_chapters/client.py index 75ab47d4e..28a0f585c 100644 --- a/src/whop_sdk/course_chapters/client.py +++ b/src/whop_sdk/course_chapters/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -164,7 +164,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ def update(self, id: str, *, title: str, request_options: typing.Optional[Reques from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -315,7 +315,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -377,7 +377,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -421,7 +421,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +465,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -514,7 +514,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_lesson_interactions/client.py b/src/whop_sdk/course_lesson_interactions/client.py index f797ac53d..02e1e16bb 100644 --- a/src/whop_sdk/course_lesson_interactions/client.py +++ b/src/whop_sdk/course_lesson_interactions/client.py @@ -85,7 +85,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -228,7 +228,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -294,7 +294,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_lessons/client.py b/src/whop_sdk/course_lessons/client.py index da5ff1ed4..465de0714 100644 --- a/src/whop_sdk/course_lessons/client.py +++ b/src/whop_sdk/course_lessons/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -178,7 +178,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -225,7 +225,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -261,7 +261,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -362,7 +362,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -412,7 +412,7 @@ def mark_as_completed(self, lesson_id: str, *, request_options: typing.Optional[ from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -445,7 +445,7 @@ def start(self, lesson_id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -490,7 +490,7 @@ def submit_assessment( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -574,7 +574,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -667,7 +667,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -722,7 +722,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -766,7 +766,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -875,7 +875,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -935,7 +935,7 @@ async def mark_as_completed( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -976,7 +976,7 @@ async def start(self, lesson_id: str, *, request_options: typing.Optional[Reques from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1029,7 +1029,7 @@ async def submit_assessment( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/course_students/client.py b/src/whop_sdk/course_students/client.py index 6957042c9..28673242a 100644 --- a/src/whop_sdk/course_students/client.py +++ b/src/whop_sdk/course_students/client.py @@ -77,7 +77,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -208,7 +208,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/courses/client.py b/src/whop_sdk/courses/client.py index 898b93223..a7fa2918b 100644 --- a/src/whop_sdk/courses/client.py +++ b/src/whop_sdk/courses/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -168,7 +168,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -215,7 +215,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -251,7 +251,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -332,7 +332,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -424,7 +424,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -517,7 +517,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -572,7 +572,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -616,7 +616,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -705,7 +705,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/deposits/client.py b/src/whop_sdk/deposits/client.py index 99808d6b1..598f9eb0b 100644 --- a/src/whop_sdk/deposits/client.py +++ b/src/whop_sdk/deposits/client.py @@ -72,7 +72,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -132,7 +132,7 @@ def reverse( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -206,7 +206,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -274,7 +274,7 @@ async def reverse( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dispute_alerts/client.py b/src/whop_sdk/dispute_alerts/client.py index a39324c20..f365ee0fa 100644 --- a/src/whop_sdk/dispute_alerts/client.py +++ b/src/whop_sdk/dispute_alerts/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -296,7 +296,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/disputes/client.py b/src/whop_sdk/disputes/client.py index ad9342d5d..df79609b5 100644 --- a/src/whop_sdk/disputes/client.py +++ b/src/whop_sdk/disputes/client.py @@ -113,7 +113,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -200,7 +200,7 @@ def summary( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -241,7 +241,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -283,7 +283,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -316,7 +316,7 @@ def accept(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -349,7 +349,7 @@ def submit(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -392,7 +392,7 @@ def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -503,7 +503,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -599,7 +599,7 @@ async def summary( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -648,7 +648,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -698,7 +698,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -739,7 +739,7 @@ async def accept(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -780,7 +780,7 @@ async def submit(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -831,7 +831,7 @@ async def upload_evidence( from whop_sdk.disputes import UploadEvidenceDisputesRequestDocumentsItem client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dm_channels/client.py b/src/whop_sdk/dm_channels/client.py index 7fe32e24c..538080ba8 100644 --- a/src/whop_sdk/dm_channels/client.py +++ b/src/whop_sdk/dm_channels/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -136,7 +136,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -179,7 +179,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -216,7 +216,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -262,7 +262,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -337,7 +337,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -407,7 +407,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -458,7 +458,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -503,7 +503,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -557,7 +557,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/dm_members/client.py b/src/whop_sdk/dm_members/client.py index b29b66ad6..e0db3a6f2 100644 --- a/src/whop_sdk/dm_members/client.py +++ b/src/whop_sdk/dm_members/client.py @@ -78,7 +78,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -128,7 +128,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -166,7 +166,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +203,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -253,7 +253,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -331,7 +331,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -390,7 +390,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -438,7 +438,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -483,7 +483,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -541,7 +541,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/domains/client.py b/src/whop_sdk/domains/client.py index 9ccaa6a14..2fb4c3808 100644 --- a/src/whop_sdk/domains/client.py +++ b/src/whop_sdk/domains/client.py @@ -166,7 +166,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -279,7 +279,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -327,7 +327,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -360,7 +360,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -434,7 +434,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -479,7 +479,7 @@ def check(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -617,7 +617,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -739,7 +739,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -795,7 +795,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -836,7 +836,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -918,7 +918,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -971,7 +971,7 @@ async def check(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/economic_intelligence/client.py b/src/whop_sdk/economic_intelligence/client.py index b1ba2b1a8..142c4cde4 100644 --- a/src/whop_sdk/economic_intelligence/client.py +++ b/src/whop_sdk/economic_intelligence/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -181,7 +181,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -284,7 +284,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -377,7 +377,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/email_addresses/client.py b/src/whop_sdk/email_addresses/client.py index 0cb37786a..a5106ec8b 100644 --- a/src/whop_sdk/email_addresses/client.py +++ b/src/whop_sdk/email_addresses/client.py @@ -81,7 +81,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -138,7 +138,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -173,7 +173,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -206,7 +206,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -244,7 +244,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -279,7 +279,7 @@ def mobileconfig( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -312,7 +312,7 @@ def reset_password(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -392,7 +392,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -458,7 +458,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -501,7 +501,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -542,7 +542,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -588,7 +588,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -631,7 +631,7 @@ async def mobileconfig( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -673,7 +673,7 @@ async def reset_password(self, id: str, *, request_options: typing.Optional[Requ from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/events/client.py b/src/whop_sdk/events/client.py index fc7e3d53e..f8249a1b4 100644 --- a/src/whop_sdk/events/client.py +++ b/src/whop_sdk/events/client.py @@ -138,7 +138,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -277,7 +277,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -350,7 +350,7 @@ def pulse( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ def validate_pixel( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -522,7 +522,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -670,7 +670,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -751,7 +751,7 @@ async def pulse( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -806,7 +806,7 @@ async def validate_pixel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/experiences/client.py b/src/whop_sdk/experiences/client.py index faf381f16..c46eac6c6 100644 --- a/src/whop_sdk/experiences/client.py +++ b/src/whop_sdk/experiences/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -263,7 +263,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -332,7 +332,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -383,7 +383,7 @@ def attach( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -425,7 +425,7 @@ def detach( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -467,7 +467,7 @@ def duplicate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -556,7 +556,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -655,7 +655,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -706,7 +706,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -750,7 +750,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -827,7 +827,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -886,7 +886,7 @@ async def attach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -936,7 +936,7 @@ async def detach( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -986,7 +986,7 @@ async def duplicate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/experiments/client.py b/src/whop_sdk/experiments/client.py index fc5dcbe7c..601455fe9 100644 --- a/src/whop_sdk/experiments/client.py +++ b/src/whop_sdk/experiments/client.py @@ -100,7 +100,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -190,7 +190,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -262,7 +262,7 @@ def exposures( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -310,7 +310,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -371,7 +371,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -426,7 +426,7 @@ def activate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -478,7 +478,7 @@ def end( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -523,7 +523,7 @@ def pause( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -611,7 +611,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -710,7 +710,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -790,7 +790,7 @@ async def exposures( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -846,7 +846,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -915,7 +915,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -978,7 +978,7 @@ async def activate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1038,7 +1038,7 @@ async def end( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1091,7 +1091,7 @@ async def pause( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/exports/client.py b/src/whop_sdk/exports/client.py index afc070c85..fb070095b 100644 --- a/src/whop_sdk/exports/client.py +++ b/src/whop_sdk/exports/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -144,7 +144,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +333,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -381,7 +381,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/external_accounts/client.py b/src/whop_sdk/external_accounts/client.py index 53ef8310c..080b7b4dc 100644 --- a/src/whop_sdk/external_accounts/client.py +++ b/src/whop_sdk/external_accounts/client.py @@ -110,7 +110,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -163,7 +163,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -209,7 +209,7 @@ def connect( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -300,7 +300,7 @@ def refresh( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -402,7 +402,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -464,7 +464,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -518,7 +518,7 @@ async def connect( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -575,7 +575,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -627,7 +627,7 @@ async def refresh( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/fee_markups/client.py b/src/whop_sdk/fee_markups/client.py index e66d227f8..e15898040 100644 --- a/src/whop_sdk/fee_markups/client.py +++ b/src/whop_sdk/fee_markups/client.py @@ -76,7 +76,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -145,7 +145,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -190,7 +190,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -265,7 +265,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -343,7 +343,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/feedback_submissions/client.py b/src/whop_sdk/feedback_submissions/client.py index 149901fbb..493469994 100644 --- a/src/whop_sdk/feedback_submissions/client.py +++ b/src/whop_sdk/feedback_submissions/client.py @@ -62,7 +62,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -129,7 +129,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/files/client.py b/src/whop_sdk/files/client.py index 96945711a..580eef94b 100644 --- a/src/whop_sdk/files/client.py +++ b/src/whop_sdk/files/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -146,7 +146,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -185,7 +185,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def complete( from whop_sdk.files import CompleteFilesRequestMultipartPartsItem client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -324,7 +324,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -443,7 +443,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -498,7 +498,7 @@ async def complete( from whop_sdk.files import CompleteFilesRequestMultipartPartsItem client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/financial_activity/client.py b/src/whop_sdk/financial_activity/client.py index c1bc2680e..2101ea555 100644 --- a/src/whop_sdk/financial_activity/client.py +++ b/src/whop_sdk/financial_activity/client.py @@ -130,7 +130,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -281,7 +281,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/financial_reports/breakdown/client.py b/src/whop_sdk/financial_reports/breakdown/client.py index 5f9e9f58b..de4421d5d 100644 --- a/src/whop_sdk/financial_reports/breakdown/client.py +++ b/src/whop_sdk/financial_reports/breakdown/client.py @@ -84,7 +84,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -188,7 +188,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/financial_reports/client.py b/src/whop_sdk/financial_reports/client.py index ccaf7ccb4..8b4bb14bb 100644 --- a/src/whop_sdk/financial_reports/client.py +++ b/src/whop_sdk/financial_reports/client.py @@ -119,7 +119,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -259,7 +259,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/financing_applications/client.py b/src/whop_sdk/financing_applications/client.py index 56402fabc..6ea0cf6c6 100644 --- a/src/whop_sdk/financing_applications/client.py +++ b/src/whop_sdk/financing_applications/client.py @@ -98,7 +98,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -147,7 +147,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -178,7 +178,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -222,7 +222,7 @@ def update( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -271,7 +271,7 @@ def submit( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -369,7 +369,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -427,7 +427,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -468,7 +468,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ async def update( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -577,7 +577,7 @@ async def submit( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/forum_posts/client.py b/src/whop_sdk/forum_posts/client.py index 3ac5d7cc1..4c79b463d 100644 --- a/src/whop_sdk/forum_posts/client.py +++ b/src/whop_sdk/forum_posts/client.py @@ -92,7 +92,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -197,7 +197,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -248,7 +248,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -401,7 +401,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -515,7 +515,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -574,7 +574,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -640,7 +640,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/forums/client.py b/src/whop_sdk/forums/client.py index 72e449913..81e04d132 100644 --- a/src/whop_sdk/forums/client.py +++ b/src/whop_sdk/forums/client.py @@ -83,7 +83,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -134,7 +134,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -195,7 +195,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -342,7 +342,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -411,7 +411,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/identity_profiles/client.py b/src/whop_sdk/identity_profiles/client.py index c74510f6d..ee6332457 100644 --- a/src/whop_sdk/identity_profiles/client.py +++ b/src/whop_sdk/identity_profiles/client.py @@ -84,7 +84,7 @@ def list_identity_profile( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -137,7 +137,7 @@ def retrieve_identity_profile( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -178,7 +178,7 @@ def unlink_identity_profile( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -238,7 +238,7 @@ def list_verifications_identity_profile( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -327,7 +327,7 @@ async def list_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ async def retrieve_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -438,7 +438,7 @@ async def unlink_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -506,7 +506,7 @@ async def list_verifications_identity_profile( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/invoices/client.py b/src/whop_sdk/invoices/client.py index 95a452409..8b47a4746 100644 --- a/src/whop_sdk/invoices/client.py +++ b/src/whop_sdk/invoices/client.py @@ -109,7 +109,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -262,7 +262,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -340,7 +340,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -395,7 +395,7 @@ def charge( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -437,7 +437,7 @@ def generate_pdf( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -485,7 +485,7 @@ def issue( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ def mark_uncollectible(self, id: str, *, request_options: typing.Optional[Reques from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -570,7 +570,7 @@ def send( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -609,7 +609,7 @@ def unschedule(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -642,7 +642,7 @@ def void(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -741,7 +741,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -854,7 +854,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -911,7 +911,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -997,7 +997,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1060,7 +1060,7 @@ async def charge( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1112,7 +1112,7 @@ async def generate_pdf( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1168,7 +1168,7 @@ async def issue( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1211,7 +1211,7 @@ async def mark_uncollectible(self, id: str, *, request_options: typing.Optional[ from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1269,7 +1269,7 @@ async def send( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1316,7 +1316,7 @@ async def unschedule(self, id: str, *, request_options: typing.Optional[RequestO from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1357,7 +1357,7 @@ async def void(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/leads/client.py b/src/whop_sdk/leads/client.py index 5ce614dcc..a057548ff 100644 --- a/src/whop_sdk/leads/client.py +++ b/src/whop_sdk/leads/client.py @@ -93,7 +93,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -175,7 +175,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -221,7 +221,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -273,7 +273,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -455,7 +455,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -509,7 +509,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -569,7 +569,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/ledger_accounts/client.py b/src/whop_sdk/ledger_accounts/client.py index c0f027ea9..4a187313e 100644 --- a/src/whop_sdk/ledger_accounts/client.py +++ b/src/whop_sdk/ledger_accounts/client.py @@ -49,7 +49,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -104,7 +104,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/livestreams/client.py b/src/whop_sdk/livestreams/client.py index 250e0349c..0be99686f 100644 --- a/src/whop_sdk/livestreams/client.py +++ b/src/whop_sdk/livestreams/client.py @@ -76,7 +76,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -122,7 +122,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -155,7 +155,7 @@ def pin(self, id: str, *, request_options: typing.Optional[RequestOptions] = Non from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -188,7 +188,7 @@ def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -323,7 +323,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def pin(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -405,7 +405,7 @@ async def unpin(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/media/client.py b/src/whop_sdk/media/client.py index 65fdac389..81c84db3d 100644 --- a/src/whop_sdk/media/client.py +++ b/src/whop_sdk/media/client.py @@ -75,7 +75,7 @@ def generate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -117,7 +117,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -193,7 +193,7 @@ async def generate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/members/client.py b/src/whop_sdk/members/client.py index cd25889b7..1bbe458bc 100644 --- a/src/whop_sdk/members/client.py +++ b/src/whop_sdk/members/client.py @@ -145,7 +145,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -206,7 +206,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -244,7 +244,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -395,7 +395,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +465,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -511,7 +511,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/members/logs/client.py b/src/whop_sdk/members/logs/client.py index 83b35105b..e6750a15a 100644 --- a/src/whop_sdk/members/logs/client.py +++ b/src/whop_sdk/members/logs/client.py @@ -68,7 +68,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -146,7 +146,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/members/notes/client.py b/src/whop_sdk/members/notes/client.py index 4566442fa..31e5b888a 100644 --- a/src/whop_sdk/members/notes/client.py +++ b/src/whop_sdk/members/notes/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -125,7 +125,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -202,7 +202,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -261,7 +261,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/memberships/client.py b/src/whop_sdk/memberships/client.py index f12e1ac53..4f8a869a1 100644 --- a/src/whop_sdk/memberships/client.py +++ b/src/whop_sdk/memberships/client.py @@ -142,7 +142,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -206,7 +206,7 @@ def invite( from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -242,7 +242,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -300,7 +300,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -347,7 +347,7 @@ def apply_promo_code( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -406,7 +406,7 @@ def assign_affiliate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -467,7 +467,7 @@ def cancel( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -509,7 +509,7 @@ def extend(self, id: str, *, days: int, request_options: typing.Optional[Request from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -548,7 +548,7 @@ def pause( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -586,7 +586,7 @@ def reactivate( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -619,7 +619,7 @@ def resume(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -652,7 +652,7 @@ def resync_access(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -687,7 +687,7 @@ def transfer( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -821,7 +821,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -894,7 +894,7 @@ async def invite( from whop_sdk.memberships import InviteMembershipsRequestBodyUserId client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -938,7 +938,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1004,7 +1004,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1059,7 +1059,7 @@ async def apply_promo_code( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1126,7 +1126,7 @@ async def assign_affiliate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1195,7 +1195,7 @@ async def cancel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1247,7 +1247,7 @@ async def extend( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1294,7 +1294,7 @@ async def pause( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1340,7 +1340,7 @@ async def reactivate( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1381,7 +1381,7 @@ async def resume(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1422,7 +1422,7 @@ async def resync_access(self, id: str, *, request_options: typing.Optional[Reque from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1465,7 +1465,7 @@ async def transfer( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/messages/__init__.py b/src/whop_sdk/messages/__init__.py index d46ceec5f..a9fdc4b1d 100644 --- a/src/whop_sdk/messages/__init__.py +++ b/src/whop_sdk/messages/__init__.py @@ -8,9 +8,15 @@ if typing.TYPE_CHECKING: from .types import ( CreateMessagesRequestAttachmentsItem, + CreateMessagesRequestLinkPreviewsItem, CreateMessagesRequestPoll, CreateMessagesRequestPollOptionsItem, + ListMessagesRequestDirection, + ListMessagesRequestOrder, ListMessagesResponse, + ListMessagesResponsePageInfo, + ListReactionsMessagesResponse, + ListReactionsMessagesResponsePageInfo, PostChatMessageCreatedPayload, PostChatMessageCreatedPayloadApiVersion, PostChatMessageCreatedPayloadData, @@ -20,12 +26,19 @@ PostChatMessageCreatedPayloadDataChannelType, PostChatMessageCreatedPayloadType, UpdateMessagesRequestAttachmentsItem, + UpdateMessagesRequestLinkPreviewsItem, ) _dynamic_imports: typing.Dict[str, str] = { "CreateMessagesRequestAttachmentsItem": ".types", + "CreateMessagesRequestLinkPreviewsItem": ".types", "CreateMessagesRequestPoll": ".types", "CreateMessagesRequestPollOptionsItem": ".types", + "ListMessagesRequestDirection": ".types", + "ListMessagesRequestOrder": ".types", "ListMessagesResponse": ".types", + "ListMessagesResponsePageInfo": ".types", + "ListReactionsMessagesResponse": ".types", + "ListReactionsMessagesResponsePageInfo": ".types", "PostChatMessageCreatedPayload": ".types", "PostChatMessageCreatedPayloadApiVersion": ".types", "PostChatMessageCreatedPayloadData": ".types", @@ -35,6 +48,7 @@ "PostChatMessageCreatedPayloadDataChannelType": ".types", "PostChatMessageCreatedPayloadType": ".types", "UpdateMessagesRequestAttachmentsItem": ".types", + "UpdateMessagesRequestLinkPreviewsItem": ".types", } @@ -61,9 +75,15 @@ def __dir__(): __all__ = [ "CreateMessagesRequestAttachmentsItem", + "CreateMessagesRequestLinkPreviewsItem", "CreateMessagesRequestPoll", "CreateMessagesRequestPollOptionsItem", + "ListMessagesRequestDirection", + "ListMessagesRequestOrder", "ListMessagesResponse", + "ListMessagesResponsePageInfo", + "ListReactionsMessagesResponse", + "ListReactionsMessagesResponsePageInfo", "PostChatMessageCreatedPayload", "PostChatMessageCreatedPayloadApiVersion", "PostChatMessageCreatedPayloadData", @@ -73,4 +93,5 @@ def __dir__(): "PostChatMessageCreatedPayloadDataChannelType", "PostChatMessageCreatedPayloadType", "UpdateMessagesRequestAttachmentsItem", + "UpdateMessagesRequestLinkPreviewsItem", ] diff --git a/src/whop_sdk/messages/client.py b/src/whop_sdk/messages/client.py index a052426c6..5e02827aa 100644 --- a/src/whop_sdk/messages/client.py +++ b/src/whop_sdk/messages/client.py @@ -5,14 +5,18 @@ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from ..core.pagination import AsyncPager, SyncPager from ..core.request_options import RequestOptions -from ..types.direction import Direction -from ..types.message import Message -from ..types.message_list_item import MessageListItem +from ..types.chat_message import ChatMessage +from ..types.chat_reaction import ChatReaction from .raw_client import AsyncRawMessagesClient, RawMessagesClient from .types.create_messages_request_attachments_item import CreateMessagesRequestAttachmentsItem +from .types.create_messages_request_link_previews_item import CreateMessagesRequestLinkPreviewsItem from .types.create_messages_request_poll import CreateMessagesRequestPoll +from .types.list_messages_request_direction import ListMessagesRequestDirection +from .types.list_messages_request_order import ListMessagesRequestOrder from .types.list_messages_response import ListMessagesResponse +from .types.list_reactions_messages_response import ListReactionsMessagesResponse from .types.update_messages_request_attachments_item import UpdateMessagesRequestAttachmentsItem +from .types.update_messages_request_link_previews_item import UpdateMessagesRequestLinkPreviewsItem # this is used as the default value for optional parameters OMIT = typing.cast(typing.Any, ...) @@ -37,60 +41,98 @@ def list( self, *, channel_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, + replying_to_message_id: typing.Optional[str] = None, + pinned: typing.Optional[bool] = None, + include_deleted: typing.Optional[bool] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, + updated_after: typing.Optional[str] = None, + before_message_id: typing.Optional[str] = None, + after_message_id: typing.Optional[str] = None, + around_message_id: typing.Optional[str] = None, + around_timestamp: typing.Optional[str] = None, + order: typing.Optional[ListMessagesRequestOrder] = None, + direction: typing.Optional[ListMessagesRequestDirection] = None, first: typing.Optional[int] = None, + after: typing.Optional[str] = None, last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, + before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[MessageListItem, ListMessagesResponse]: + ) -> SyncPager[ChatMessage, ListMessagesResponse]: """ - Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `support_chat:read` + Lists messages in a channel. Existing public message and channel IDs are preserved. For reconnect synchronization, use inclusive updated_after with include_deleted=true; results use ascending change order. Follow the returned cursors and replace cached messages by ID, including when updated_at is unchanged. The returned updated_at is the stored message update time; reaction changes only affect synchronization ordering. Deleted entries contain identity and timestamps with their content redacted. To jump into history, specify channel_id and one around anchor; results use ascending creation-time order. For older messages in chronological order, use before_message_id with last and direction=asc; for newer messages, use after_message_id with first and direction=asc. Do not supply order or direction with updated_after or an around anchor. Keep message-ID filters when continuing with cursors. For around queries, omit the around anchor and continue with direction=asc. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to list messages for. + Filter by public channel ID. An experience ID is also accepted for experience chat. - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. + replying_to_message_id : typing.Optional[str] + Return replies to this message. - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. + pinned : typing.Optional[bool] + Filter by message pin state. + + include_deleted : typing.Optional[bool] + Include redacted deletion entries for cache synchronization. + + created_after : typing.Optional[str] + Return messages created strictly after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Return messages created strictly before this ISO 8601 timestamp. + + updated_after : typing.Optional[str] + Return messages changed at or after this ISO 8601 timestamp in ascending change order. Cannot be combined with history filters, around anchors, order, or direction. + + before_message_id : typing.Optional[str] + Filter messages strictly before this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + after_message_id : typing.Optional[str] + Filter messages strictly after this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + around_message_id : typing.Optional[str] + Center the first page around this live message in the selected channel. + + around_timestamp : typing.Optional[str] + Center the first page around this ISO 8601 timestamp in the selected channel. + + order : typing.Optional[ListMessagesRequestOrder] + History sort field. Defaults to created_at. Cannot be supplied with updated_after or around anchors. + + direction : typing.Optional[ListMessagesRequestDirection] + History sort direction. Defaults to desc. Cannot be supplied with updated_after or around anchors. first : typing.Optional[int] - Returns the first _n_ elements from the list. + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. last : typing.Optional[int] - Returns the last _n_ elements from the list. + Number of results to return from the end of the range. - direction : typing.Optional[Direction] + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - SyncPager[MessageListItem, ListMessagesResponse] - A successful response + SyncPager[ChatMessage, ListMessagesResponse] + messages listed Examples -------- from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) response = client.messages.list( - first=42, - last=42, channel_id="channel_id", ) for item in response: @@ -101,11 +143,22 @@ def list( """ return self._raw_client.list( channel_id=channel_id, - after=after, - before=before, + replying_to_message_id=replying_to_message_id, + pinned=pinned, + include_deleted=include_deleted, + created_after=created_after, + created_before=created_before, + updated_after=updated_after, + before_message_id=before_message_id, + after_message_id=after_message_id, + around_message_id=around_message_id, + around_timestamp=around_timestamp, + order=order, + direction=direction, first=first, + after=after, last=last, - direction=direction, + before=before, request_options=request_options, ) @@ -116,59 +169,56 @@ def create( content: str, attachments: typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] = OMIT, auto_detect_links: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] = OMIT, poll: typing.Optional[CreateMessagesRequestPoll] = OMIT, replying_to_message_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Message: + ) -> ChatMessage: """ - Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Sends a Markdown message as the authenticated user or app agent. Channel access, posting restrictions, moderation, and delivery follow the existing chat services. Use Idempotency-Key to safely retry a send. The response and realtime message use the same message ID. Custom author presentation and embeds are read-only. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'. + Public channel ID, or an experience ID for experience chat. content : str - The body of the message in Markdown format. For example, 'Hello **world**'. + Markdown content. May be empty when the message contains media or a poll. attachments : typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] - A list of file attachments to include with the message, such as images or videos. + Files to attach to the message. auto_detect_links : typing.Optional[bool] - Automatically detect URLs in the message and generate link previews. + Generate previews for URLs in content. Mutually exclusive with link_previews. + + link_previews : typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] + Explicit URLs for the server to preview. poll : typing.Optional[CreateMessagesRequestPoll] - A poll to attach to this message, allowing recipients to vote on options. replying_to_message_id : typing.Optional[str] - The unique identifier of the message this is replying to, creating a threaded reply. + A live message in the same channel to reply to. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message sent Examples -------- from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) client.messages.create( - channel_id="channel_id", - content="content", + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + content="New **message**", ) """ _response = self._raw_client.create( @@ -176,41 +226,36 @@ def create( content=content, attachments=attachments, auto_detect_links=auto_detect_links, + link_previews=link_previews, poll=poll, replying_to_message_id=replying_to_message_id, request_options=request_options, ) return _response.data - def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Message: + def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: """ - Retrieves the details of an existing message. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `livestream:chat:read` - - `support_chat:read` + Retrieves a live message from an accessible channel. Use list synchronization to retrieve deletion entries. Parameters ---------- id : str - The unique identifier of the message to retrieve. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message retrieved Examples -------- from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -221,35 +266,28 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] _response = self._raw_client.retrieve(id, request_options=request_options) return _response.data - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> bool: + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. - - Required permissions (one of): - - `chat:message:create` and `chat:read` - - `dms:message:manage` and `dms:read` - - `livestream:chat:write` and `livestream:chat:read` - - `support_chat:message:create` and `support_chat:read` + Deletes a message as its author or a permitted moderator. Deleted messages remain available as redacted entries through list synchronization. Parameters ---------- id : str - The unique identifier of the message to delete. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - bool - A successful response + None Examples -------- from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -266,46 +304,40 @@ def update( *, attachments: typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] = OMIT, content: typing.Optional[str] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Message: + ) -> ChatMessage: """ - Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Updates the author's message. Use the pin and unpin actions to change its pin state. Omitted fields are preserved; attachment and preview collections replace their previous values. Parameters ---------- id : str - The unique identifier of the message to update. + Existing public message ID. attachments : typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] - A replacement list of file attachments for this message, such as images or videos. + Replacement attachment list; pass an empty list to remove attachments. content : typing.Optional[str] - The updated body of the message in Markdown format. For example, 'Hello **world**'. + Replacement Markdown content. - is_pinned : typing.Optional[bool] - Whether this message should be pinned to the top of the channel. + link_previews : typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] + Replacement preview URLs; pass an empty list to remove previews. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message updated Examples -------- from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -314,8 +346,251 @@ def update( ) """ _response = self._raw_client.update( - id, attachments=attachments, content=content, is_pinned=is_pinned, request_options=request_options + id, attachments=attachments, content=content, link_previews=link_previews, request_options=request_options + ) + return _response.data + + def pin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Pins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to pin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + message pinned + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.messages.pin( + id="id", + ) + """ + _response = self._raw_client.pin(id, request_options=request_options) + return _response.data + + def react(self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Add your emoji reaction to a message. Reacting again with the same emoji changes nothing. + + Parameters + ---------- + id : str + The ID of the message to react to. + + emoji : str + A single Unicode emoji or a supported shortcode such as `:heart:`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + the message with updated reaction counts + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.messages.react( + id="id", + emoji="❤️", + ) + """ + _response = self._raw_client.react(id, emoji=emoji, request_options=request_options) + return _response.data + + def list_reactions( + self, + id: str, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + emoji: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> SyncPager[ChatReaction, ListReactionsMessagesResponse]: + """ + List who reacted to a message, newest first. Optionally filter by emoji. + + Parameters + ---------- + id : str + The ID of the message. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + emoji : typing.Optional[str] + Only return reactions with this emoji, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + SyncPager[ChatReaction, ListReactionsMessagesResponse] + operation completed + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + response = client.messages.list_reactions( + id="id", + ) + for item in response: + yield item + # alternatively, you can paginate page-by-page + for page in response.iter_pages(): + yield page + """ + return self._raw_client.list_reactions( + id, first=first, after=after, last=last, before=before, emoji=emoji, request_options=request_options ) + + def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Unpins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to unpin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + message unpinned + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.messages.unpin( + id="id", + ) + """ + _response = self._raw_client.unpin(id, request_options=request_options) + return _response.data + + def unreact(self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Remove your emoji reaction from a message. Removing a reaction you have not added changes nothing. + + Parameters + ---------- + id : str + The ID of the message to remove your reaction from. + + emoji : str + The emoji to remove, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + the message with updated reaction counts + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.messages.unreact( + id="id", + emoji="❤️", + ) + """ + _response = self._raw_client.unreact(id, emoji=emoji, request_options=request_options) + return _response.data + + def vote( + self, id: str, *, poll_option_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChatMessage: + """ + Vote for one option on a message poll. Each user can vote once per poll. + + Parameters + ---------- + id : str + The ID of the message containing the poll. + + poll_option_id : str + The option ID from the poll, not its display text. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + updated poll-containing resource + + Examples + -------- + from whop_sdk import Whop + + client = Whop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + client.messages.vote( + id="id", + poll_option_id="2", + ) + """ + _response = self._raw_client.vote(id, poll_option_id=poll_option_id, request_options=request_options) return _response.data @@ -338,47 +613,87 @@ async def list( self, *, channel_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, + replying_to_message_id: typing.Optional[str] = None, + pinned: typing.Optional[bool] = None, + include_deleted: typing.Optional[bool] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, + updated_after: typing.Optional[str] = None, + before_message_id: typing.Optional[str] = None, + after_message_id: typing.Optional[str] = None, + around_message_id: typing.Optional[str] = None, + around_timestamp: typing.Optional[str] = None, + order: typing.Optional[ListMessagesRequestOrder] = None, + direction: typing.Optional[ListMessagesRequestDirection] = None, first: typing.Optional[int] = None, + after: typing.Optional[str] = None, last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, + before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[MessageListItem, ListMessagesResponse]: + ) -> AsyncPager[ChatMessage, ListMessagesResponse]: """ - Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `support_chat:read` + Lists messages in a channel. Existing public message and channel IDs are preserved. For reconnect synchronization, use inclusive updated_after with include_deleted=true; results use ascending change order. Follow the returned cursors and replace cached messages by ID, including when updated_at is unchanged. The returned updated_at is the stored message update time; reaction changes only affect synchronization ordering. Deleted entries contain identity and timestamps with their content redacted. To jump into history, specify channel_id and one around anchor; results use ascending creation-time order. For older messages in chronological order, use before_message_id with last and direction=asc; for newer messages, use after_message_id with first and direction=asc. Do not supply order or direction with updated_after or an around anchor. Keep message-ID filters when continuing with cursors. For around queries, omit the around anchor and continue with direction=asc. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to list messages for. + Filter by public channel ID. An experience ID is also accepted for experience chat. - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. + replying_to_message_id : typing.Optional[str] + Return replies to this message. - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. + pinned : typing.Optional[bool] + Filter by message pin state. + + include_deleted : typing.Optional[bool] + Include redacted deletion entries for cache synchronization. + + created_after : typing.Optional[str] + Return messages created strictly after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Return messages created strictly before this ISO 8601 timestamp. + + updated_after : typing.Optional[str] + Return messages changed at or after this ISO 8601 timestamp in ascending change order. Cannot be combined with history filters, around anchors, order, or direction. + + before_message_id : typing.Optional[str] + Filter messages strictly before this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + after_message_id : typing.Optional[str] + Filter messages strictly after this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + around_message_id : typing.Optional[str] + Center the first page around this live message in the selected channel. + + around_timestamp : typing.Optional[str] + Center the first page around this ISO 8601 timestamp in the selected channel. + + order : typing.Optional[ListMessagesRequestOrder] + History sort field. Defaults to created_at. Cannot be supplied with updated_after or around anchors. + + direction : typing.Optional[ListMessagesRequestDirection] + History sort direction. Defaults to desc. Cannot be supplied with updated_after or around anchors. first : typing.Optional[int] - Returns the first _n_ elements from the list. + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. last : typing.Optional[int] - Returns the last _n_ elements from the list. + Number of results to return from the end of the range. - direction : typing.Optional[Direction] + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncPager[MessageListItem, ListMessagesResponse] - A successful response + AsyncPager[ChatMessage, ListMessagesResponse] + messages listed Examples -------- @@ -387,7 +702,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -395,8 +710,6 @@ async def list( async def main() -> None: response = await client.messages.list( - first=42, - last=42, channel_id="channel_id", ) async for item in response: @@ -411,11 +724,22 @@ async def main() -> None: """ return await self._raw_client.list( channel_id=channel_id, - after=after, - before=before, + replying_to_message_id=replying_to_message_id, + pinned=pinned, + include_deleted=include_deleted, + created_after=created_after, + created_before=created_before, + updated_after=updated_after, + before_message_id=before_message_id, + after_message_id=after_message_id, + around_message_id=around_message_id, + around_timestamp=around_timestamp, + order=order, + direction=direction, first=first, + after=after, last=last, - direction=direction, + before=before, request_options=request_options, ) @@ -426,46 +750,43 @@ async def create( content: str, attachments: typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] = OMIT, auto_detect_links: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] = OMIT, poll: typing.Optional[CreateMessagesRequestPoll] = OMIT, replying_to_message_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Message: + ) -> ChatMessage: """ - Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Sends a Markdown message as the authenticated user or app agent. Channel access, posting restrictions, moderation, and delivery follow the existing chat services. Use Idempotency-Key to safely retry a send. The response and realtime message use the same message ID. Custom author presentation and embeds are read-only. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'. + Public channel ID, or an experience ID for experience chat. content : str - The body of the message in Markdown format. For example, 'Hello **world**'. + Markdown content. May be empty when the message contains media or a poll. attachments : typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] - A list of file attachments to include with the message, such as images or videos. + Files to attach to the message. auto_detect_links : typing.Optional[bool] - Automatically detect URLs in the message and generate link previews. + Generate previews for URLs in content. Mutually exclusive with link_previews. + + link_previews : typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] + Explicit URLs for the server to preview. poll : typing.Optional[CreateMessagesRequestPoll] - A poll to attach to this message, allowing recipients to vote on options. replying_to_message_id : typing.Optional[str] - The unique identifier of the message this is replying to, creating a threaded reply. + A live message in the same channel to reply to. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message sent Examples -------- @@ -474,7 +795,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -482,8 +803,8 @@ async def create( async def main() -> None: await client.messages.create( - channel_id="channel_id", - content="content", + channel_id="feed_xxxxxxxxxxxxxxxxxxxxxx", + content="New **message**", ) @@ -494,34 +815,29 @@ async def main() -> None: content=content, attachments=attachments, auto_detect_links=auto_detect_links, + link_previews=link_previews, poll=poll, replying_to_message_id=replying_to_message_id, request_options=request_options, ) return _response.data - async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Message: + async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: """ - Retrieves the details of an existing message. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `livestream:chat:read` - - `support_chat:read` + Retrieves a live message from an accessible channel. Use list synchronization to retrieve deletion entries. Parameters ---------- id : str - The unique identifier of the message to retrieve. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message retrieved Examples -------- @@ -530,7 +846,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -547,28 +863,21 @@ async def main() -> None: _response = await self._raw_client.retrieve(id, request_options=request_options) return _response.data - async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> bool: + async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None: """ - Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. - - Required permissions (one of): - - `chat:message:create` and `chat:read` - - `dms:message:manage` and `dms:read` - - `livestream:chat:write` and `livestream:chat:read` - - `support_chat:message:create` and `support_chat:read` + Deletes a message as its author or a permitted moderator. Deleted messages remain available as redacted entries through list synchronization. Parameters ---------- id : str - The unique identifier of the message to delete. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - bool - A successful response + None Examples -------- @@ -577,7 +886,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -600,39 +909,33 @@ async def update( *, attachments: typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] = OMIT, content: typing.Optional[str] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> Message: + ) -> ChatMessage: """ - Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Updates the author's message. Use the pin and unpin actions to change its pin state. Omitted fields are preserved; attachment and preview collections replace their previous values. Parameters ---------- id : str - The unique identifier of the message to update. + Existing public message ID. attachments : typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] - A replacement list of file attachments for this message, such as images or videos. + Replacement attachment list; pass an empty list to remove attachments. content : typing.Optional[str] - The updated body of the message in Markdown format. For example, 'Hello **world**'. + Replacement Markdown content. - is_pinned : typing.Optional[bool] - Whether this message should be pinned to the top of the channel. + link_previews : typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] + Replacement preview URLs; pass an empty list to remove previews. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - Message - A successful response + ChatMessage + message updated Examples -------- @@ -641,7 +944,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -656,6 +959,302 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.update( - id, attachments=attachments, content=content, is_pinned=is_pinned, request_options=request_options + id, attachments=attachments, content=content, link_previews=link_previews, request_options=request_options + ) + return _response.data + + async def pin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Pins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to pin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + message pinned + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.messages.pin( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.pin(id, request_options=request_options) + return _response.data + + async def react( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChatMessage: + """ + Add your emoji reaction to a message. Reacting again with the same emoji changes nothing. + + Parameters + ---------- + id : str + The ID of the message to react to. + + emoji : str + A single Unicode emoji or a supported shortcode such as `:heart:`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + the message with updated reaction counts + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.messages.react( + id="id", + emoji="❤️", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.react(id, emoji=emoji, request_options=request_options) + return _response.data + + async def list_reactions( + self, + id: str, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + emoji: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChatReaction, ListReactionsMessagesResponse]: + """ + List who reacted to a message, newest first. Optionally filter by emoji. + + Parameters + ---------- + id : str + The ID of the message. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + emoji : typing.Optional[str] + Only return reactions with this emoji, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChatReaction, ListReactionsMessagesResponse] + operation completed + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", ) + + + async def main() -> None: + response = await client.messages.list_reactions( + id="id", + ) + async for item in response: + yield item + + # alternatively, you can paginate page-by-page + async for page in response.iter_pages(): + yield page + + + asyncio.run(main()) + """ + return await self._raw_client.list_reactions( + id, first=first, after=after, last=last, before=before, emoji=emoji, request_options=request_options + ) + + async def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ChatMessage: + """ + Unpins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to unpin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + message unpinned + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.messages.unpin( + id="id", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.unpin(id, request_options=request_options) + return _response.data + + async def unreact( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChatMessage: + """ + Remove your emoji reaction from a message. Removing a reaction you have not added changes nothing. + + Parameters + ---------- + id : str + The ID of the message to remove your reaction from. + + emoji : str + The emoji to remove, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + the message with updated reaction counts + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.messages.unreact( + id="id", + emoji="❤️", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.unreact(id, emoji=emoji, request_options=request_options) + return _response.data + + async def vote( + self, id: str, *, poll_option_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> ChatMessage: + """ + Vote for one option on a message poll. Each user can vote once per poll. + + Parameters + ---------- + id : str + The ID of the message containing the poll. + + poll_option_id : str + The option ID from the poll, not its display text. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + ChatMessage + updated poll-containing resource + + Examples + -------- + import asyncio + + from whop_sdk import AsyncWhop + + client = AsyncWhop( + "2026-11-07", + idempotency_key="YOUR_IDEMPOTENCY_KEY", + token="YOUR_TOKEN", + ) + + + async def main() -> None: + await client.messages.vote( + id="id", + poll_option_id="2", + ) + + + asyncio.run(main()) + """ + _response = await self._raw_client.vote(id, poll_option_id=poll_option_id, request_options=request_options) return _response.data diff --git a/src/whop_sdk/messages/raw_client.py b/src/whop_sdk/messages/raw_client.py index 961deb266..07cd142ff 100644 --- a/src/whop_sdk/messages/raw_client.py +++ b/src/whop_sdk/messages/raw_client.py @@ -13,19 +13,21 @@ from ..core.request_options import RequestOptions from ..core.serialization import convert_and_respect_annotation_metadata from ..errors.bad_request_error import BadRequestError +from ..errors.conflict_error import ConflictError from ..errors.forbidden_error import ForbiddenError -from ..errors.internal_server_error import InternalServerError from ..errors.not_found_error import NotFoundError -from ..errors.too_many_requests_error import TooManyRequestsError from ..errors.unauthorized_error import UnauthorizedError -from ..errors.unprocessable_entity_error import UnprocessableEntityError -from ..types.direction import Direction -from ..types.message import Message -from ..types.message_list_item import MessageListItem +from ..types.chat_message import ChatMessage +from ..types.chat_reaction import ChatReaction from .types.create_messages_request_attachments_item import CreateMessagesRequestAttachmentsItem +from .types.create_messages_request_link_previews_item import CreateMessagesRequestLinkPreviewsItem from .types.create_messages_request_poll import CreateMessagesRequestPoll +from .types.list_messages_request_direction import ListMessagesRequestDirection +from .types.list_messages_request_order import ListMessagesRequestOrder from .types.list_messages_response import ListMessagesResponse +from .types.list_reactions_messages_response import ListReactionsMessagesResponse from .types.update_messages_request_attachments_item import UpdateMessagesRequestAttachmentsItem +from .types.update_messages_request_link_previews_item import UpdateMessagesRequestLinkPreviewsItem from pydantic import ValidationError # this is used as the default value for optional parameters @@ -40,59 +42,110 @@ def list( self, *, channel_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, + replying_to_message_id: typing.Optional[str] = None, + pinned: typing.Optional[bool] = None, + include_deleted: typing.Optional[bool] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, + updated_after: typing.Optional[str] = None, + before_message_id: typing.Optional[str] = None, + after_message_id: typing.Optional[str] = None, + around_message_id: typing.Optional[str] = None, + around_timestamp: typing.Optional[str] = None, + order: typing.Optional[ListMessagesRequestOrder] = None, + direction: typing.Optional[ListMessagesRequestDirection] = None, first: typing.Optional[int] = None, + after: typing.Optional[str] = None, last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, + before: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> SyncPager[MessageListItem, ListMessagesResponse]: + ) -> SyncPager[ChatMessage, ListMessagesResponse]: """ - Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `support_chat:read` + Lists messages in a channel. Existing public message and channel IDs are preserved. For reconnect synchronization, use inclusive updated_after with include_deleted=true; results use ascending change order. Follow the returned cursors and replace cached messages by ID, including when updated_at is unchanged. The returned updated_at is the stored message update time; reaction changes only affect synchronization ordering. Deleted entries contain identity and timestamps with their content redacted. To jump into history, specify channel_id and one around anchor; results use ascending creation-time order. For older messages in chronological order, use before_message_id with last and direction=asc; for newer messages, use after_message_id with first and direction=asc. Do not supply order or direction with updated_after or an around anchor. Keep message-ID filters when continuing with cursors. For around queries, omit the around anchor and continue with direction=asc. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to list messages for. + Filter by public channel ID. An experience ID is also accepted for experience chat. - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. + replying_to_message_id : typing.Optional[str] + Return replies to this message. - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. + pinned : typing.Optional[bool] + Filter by message pin state. + + include_deleted : typing.Optional[bool] + Include redacted deletion entries for cache synchronization. + + created_after : typing.Optional[str] + Return messages created strictly after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Return messages created strictly before this ISO 8601 timestamp. + + updated_after : typing.Optional[str] + Return messages changed at or after this ISO 8601 timestamp in ascending change order. Cannot be combined with history filters, around anchors, order, or direction. + + before_message_id : typing.Optional[str] + Filter messages strictly before this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + after_message_id : typing.Optional[str] + Filter messages strictly after this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + around_message_id : typing.Optional[str] + Center the first page around this live message in the selected channel. + + around_timestamp : typing.Optional[str] + Center the first page around this ISO 8601 timestamp in the selected channel. + + order : typing.Optional[ListMessagesRequestOrder] + History sort field. Defaults to created_at. Cannot be supplied with updated_after or around anchors. + + direction : typing.Optional[ListMessagesRequestDirection] + History sort direction. Defaults to desc. Cannot be supplied with updated_after or around anchors. first : typing.Optional[int] - Returns the first _n_ elements from the list. + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. last : typing.Optional[int] - Returns the last _n_ elements from the list. + Number of results to return from the end of the range. - direction : typing.Optional[Direction] + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - SyncPager[MessageListItem, ListMessagesResponse] - A successful response + SyncPager[ChatMessage, ListMessagesResponse] + messages listed """ _response = self._client_wrapper.httpx_client.request( "messages", base_url=self._client_wrapper.get_environment().api, method="GET", params={ - "after": after, - "before": before, - "first": first, - "last": last, "channel_id": channel_id, + "replying_to_message_id": replying_to_message_id, + "pinned": pinned, + "include_deleted": include_deleted, + "created_after": created_after, + "created_before": created_before, + "updated_after": updated_after, + "before_message_id": before_message_id, + "after_message_id": after_message_id, + "around_message_id": around_message_id, + "around_timestamp": around_timestamp, + "order": order, "direction": direction, + "first": first, + "after": after, + "last": last, + "before": before, }, request_options=request_options, ) @@ -113,11 +166,22 @@ def list( _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( channel_id=channel_id, - after=_parsed_next, - before=before, + replying_to_message_id=replying_to_message_id, + pinned=pinned, + include_deleted=include_deleted, + created_after=created_after, + created_before=created_before, + updated_after=updated_after, + before_message_id=before_message_id, + after_message_id=after_message_id, + around_message_id=around_message_id, + around_timestamp=around_timestamp, + order=order, + direction=direction, first=first, + after=_parsed_next, last=last, - direction=direction, + before=before, request_options=request_options, ) return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) @@ -165,39 +229,6 @@ def list( ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -214,46 +245,43 @@ def create( content: str, attachments: typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] = OMIT, auto_detect_links: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] = OMIT, poll: typing.Optional[CreateMessagesRequestPoll] = OMIT, replying_to_message_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[Message]: + ) -> HttpResponse[ChatMessage]: """ - Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Sends a Markdown message as the authenticated user or app agent. Channel access, posting restrictions, moderation, and delivery follow the existing chat services. Use Idempotency-Key to safely retry a send. The response and realtime message use the same message ID. Custom author presentation and embeds are read-only. Parameters ---------- channel_id : str - The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'. + Public channel ID, or an experience ID for experience chat. content : str - The body of the message in Markdown format. For example, 'Hello **world**'. + Markdown content. May be empty when the message contains media or a poll. attachments : typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] - A list of file attachments to include with the message, such as images or videos. + Files to attach to the message. auto_detect_links : typing.Optional[bool] - Automatically detect URLs in the message and generate link previews. + Generate previews for URLs in content. Mutually exclusive with link_previews. + + link_previews : typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] + Explicit URLs for the server to preview. poll : typing.Optional[CreateMessagesRequestPoll] - A poll to attach to this message, allowing recipients to vote on options. replying_to_message_id : typing.Optional[str] - The unique identifier of the message this is replying to, creating a threaded reply. + A live message in the same channel to reply to. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[Message] - A successful response + HttpResponse[ChatMessage] + message sent """ _response = self._client_wrapper.httpx_client.request( "messages", @@ -262,14 +290,19 @@ def create( json={ "attachments": convert_and_respect_annotation_metadata( object_=attachments, - annotation=typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]], + annotation=typing.Sequence[CreateMessagesRequestAttachmentsItem], direction="write", ), "auto_detect_links": auto_detect_links, "channel_id": channel_id, "content": content, + "link_previews": convert_and_respect_annotation_metadata( + object_=link_previews, + annotation=typing.Sequence[CreateMessagesRequestLinkPreviewsItem], + direction="write", + ), "poll": convert_and_respect_annotation_metadata( - object_=poll, annotation=typing.Optional[CreateMessagesRequestPoll], direction="write" + object_=poll, annotation=CreateMessagesRequestPoll, direction="write" ), "replying_to_message_id": replying_to_message_id, }, @@ -282,9 +315,9 @@ def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) @@ -300,17 +333,6 @@ def create( ), ), ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) if _response.status_code == 403: raise ForbiddenError( headers=dict(_response.headers), @@ -322,41 +344,8 @@ def create( ), ), ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -375,28 +364,24 @@ def create( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[Message]: + def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChatMessage]: """ - Retrieves the details of an existing message. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `livestream:chat:read` - - `support_chat:read` + Retrieves a live message from an accessible channel. Use list synchronization to retrieve deletion entries. Parameters ---------- id : str - The unique identifier of the message to retrieve. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[Message] - A successful response + HttpResponse[ChatMessage] + message retrieved """ _response = self._client_wrapper.httpx_client.request( f"messages/{encode_path_param(id)}", @@ -407,46 +392,13 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) if _response.status_code == 404: raise NotFoundError( headers=dict(_response.headers), @@ -458,39 +410,6 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -500,28 +419,21 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[bool]: + def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[None]: """ - Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. - - Required permissions (one of): - - `chat:message:create` and `chat:read` - - `dms:message:manage` and `dms:read` - - `livestream:chat:write` and `livestream:chat:read` - - `support_chat:message:create` and `support_chat:read` + Deletes a message as its author or a permitted moderator. Deleted messages remain available as redacted entries through list synchronization. Parameters ---------- id : str - The unique identifier of the message to delete. + Existing public message ID. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[bool] - A successful response + HttpResponse[None] """ _response = self._client_wrapper.httpx_client.request( f"messages/{encode_path_param(id)}", @@ -531,36 +443,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = ) try: if 200 <= _response.status_code < 300: - _data = typing.cast( - bool, - parse_obj_as( - type_=bool, # type: ignore - object_=_response.json(), - ), - ) - return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) + return HttpResponse(response=_response, data=None) if _response.status_code == 403: raise ForbiddenError( headers=dict(_response.headers), @@ -572,50 +455,6 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = ), ), ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -631,39 +470,33 @@ def update( *, attachments: typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] = OMIT, content: typing.Optional[str] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> HttpResponse[Message]: + ) -> HttpResponse[ChatMessage]: """ - Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Updates the author's message. Use the pin and unpin actions to change its pin state. Omitted fields are preserved; attachment and preview collections replace their previous values. Parameters ---------- id : str - The unique identifier of the message to update. + Existing public message ID. attachments : typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] - A replacement list of file attachments for this message, such as images or videos. + Replacement attachment list; pass an empty list to remove attachments. content : typing.Optional[str] - The updated body of the message in Markdown format. For example, 'Hello **world**'. + Replacement Markdown content. - is_pinned : typing.Optional[bool] - Whether this message should be pinned to the top of the channel. + link_previews : typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] + Replacement preview URLs; pass an empty list to remove previews. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - HttpResponse[Message] - A successful response + HttpResponse[ChatMessage] + message updated """ _response = self._client_wrapper.httpx_client.request( f"messages/{encode_path_param(id)}", @@ -672,11 +505,15 @@ def update( json={ "attachments": convert_and_respect_annotation_metadata( object_=attachments, - annotation=typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]], + annotation=typing.Sequence[UpdateMessagesRequestAttachmentsItem], direction="write", ), "content": content, - "is_pinned": is_pinned, + "link_previews": convert_and_respect_annotation_metadata( + object_=link_previews, + annotation=typing.Sequence[UpdateMessagesRequestLinkPreviewsItem], + direction="write", + ), }, headers={ "content-type": "application/json", @@ -687,26 +524,15 @@ def update( try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) return HttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 401: - raise UnauthorizedError( + if _response.status_code == 403: + raise ForbiddenError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -716,8 +542,50 @@ def update( ), ), ) - if _response.status_code == 403: - raise ForbiddenError( + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def pin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[ChatMessage]: + """ + Pins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to pin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChatMessage] + message pinned + """ + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/pin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -738,8 +606,8 @@ def update( ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -749,8 +617,62 @@ def update( ), ), ) - if _response.status_code == 429: - raise TooManyRequestsError( + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def react( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChatMessage]: + """ + Add your emoji reaction to a message. Reacting again with the same emoji changes nothing. + + Parameters + ---------- + id : str + The ID of the message to react to. + + emoji : str + A single Unicode emoji or a supported shortcode such as `:heart:`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChatMessage] + the message with updated reaction counts + """ + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/react", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "emoji": emoji, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -760,8 +682,8 @@ def update( ), ), ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -780,77 +702,67 @@ def update( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - -class AsyncRawMessagesClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def list( + def list_reactions( self, + id: str, *, - channel_id: str, - after: typing.Optional[str] = None, - before: typing.Optional[str] = None, first: typing.Optional[int] = None, + after: typing.Optional[str] = None, last: typing.Optional[int] = None, - direction: typing.Optional[Direction] = None, + before: typing.Optional[str] = None, + emoji: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncPager[MessageListItem, ListMessagesResponse]: + ) -> SyncPager[ChatReaction, ListReactionsMessagesResponse]: """ - Lists messages in an experience chat, DM, or group chat channel, sorted by creation time. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `support_chat:read` + List who reacted to a message, newest first. Optionally filter by emoji. Parameters ---------- - channel_id : str - The unique identifier of the channel or experience to list messages for. - - after : typing.Optional[str] - Returns the elements in the list that come after the specified cursor. - - before : typing.Optional[str] - Returns the elements in the list that come before the specified cursor. + id : str + The ID of the message. first : typing.Optional[int] - Returns the first _n_ elements from the list. + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. last : typing.Optional[int] - Returns the last _n_ elements from the list. + Number of results to return from the end of the range. - direction : typing.Optional[Direction] + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + emoji : typing.Optional[str] + Only return reactions with this emoji, as a Unicode emoji or a supported shortcode. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncPager[MessageListItem, ListMessagesResponse] - A successful response + SyncPager[ChatReaction, ListReactionsMessagesResponse] + operation completed """ - _response = await self._client_wrapper.httpx_client.request( - "messages", + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/reactions", base_url=self._client_wrapper.get_environment().api, method="GET", params={ - "after": after, - "before": before, "first": first, + "after": after, "last": last, - "channel_id": channel_id, - "direction": direction, + "before": before, + "emoji": emoji, }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: _parsed_response = typing.cast( - ListMessagesResponse, + ListReactionsMessagesResponse, parse_obj_as( - type_=ListMessagesResponse, # type: ignore + type_=ListReactionsMessagesResponse, # type: ignore object_=_response.json(), ), ) @@ -860,30 +772,16 @@ async def list( if _parsed_response.page_info is not None: _parsed_next = _parsed_response.page_info.end_cursor _has_next = _parsed_next is not None and _parsed_next != "" - - async def _get_next(): - return await self.list( - channel_id=channel_id, - after=_parsed_next, - before=before, - first=first, - last=last, - direction=direction, - request_options=request_options, - ) - - return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) + _get_next = lambda: self.list_reactions( + id, + first=first, + after=_parsed_next, + last=last, + before=before, + emoji=emoji, + request_options=request_options, + ) + return SyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) if _response.status_code == 401: raise UnauthorizedError( headers=dict(_response.headers), @@ -895,6 +793,48 @@ async def _get_next(): ), ), ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + def unpin(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> HttpResponse[ChatMessage]: + """ + Unpins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to unpin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + HttpResponse[ChatMessage] + message unpinned + """ + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/unpin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return HttpResponse(response=_response, data=_data) if _response.status_code == 403: raise ForbiddenError( headers=dict(_response.headers), @@ -917,30 +857,8 @@ async def _get_next(): ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -959,71 +877,34 @@ async def _get_next(): ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def create( - self, - *, - channel_id: str, - content: str, - attachments: typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] = OMIT, - auto_detect_links: typing.Optional[bool] = OMIT, - poll: typing.Optional[CreateMessagesRequestPoll] = OMIT, - replying_to_message_id: typing.Optional[str] = OMIT, - request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[Message]: + def unreact( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChatMessage]: """ - Sends a message in an experience chat, DM, or group chat channel. Supports text content, attachments, polls, and replies. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Remove your emoji reaction from a message. Removing a reaction you have not added changes nothing. Parameters ---------- - channel_id : str - The unique identifier of the channel or experience to send the message in. For example, 'exp_xxxxx' or 'feed_xxxxx'. - - content : str - The body of the message in Markdown format. For example, 'Hello **world**'. - - attachments : typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] - A list of file attachments to include with the message, such as images or videos. - - auto_detect_links : typing.Optional[bool] - Automatically detect URLs in the message and generate link previews. - - poll : typing.Optional[CreateMessagesRequestPoll] - A poll to attach to this message, allowing recipients to vote on options. + id : str + The ID of the message to remove your reaction from. - replying_to_message_id : typing.Optional[str] - The unique identifier of the message this is replying to, creating a threaded reply. + emoji : str + The emoji to remove, as a Unicode emoji or a supported shortcode. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[Message] - A successful response + HttpResponse[ChatMessage] + the message with updated reaction counts """ - _response = await self._client_wrapper.httpx_client.request( - "messages", + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/unreact", base_url=self._client_wrapper.get_environment().api, method="POST", json={ - "attachments": convert_and_respect_annotation_metadata( - object_=attachments, - annotation=typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]], - direction="write", - ), - "auto_detect_links": auto_detect_links, - "channel_id": channel_id, - "content": content, - "poll": convert_and_respect_annotation_metadata( - object_=poll, annotation=typing.Optional[CreateMessagesRequestPoll], direction="write" - ), - "replying_to_message_id": replying_to_message_id, + "emoji": emoji, }, headers={ "content-type": "application/json", @@ -1034,24 +915,13 @@ async def create( try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) + return HttpResponse(response=_response, data=_data) if _response.status_code == 401: raise UnauthorizedError( headers=dict(_response.headers), @@ -1063,52 +933,8 @@ async def create( ), ), ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -1127,58 +953,51 @@ async def create( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def retrieve( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[Message]: + def vote( + self, id: str, *, poll_option_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> HttpResponse[ChatMessage]: """ - Retrieves the details of an existing message. - - Required permissions (one of): - - `chat:read` - - `dms:read` - - `livestream:chat:read` - - `support_chat:read` + Vote for one option on a message poll. Each user can vote once per poll. Parameters ---------- id : str - The unique identifier of the message to retrieve. + The ID of the message containing the poll. + + poll_option_id : str + The option ID from the poll, not its display text. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[Message] - A successful response + HttpResponse[ChatMessage] + updated poll-containing resource """ - _response = await self._client_wrapper.httpx_client.request( - f"messages/{encode_path_param(id)}", + _response = self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/vote", base_url=self._client_wrapper.get_environment().api, - method="GET", + method="POST", + json={ + "poll_option_id": poll_option_id, + }, + headers={ + "content-type": "application/json", + }, request_options=request_options, + omit=OMIT, ) try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) - return AsyncHttpResponse(response=_response, data=_data) - if _response.status_code == 400: - raise BadRequestError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) + return HttpResponse(response=_response, data=_data) if _response.status_code == 401: raise UnauthorizedError( headers=dict(_response.headers), @@ -1190,52 +1009,8 @@ async def retrieve( ), ), ) - if _response.status_code == 403: - raise ForbiddenError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 404: - raise NotFoundError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -1254,47 +1029,161 @@ async def retrieve( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def delete( - self, id: str, *, request_options: typing.Optional[RequestOptions] = None - ) -> AsyncHttpResponse[bool]: - """ - Permanently deletes a message from an experience chat, DM, or group chat channel. Only the message author or a channel admin can delete a message. - Required permissions (one of): - - `chat:message:create` and `chat:read` - - `dms:message:manage` and `dms:read` - - `livestream:chat:write` and `livestream:chat:read` - - `support_chat:message:create` and `support_chat:read` +class AsyncRawMessagesClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def list( + self, + *, + channel_id: str, + replying_to_message_id: typing.Optional[str] = None, + pinned: typing.Optional[bool] = None, + include_deleted: typing.Optional[bool] = None, + created_after: typing.Optional[str] = None, + created_before: typing.Optional[str] = None, + updated_after: typing.Optional[str] = None, + before_message_id: typing.Optional[str] = None, + after_message_id: typing.Optional[str] = None, + around_message_id: typing.Optional[str] = None, + around_timestamp: typing.Optional[str] = None, + order: typing.Optional[ListMessagesRequestOrder] = None, + direction: typing.Optional[ListMessagesRequestDirection] = None, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChatMessage, ListMessagesResponse]: + """ + Lists messages in a channel. Existing public message and channel IDs are preserved. For reconnect synchronization, use inclusive updated_after with include_deleted=true; results use ascending change order. Follow the returned cursors and replace cached messages by ID, including when updated_at is unchanged. The returned updated_at is the stored message update time; reaction changes only affect synchronization ordering. Deleted entries contain identity and timestamps with their content redacted. To jump into history, specify channel_id and one around anchor; results use ascending creation-time order. For older messages in chronological order, use before_message_id with last and direction=asc; for newer messages, use after_message_id with first and direction=asc. Do not supply order or direction with updated_after or an around anchor. Keep message-ID filters when continuing with cursors. For around queries, omit the around anchor and continue with direction=asc. Parameters ---------- - id : str - The unique identifier of the message to delete. + channel_id : str + Filter by public channel ID. An experience ID is also accepted for experience chat. + + replying_to_message_id : typing.Optional[str] + Return replies to this message. + + pinned : typing.Optional[bool] + Filter by message pin state. + + include_deleted : typing.Optional[bool] + Include redacted deletion entries for cache synchronization. + + created_after : typing.Optional[str] + Return messages created strictly after this ISO 8601 timestamp. + + created_before : typing.Optional[str] + Return messages created strictly before this ISO 8601 timestamp. + + updated_after : typing.Optional[str] + Return messages changed at or after this ISO 8601 timestamp in ascending change order. Cannot be combined with history filters, around anchors, order, or direction. + + before_message_id : typing.Optional[str] + Filter messages strictly before this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + after_message_id : typing.Optional[str] + Filter messages strictly after this message in channel_id by creation time and message ID. Deleted anchors are accepted; missing or other-channel IDs return 404. Cannot be combined with around anchors or updated_after. + + around_message_id : typing.Optional[str] + Center the first page around this live message in the selected channel. + + around_timestamp : typing.Optional[str] + Center the first page around this ISO 8601 timestamp in the selected channel. + + order : typing.Optional[ListMessagesRequestOrder] + History sort field. Defaults to created_at. Cannot be supplied with updated_after or around anchors. + + direction : typing.Optional[ListMessagesRequestDirection] + History sort direction. Defaults to desc. Cannot be supplied with updated_after or around anchors. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[bool] - A successful response + AsyncPager[ChatMessage, ListMessagesResponse] + messages listed """ _response = await self._client_wrapper.httpx_client.request( - f"messages/{encode_path_param(id)}", + "messages", base_url=self._client_wrapper.get_environment().api, - method="DELETE", + method="GET", + params={ + "channel_id": channel_id, + "replying_to_message_id": replying_to_message_id, + "pinned": pinned, + "include_deleted": include_deleted, + "created_after": created_after, + "created_before": created_before, + "updated_after": updated_after, + "before_message_id": before_message_id, + "after_message_id": after_message_id, + "around_message_id": around_message_id, + "around_timestamp": around_timestamp, + "order": order, + "direction": direction, + "first": first, + "after": after, + "last": last, + "before": before, + }, request_options=request_options, ) try: if 200 <= _response.status_code < 300: - _data = typing.cast( - bool, + _parsed_response = typing.cast( + ListMessagesResponse, parse_obj_as( - type_=bool, # type: ignore + type_=ListMessagesResponse, # type: ignore object_=_response.json(), ), ) - return AsyncHttpResponse(response=_response, data=_data) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + + async def _get_next(): + return await self.list( + channel_id=channel_id, + replying_to_message_id=replying_to_message_id, + pinned=pinned, + include_deleted=include_deleted, + created_after=created_after, + created_before=created_before, + updated_after=updated_after, + before_message_id=before_message_id, + after_message_id=after_message_id, + around_message_id=around_message_id, + around_timestamp=around_timestamp, + order=order, + direction=direction, + first=first, + after=_parsed_next, + last=last, + before=before, + request_options=request_options, + ) + + return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) if _response.status_code == 400: raise BadRequestError( headers=dict(_response.headers), @@ -1339,39 +1228,6 @@ async def delete( ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 429: - raise TooManyRequestsError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) - if _response.status_code == 500: - raise InternalServerError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) _response_json = _response.json() except JSONDecodeError: raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) @@ -1381,58 +1237,73 @@ async def delete( ) raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) - async def update( + async def create( self, - id: str, *, - attachments: typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] = OMIT, - content: typing.Optional[str] = OMIT, - is_pinned: typing.Optional[bool] = OMIT, + channel_id: str, + content: str, + attachments: typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] = OMIT, + auto_detect_links: typing.Optional[bool] = OMIT, + link_previews: typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] = OMIT, + poll: typing.Optional[CreateMessagesRequestPoll] = OMIT, + replying_to_message_id: typing.Optional[str] = OMIT, request_options: typing.Optional[RequestOptions] = None, - ) -> AsyncHttpResponse[Message]: + ) -> AsyncHttpResponse[ChatMessage]: """ - Edits the content, attachments, or pinned status of a message in an experience chat, DM, or group chat channel. - - Required permissions (one of): - - `chat:message:create` - - `dms:message:manage` - - `livestream:chat:write` - - `support_chat:message:create` + Sends a Markdown message as the authenticated user or app agent. Channel access, posting restrictions, moderation, and delivery follow the existing chat services. Use Idempotency-Key to safely retry a send. The response and realtime message use the same message ID. Custom author presentation and embeds are read-only. Parameters ---------- - id : str - The unique identifier of the message to update. + channel_id : str + Public channel ID, or an experience ID for experience chat. - attachments : typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] - A replacement list of file attachments for this message, such as images or videos. + content : str + Markdown content. May be empty when the message contains media or a poll. - content : typing.Optional[str] - The updated body of the message in Markdown format. For example, 'Hello **world**'. + attachments : typing.Optional[typing.Sequence[CreateMessagesRequestAttachmentsItem]] + Files to attach to the message. + + auto_detect_links : typing.Optional[bool] + Generate previews for URLs in content. Mutually exclusive with link_previews. - is_pinned : typing.Optional[bool] - Whether this message should be pinned to the top of the channel. + link_previews : typing.Optional[typing.Sequence[CreateMessagesRequestLinkPreviewsItem]] + Explicit URLs for the server to preview. + + poll : typing.Optional[CreateMessagesRequestPoll] + + replying_to_message_id : typing.Optional[str] + A live message in the same channel to reply to. request_options : typing.Optional[RequestOptions] Request-specific configuration. Returns ------- - AsyncHttpResponse[Message] - A successful response + AsyncHttpResponse[ChatMessage] + message sent """ _response = await self._client_wrapper.httpx_client.request( - f"messages/{encode_path_param(id)}", + "messages", base_url=self._client_wrapper.get_environment().api, - method="PATCH", + method="POST", json={ "attachments": convert_and_respect_annotation_metadata( object_=attachments, - annotation=typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]], + annotation=typing.Sequence[CreateMessagesRequestAttachmentsItem], direction="write", ), + "auto_detect_links": auto_detect_links, + "channel_id": channel_id, "content": content, - "is_pinned": is_pinned, + "link_previews": convert_and_respect_annotation_metadata( + object_=link_previews, + annotation=typing.Sequence[CreateMessagesRequestLinkPreviewsItem], + direction="write", + ), + "poll": convert_and_respect_annotation_metadata( + object_=poll, annotation=CreateMessagesRequestPoll, direction="write" + ), + "replying_to_message_id": replying_to_message_id, }, headers={ "content-type": "application/json", @@ -1443,9 +1314,9 @@ async def update( try: if 200 <= _response.status_code < 300: _data = typing.cast( - Message, + ChatMessage, parse_obj_as( - type_=Message, # type: ignore + type_=ChatMessage, # type: ignore object_=_response.json(), ), ) @@ -1461,17 +1332,6 @@ async def update( ), ), ) - if _response.status_code == 401: - raise UnauthorizedError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), - ) if _response.status_code == 403: raise ForbiddenError( headers=dict(_response.headers), @@ -1483,8 +1343,8 @@ async def update( ), ), ) - if _response.status_code == 404: - raise NotFoundError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -1494,19 +1354,660 @@ async def update( ), ), ) - if _response.status_code == 422: - raise UnprocessableEntityError( - headers=dict(_response.headers), - body=typing.cast( - typing.Any, - parse_obj_as( - type_=typing.Any, # type: ignore - object_=_response.json(), - ), - ), + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def retrieve( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Retrieves a live message from an accessible channel. Use list synchronization to retrieve deletion entries. + + Parameters + ---------- + id : str + Existing public message ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + message retrieved + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="GET", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def delete( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[None]: + """ + Deletes a message as its author or a permitted moderator. Deleted messages remain available as redacted entries through list synchronization. + + Parameters + ---------- + id : str + Existing public message ID. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[None] + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="DELETE", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + return AsyncHttpResponse(response=_response, data=None) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def update( + self, + id: str, + *, + attachments: typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] = OMIT, + content: typing.Optional[str] = OMIT, + link_previews: typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] = OMIT, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncHttpResponse[ChatMessage]: + """ + Updates the author's message. Use the pin and unpin actions to change its pin state. Omitted fields are preserved; attachment and preview collections replace their previous values. + + Parameters + ---------- + id : str + Existing public message ID. + + attachments : typing.Optional[typing.Sequence[UpdateMessagesRequestAttachmentsItem]] + Replacement attachment list; pass an empty list to remove attachments. + + content : typing.Optional[str] + Replacement Markdown content. + + link_previews : typing.Optional[typing.Sequence[UpdateMessagesRequestLinkPreviewsItem]] + Replacement preview URLs; pass an empty list to remove previews. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + message updated + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}", + base_url=self._client_wrapper.get_environment().api, + method="PATCH", + json={ + "attachments": convert_and_respect_annotation_metadata( + object_=attachments, + annotation=typing.Sequence[UpdateMessagesRequestAttachmentsItem], + direction="write", + ), + "content": content, + "link_previews": convert_and_respect_annotation_metadata( + object_=link_previews, + annotation=typing.Sequence[UpdateMessagesRequestLinkPreviewsItem], + direction="write", + ), + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def pin( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Pins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to pin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + message pinned + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/pin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def react( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Add your emoji reaction to a message. Reacting again with the same emoji changes nothing. + + Parameters + ---------- + id : str + The ID of the message to react to. + + emoji : str + A single Unicode emoji or a supported shortcode such as `:heart:`. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + the message with updated reaction counts + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/react", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "emoji": emoji, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def list_reactions( + self, + id: str, + *, + first: typing.Optional[int] = None, + after: typing.Optional[str] = None, + last: typing.Optional[int] = None, + before: typing.Optional[str] = None, + emoji: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> AsyncPager[ChatReaction, ListReactionsMessagesResponse]: + """ + List who reacted to a message, newest first. Optionally filter by emoji. + + Parameters + ---------- + id : str + The ID of the message. + + first : typing.Optional[int] + Number of results to return from the start of the range. + + after : typing.Optional[str] + Return results after this cursor. Use `page_info.end_cursor` from the previous response to fetch the next page. + + last : typing.Optional[int] + Number of results to return from the end of the range. + + before : typing.Optional[str] + Return results before this cursor. Use `page_info.start_cursor` from the previous response to fetch the previous page. + + emoji : typing.Optional[str] + Only return reactions with this emoji, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncPager[ChatReaction, ListReactionsMessagesResponse] + operation completed + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/reactions", + base_url=self._client_wrapper.get_environment().api, + method="GET", + params={ + "first": first, + "after": after, + "last": last, + "before": before, + "emoji": emoji, + }, + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _parsed_response = typing.cast( + ListReactionsMessagesResponse, + parse_obj_as( + type_=ListReactionsMessagesResponse, # type: ignore + object_=_response.json(), + ), + ) + _items = _parsed_response.data + _has_next = False + _get_next = None + if _parsed_response.page_info is not None: + _parsed_next = _parsed_response.page_info.end_cursor + _has_next = _parsed_next is not None and _parsed_next != "" + + async def _get_next(): + return await self.list_reactions( + id, + first=first, + after=_parsed_next, + last=last, + before=before, + emoji=emoji, + request_options=request_options, + ) + + return AsyncPager(has_next=_has_next, items=_items, get_next=_get_next, response=_parsed_response) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def unpin( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Unpins a message in its channel. Requires the channel's pin permission. + + Parameters + ---------- + id : str + The message to unpin. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + message unpinned + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/unpin", + base_url=self._client_wrapper.get_environment().api, + method="POST", + request_options=request_options, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 403: + raise ForbiddenError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 404: + raise NotFoundError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def unreact( + self, id: str, *, emoji: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Remove your emoji reaction from a message. Removing a reaction you have not added changes nothing. + + Parameters + ---------- + id : str + The ID of the message to remove your reaction from. + + emoji : str + The emoji to remove, as a Unicode emoji or a supported shortcode. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + the message with updated reaction counts + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/unreact", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "emoji": emoji, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), ) - if _response.status_code == 429: - raise TooManyRequestsError( + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + if _response.status_code == 409: + raise ConflictError( + headers=dict(_response.headers), + body=typing.cast( + typing.Any, + parse_obj_as( + type_=typing.Any, # type: ignore + object_=_response.json(), + ), + ), + ) + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text) + except ValidationError as e: + raise ParsingError( + status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e + ) + raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json) + + async def vote( + self, id: str, *, poll_option_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> AsyncHttpResponse[ChatMessage]: + """ + Vote for one option on a message poll. Each user can vote once per poll. + + Parameters + ---------- + id : str + The ID of the message containing the poll. + + poll_option_id : str + The option ID from the poll, not its display text. + + request_options : typing.Optional[RequestOptions] + Request-specific configuration. + + Returns + ------- + AsyncHttpResponse[ChatMessage] + updated poll-containing resource + """ + _response = await self._client_wrapper.httpx_client.request( + f"messages/{encode_path_param(id)}/vote", + base_url=self._client_wrapper.get_environment().api, + method="POST", + json={ + "poll_option_id": poll_option_id, + }, + headers={ + "content-type": "application/json", + }, + request_options=request_options, + omit=OMIT, + ) + try: + if 200 <= _response.status_code < 300: + _data = typing.cast( + ChatMessage, + parse_obj_as( + type_=ChatMessage, # type: ignore + object_=_response.json(), + ), + ) + return AsyncHttpResponse(response=_response, data=_data) + if _response.status_code == 401: + raise UnauthorizedError( headers=dict(_response.headers), body=typing.cast( typing.Any, @@ -1516,8 +2017,8 @@ async def update( ), ), ) - if _response.status_code == 500: - raise InternalServerError( + if _response.status_code == 409: + raise ConflictError( headers=dict(_response.headers), body=typing.cast( typing.Any, diff --git a/src/whop_sdk/messages/types/__init__.py b/src/whop_sdk/messages/types/__init__.py index 3af184439..1c67dbc9c 100644 --- a/src/whop_sdk/messages/types/__init__.py +++ b/src/whop_sdk/messages/types/__init__.py @@ -7,9 +7,15 @@ if typing.TYPE_CHECKING: from .create_messages_request_attachments_item import CreateMessagesRequestAttachmentsItem + from .create_messages_request_link_previews_item import CreateMessagesRequestLinkPreviewsItem from .create_messages_request_poll import CreateMessagesRequestPoll from .create_messages_request_poll_options_item import CreateMessagesRequestPollOptionsItem + from .list_messages_request_direction import ListMessagesRequestDirection + from .list_messages_request_order import ListMessagesRequestOrder from .list_messages_response import ListMessagesResponse + from .list_messages_response_page_info import ListMessagesResponsePageInfo + from .list_reactions_messages_response import ListReactionsMessagesResponse + from .list_reactions_messages_response_page_info import ListReactionsMessagesResponsePageInfo from .post_chat_message_created_payload import PostChatMessageCreatedPayload from .post_chat_message_created_payload_api_version import PostChatMessageCreatedPayloadApiVersion from .post_chat_message_created_payload_data import PostChatMessageCreatedPayloadData @@ -19,11 +25,18 @@ from .post_chat_message_created_payload_data_channel_type import PostChatMessageCreatedPayloadDataChannelType from .post_chat_message_created_payload_type import PostChatMessageCreatedPayloadType from .update_messages_request_attachments_item import UpdateMessagesRequestAttachmentsItem + from .update_messages_request_link_previews_item import UpdateMessagesRequestLinkPreviewsItem _dynamic_imports: typing.Dict[str, str] = { "CreateMessagesRequestAttachmentsItem": ".create_messages_request_attachments_item", + "CreateMessagesRequestLinkPreviewsItem": ".create_messages_request_link_previews_item", "CreateMessagesRequestPoll": ".create_messages_request_poll", "CreateMessagesRequestPollOptionsItem": ".create_messages_request_poll_options_item", + "ListMessagesRequestDirection": ".list_messages_request_direction", + "ListMessagesRequestOrder": ".list_messages_request_order", "ListMessagesResponse": ".list_messages_response", + "ListMessagesResponsePageInfo": ".list_messages_response_page_info", + "ListReactionsMessagesResponse": ".list_reactions_messages_response", + "ListReactionsMessagesResponsePageInfo": ".list_reactions_messages_response_page_info", "PostChatMessageCreatedPayload": ".post_chat_message_created_payload", "PostChatMessageCreatedPayloadApiVersion": ".post_chat_message_created_payload_api_version", "PostChatMessageCreatedPayloadData": ".post_chat_message_created_payload_data", @@ -33,6 +46,7 @@ "PostChatMessageCreatedPayloadDataChannelType": ".post_chat_message_created_payload_data_channel_type", "PostChatMessageCreatedPayloadType": ".post_chat_message_created_payload_type", "UpdateMessagesRequestAttachmentsItem": ".update_messages_request_attachments_item", + "UpdateMessagesRequestLinkPreviewsItem": ".update_messages_request_link_previews_item", } @@ -59,9 +73,15 @@ def __dir__(): __all__ = [ "CreateMessagesRequestAttachmentsItem", + "CreateMessagesRequestLinkPreviewsItem", "CreateMessagesRequestPoll", "CreateMessagesRequestPollOptionsItem", + "ListMessagesRequestDirection", + "ListMessagesRequestOrder", "ListMessagesResponse", + "ListMessagesResponsePageInfo", + "ListReactionsMessagesResponse", + "ListReactionsMessagesResponsePageInfo", "PostChatMessageCreatedPayload", "PostChatMessageCreatedPayloadApiVersion", "PostChatMessageCreatedPayloadData", @@ -71,4 +91,5 @@ def __dir__(): "PostChatMessageCreatedPayloadDataChannelType", "PostChatMessageCreatedPayloadType", "UpdateMessagesRequestAttachmentsItem", + "UpdateMessagesRequestLinkPreviewsItem", ] diff --git a/src/whop_sdk/messages/types/create_messages_request_attachments_item.py b/src/whop_sdk/messages/types/create_messages_request_attachments_item.py index 73d42fed6..9d4039233 100644 --- a/src/whop_sdk/messages/types/create_messages_request_attachments_item.py +++ b/src/whop_sdk/messages/types/create_messages_request_attachments_item.py @@ -7,13 +7,9 @@ class CreateMessagesRequestAttachmentsItem(UniversalBaseModel): - """ - Input for an attachment - """ - id: str = pydantic.Field() """ - The ID of an existing file object. + Uploaded file ID. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/messages/types/create_messages_request_link_previews_item.py b/src/whop_sdk/messages/types/create_messages_request_link_previews_item.py new file mode 100644 index 000000000..3e4dee287 --- /dev/null +++ b/src/whop_sdk/messages/types/create_messages_request_link_previews_item.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class CreateMessagesRequestLinkPreviewsItem(UniversalBaseModel): + url: str = pydantic.Field() + """ + URL to preview. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/messages/types/create_messages_request_poll.py b/src/whop_sdk/messages/types/create_messages_request_poll.py index 4fa24239a..e5540ea6f 100644 --- a/src/whop_sdk/messages/types/create_messages_request_poll.py +++ b/src/whop_sdk/messages/types/create_messages_request_poll.py @@ -8,14 +8,7 @@ class CreateMessagesRequestPoll(UniversalBaseModel): - """ - A poll to attach to this message, allowing recipients to vote on options. - """ - - options: typing.List[CreateMessagesRequestPollOptionsItem] = pydantic.Field() - """ - The options for the poll. Must have sequential IDs starting from 1 - """ + options: typing.List[CreateMessagesRequestPollOptionsItem] if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/whop_sdk/messages/types/create_messages_request_poll_options_item.py b/src/whop_sdk/messages/types/create_messages_request_poll_options_item.py index 6f67c08c0..166af6b71 100644 --- a/src/whop_sdk/messages/types/create_messages_request_poll_options_item.py +++ b/src/whop_sdk/messages/types/create_messages_request_poll_options_item.py @@ -7,19 +7,8 @@ class CreateMessagesRequestPollOptionsItem(UniversalBaseModel): - """ - Input type for a single poll option - """ - - id: str = pydantic.Field() - """ - Sequential ID for the poll option (starting from '1') - """ - - text: str = pydantic.Field() - """ - The text of the poll option - """ + id: str + text: str if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/whop_sdk/messages/types/list_messages_request_direction.py b/src/whop_sdk/messages/types/list_messages_request_direction.py new file mode 100644 index 000000000..937acac29 --- /dev/null +++ b/src/whop_sdk/messages/types/list_messages_request_direction.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListMessagesRequestDirection = typing.Union[typing.Literal["asc", "desc"], typing.Any] diff --git a/src/whop_sdk/messages/types/list_messages_request_order.py b/src/whop_sdk/messages/types/list_messages_request_order.py new file mode 100644 index 000000000..61ca1d4a3 --- /dev/null +++ b/src/whop_sdk/messages/types/list_messages_request_order.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ListMessagesRequestOrder = typing.Union[typing.Literal["created_at", "updated_at"], typing.Any] diff --git a/src/whop_sdk/messages/types/list_messages_response.py b/src/whop_sdk/messages/types/list_messages_response.py index 29078387f..62a6e9f40 100644 --- a/src/whop_sdk/messages/types/list_messages_response.py +++ b/src/whop_sdk/messages/types/list_messages_response.py @@ -4,24 +4,13 @@ import pydantic from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel -from ...types.message_list_item import MessageListItem -from ...types.page_info import PageInfo +from ...types.chat_message import ChatMessage +from .list_messages_response_page_info import ListMessagesResponsePageInfo class ListMessagesResponse(UniversalBaseModel): - """ - The connection type for DmsPost. - """ - - data: typing.List[MessageListItem] = pydantic.Field() - """ - A list of nodes. - """ - - page_info: PageInfo = pydantic.Field() - """ - Information to aid in pagination. - """ + data: typing.List[ChatMessage] + page_info: ListMessagesResponsePageInfo if IS_PYDANTIC_V2: model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 diff --git a/src/whop_sdk/messages/types/list_messages_response_page_info.py b/src/whop_sdk/messages/types/list_messages_response_page_info.py new file mode 100644 index 000000000..55ff3c61e --- /dev/null +++ b/src/whop_sdk/messages/types/list_messages_response_page_info.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ListMessagesResponsePageInfo(UniversalBaseModel): + end_cursor: typing.Optional[str] = None + has_next_page: bool + has_previous_page: bool + start_cursor: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/messages/types/list_reactions_messages_response.py b/src/whop_sdk/messages/types/list_reactions_messages_response.py new file mode 100644 index 000000000..65454044c --- /dev/null +++ b/src/whop_sdk/messages/types/list_reactions_messages_response.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from ...types.chat_reaction import ChatReaction +from .list_reactions_messages_response_page_info import ListReactionsMessagesResponsePageInfo + + +class ListReactionsMessagesResponse(UniversalBaseModel): + data: typing.List[ChatReaction] + page_info: ListReactionsMessagesResponsePageInfo + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/messages/types/list_reactions_messages_response_page_info.py b/src/whop_sdk/messages/types/list_reactions_messages_response_page_info.py new file mode 100644 index 000000000..c0f51289b --- /dev/null +++ b/src/whop_sdk/messages/types/list_reactions_messages_response_page_info.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ListReactionsMessagesResponsePageInfo(UniversalBaseModel): + end_cursor: typing.Optional[str] = None + has_next_page: bool + has_previous_page: bool + start_cursor: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/messages/types/update_messages_request_attachments_item.py b/src/whop_sdk/messages/types/update_messages_request_attachments_item.py index 91cb7a15f..63b2c3f7c 100644 --- a/src/whop_sdk/messages/types/update_messages_request_attachments_item.py +++ b/src/whop_sdk/messages/types/update_messages_request_attachments_item.py @@ -7,13 +7,9 @@ class UpdateMessagesRequestAttachmentsItem(UniversalBaseModel): - """ - Input for an attachment - """ - id: str = pydantic.Field() """ - The ID of an existing file object. + Uploaded file ID. """ if IS_PYDANTIC_V2: diff --git a/src/whop_sdk/messages/types/update_messages_request_link_previews_item.py b/src/whop_sdk/messages/types/update_messages_request_link_previews_item.py new file mode 100644 index 000000000..744602b7c --- /dev/null +++ b/src/whop_sdk/messages/types/update_messages_request_link_previews_item.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class UpdateMessagesRequestLinkPreviewsItem(UniversalBaseModel): + url: str = pydantic.Field() + """ + URL to preview. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/notifications/client.py b/src/whop_sdk/notifications/client.py index 7b7f6e8b2..470568a05 100644 --- a/src/whop_sdk/notifications/client.py +++ b/src/whop_sdk/notifications/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -160,7 +160,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ def badges( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -257,7 +257,7 @@ def mark_read( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -288,7 +288,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -374,7 +374,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -459,7 +459,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ async def badges( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -572,7 +572,7 @@ async def mark_read( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -613,7 +613,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/notifications/topics/client.py b/src/whop_sdk/notifications/topics/client.py index d6be2cc50..5f17c29fb 100644 --- a/src/whop_sdk/notifications/topics/client.py +++ b/src/whop_sdk/notifications/topics/client.py @@ -61,7 +61,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -127,7 +127,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partner_referral_requests/client.py b/src/whop_sdk/partner_referral_requests/client.py index ecc88f786..10e70c6be 100644 --- a/src/whop_sdk/partner_referral_requests/client.py +++ b/src/whop_sdk/partner_referral_requests/client.py @@ -116,7 +116,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -175,7 +175,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -210,7 +210,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def accept(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -276,7 +276,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -309,7 +309,7 @@ def decline(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -421,7 +421,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -489,7 +489,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -534,7 +534,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -577,7 +577,7 @@ async def accept( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -620,7 +620,7 @@ async def cancel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -663,7 +663,7 @@ async def decline( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/businesses/client.py b/src/whop_sdk/partners/businesses/client.py index 2e6edbbd8..395af2182 100644 --- a/src/whop_sdk/partners/businesses/client.py +++ b/src/whop_sdk/partners/businesses/client.py @@ -145,7 +145,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -203,7 +203,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -253,7 +253,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -312,7 +312,7 @@ def accept_commission_advance( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -361,7 +361,7 @@ def resend_invite( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -500,7 +500,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -567,7 +567,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -625,7 +625,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -692,7 +692,7 @@ async def accept_commission_advance( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -749,7 +749,7 @@ async def resend_invite( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/businesses/earnings/client.py b/src/whop_sdk/partners/businesses/earnings/client.py index 13ffa8179..bf2444af0 100644 --- a/src/whop_sdk/partners/businesses/earnings/client.py +++ b/src/whop_sdk/partners/businesses/earnings/client.py @@ -98,7 +98,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/partners/client.py b/src/whop_sdk/partners/client.py index e43dad74c..43ed5913d 100644 --- a/src/whop_sdk/partners/client.py +++ b/src/whop_sdk/partners/client.py @@ -58,7 +58,7 @@ def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -86,7 +86,7 @@ def fee_options(self, *, request_options: typing.Optional[RequestOptions] = None from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -122,7 +122,7 @@ def leaderboard( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -202,7 +202,7 @@ def referred_users( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -260,7 +260,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -318,7 +318,7 @@ async def create(self, *, request_options: typing.Optional[RequestOptions] = Non from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -356,7 +356,7 @@ async def fee_options( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -400,7 +400,7 @@ async def leaderboard( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -488,7 +488,7 @@ async def referred_users( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -555,7 +555,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_method_domains/client.py b/src/whop_sdk/payment_method_domains/client.py index 7b54a1f32..225927944 100644 --- a/src/whop_sdk/payment_method_domains/client.py +++ b/src/whop_sdk/payment_method_domains/client.py @@ -105,7 +105,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -163,7 +163,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -196,7 +196,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -231,7 +231,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -264,7 +264,7 @@ def verify(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -364,7 +364,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -431,7 +431,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -476,7 +476,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -519,7 +519,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -560,7 +560,7 @@ async def verify(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_methods/client.py b/src/whop_sdk/payment_methods/client.py index 881c5280a..a4854f76b 100644 --- a/src/whop_sdk/payment_methods/client.py +++ b/src/whop_sdk/payment_methods/client.py @@ -124,7 +124,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -204,7 +204,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -257,7 +257,7 @@ def delete_payment_method( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -381,7 +381,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -470,7 +470,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -531,7 +531,7 @@ async def delete_payment_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_quotes/client.py b/src/whop_sdk/payment_quotes/client.py index 1ff0409b4..a4dd62dcf 100644 --- a/src/whop_sdk/payment_quotes/client.py +++ b/src/whop_sdk/payment_quotes/client.py @@ -102,7 +102,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -149,7 +149,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -249,7 +249,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -304,7 +304,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payment_rules/client.py b/src/whop_sdk/payment_rules/client.py index 2e8fd4624..daad84848 100644 --- a/src/whop_sdk/payment_rules/client.py +++ b/src/whop_sdk/payment_rules/client.py @@ -96,7 +96,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -167,7 +167,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -214,7 +214,7 @@ def list_fields(self, *, request_options: typing.Optional[RequestOptions] = None from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -245,7 +245,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -277,7 +277,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -323,7 +323,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -356,7 +356,7 @@ def activate(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ def deactivate(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -439,7 +439,7 @@ def replace( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -537,7 +537,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -617,7 +617,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -674,7 +674,7 @@ async def list_fields( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -713,7 +713,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -753,7 +753,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -807,7 +807,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -848,7 +848,7 @@ async def activate(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -889,7 +889,7 @@ async def deactivate(self, id: str, *, request_options: typing.Optional[RequestO from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -947,7 +947,7 @@ async def replace( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payments/client.py b/src/whop_sdk/payments/client.py index b321adc25..29e970989 100644 --- a/src/whop_sdk/payments/client.py +++ b/src/whop_sdk/payments/client.py @@ -248,7 +248,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -422,7 +422,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -587,7 +587,7 @@ def summary( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -648,7 +648,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -694,7 +694,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -729,7 +729,7 @@ def capture(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -764,7 +764,7 @@ def list_fees( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -797,7 +797,7 @@ def generate_pdf(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -843,7 +843,7 @@ def refund( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -878,7 +878,7 @@ def retry(self, id: str, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -911,7 +911,7 @@ def void(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -957,7 +957,7 @@ def resume( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1005,7 +1005,7 @@ def update_return_url( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1050,7 +1050,7 @@ def retrieve_status( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1276,7 +1276,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1459,7 +1459,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1632,7 +1632,7 @@ async def summary( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1701,7 +1701,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1755,7 +1755,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1798,7 +1798,7 @@ async def capture(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1841,7 +1841,7 @@ async def list_fees( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1882,7 +1882,7 @@ async def generate_pdf(self, id: str, *, request_options: typing.Optional[Reques from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1936,7 +1936,7 @@ async def refund( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1979,7 +1979,7 @@ async def retry(self, id: str, *, request_options: typing.Optional[RequestOption from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -2020,7 +2020,7 @@ async def void(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -2074,7 +2074,7 @@ async def resume( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -2130,7 +2130,7 @@ async def update_return_url( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -2183,7 +2183,7 @@ async def retrieve_status( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payments/direct/client.py b/src/whop_sdk/payments/direct/client.py index 554f70208..d84916f09 100644 --- a/src/whop_sdk/payments/direct/client.py +++ b/src/whop_sdk/payments/direct/client.py @@ -140,7 +140,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -310,7 +310,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payout_accounts/client.py b/src/whop_sdk/payout_accounts/client.py index b41c0df78..baca532ba 100644 --- a/src/whop_sdk/payout_accounts/client.py +++ b/src/whop_sdk/payout_accounts/client.py @@ -48,7 +48,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -102,7 +102,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payout_methods/client.py b/src/whop_sdk/payout_methods/client.py index 80620d808..2cd7a4423 100644 --- a/src/whop_sdk/payout_methods/client.py +++ b/src/whop_sdk/payout_methods/client.py @@ -72,7 +72,7 @@ def list_payout_method( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -118,7 +118,7 @@ def retrieve_payout_method( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -193,7 +193,7 @@ async def list_payout_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -248,7 +248,7 @@ async def retrieve_payout_method( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/client.py b/src/whop_sdk/payouts/client.py index 24cbd4b97..ff2537847 100644 --- a/src/whop_sdk/payouts/client.py +++ b/src/whop_sdk/payouts/client.py @@ -118,7 +118,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -220,7 +220,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -311,7 +311,7 @@ def create_quote( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -369,7 +369,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -417,7 +417,7 @@ def cancel( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -545,7 +545,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -656,7 +656,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -755,7 +755,7 @@ async def create_quote( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -821,7 +821,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -877,7 +877,7 @@ async def cancel( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/methods/client.py b/src/whop_sdk/payouts/methods/client.py index 23ca1b2ea..26dc0efae 100644 --- a/src/whop_sdk/payouts/methods/client.py +++ b/src/whop_sdk/payouts/methods/client.py @@ -101,7 +101,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -186,7 +186,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -230,7 +230,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -280,7 +280,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -378,7 +378,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -472,7 +472,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -526,7 +526,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -584,7 +584,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/paypal_link_sessions/client.py b/src/whop_sdk/payouts/paypal_link_sessions/client.py index 4d716b7f0..b9f0f5608 100644 --- a/src/whop_sdk/payouts/paypal_link_sessions/client.py +++ b/src/whop_sdk/payouts/paypal_link_sessions/client.py @@ -69,7 +69,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -149,7 +149,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/payouts/supported_methods/client.py b/src/whop_sdk/payouts/supported_methods/client.py index 39b04185e..6cb3396b1 100644 --- a/src/whop_sdk/payouts/supported_methods/client.py +++ b/src/whop_sdk/payouts/supported_methods/client.py @@ -97,7 +97,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -213,7 +213,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/people/client.py b/src/whop_sdk/people/client.py index abc591632..512057eb7 100644 --- a/src/whop_sdk/people/client.py +++ b/src/whop_sdk/people/client.py @@ -233,7 +233,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -327,7 +327,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -559,7 +559,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -662,7 +662,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/permissions/client.py b/src/whop_sdk/permissions/client.py index 564a245d8..ccb837ce9 100644 --- a/src/whop_sdk/permissions/client.py +++ b/src/whop_sdk/permissions/client.py @@ -54,7 +54,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -114,7 +114,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/plans/client.py b/src/whop_sdk/plans/client.py index 6b8a3aa67..ff6568404 100644 --- a/src/whop_sdk/plans/client.py +++ b/src/whop_sdk/plans/client.py @@ -109,7 +109,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -253,7 +253,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -317,7 +317,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -350,7 +350,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -478,7 +478,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -558,7 +558,7 @@ def calculate_tax( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -655,7 +655,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -808,7 +808,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -880,7 +880,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -921,7 +921,7 @@ async def delete(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1057,7 +1057,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1145,7 +1145,7 @@ async def calculate_tax( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/product_affiliates/client.py b/src/whop_sdk/product_affiliates/client.py index c180abed3..48642de91 100644 --- a/src/whop_sdk/product_affiliates/client.py +++ b/src/whop_sdk/product_affiliates/client.py @@ -90,7 +90,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -199,7 +199,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/products/client.py b/src/whop_sdk/products/client.py index ebcfe05e2..b12209a51 100644 --- a/src/whop_sdk/products/client.py +++ b/src/whop_sdk/products/client.py @@ -136,7 +136,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -275,7 +275,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -330,7 +330,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -363,7 +363,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -441,7 +441,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -487,7 +487,7 @@ def publish(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -520,7 +520,7 @@ def unpublish(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -646,7 +646,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -794,7 +794,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -857,7 +857,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -900,7 +900,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -986,7 +986,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1040,7 +1040,7 @@ async def publish(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1081,7 +1081,7 @@ async def unpublish(self, id: str, *, request_options: typing.Optional[RequestOp from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/promo_codes/client.py b/src/whop_sdk/promo_codes/client.py index 118524bc5..d08b24170 100644 --- a/src/whop_sdk/promo_codes/client.py +++ b/src/whop_sdk/promo_codes/client.py @@ -111,7 +111,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -267,7 +267,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -300,7 +300,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +333,7 @@ def activate(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -366,7 +366,7 @@ def deactivate(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -470,7 +470,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -579,7 +579,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -643,7 +643,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -686,7 +686,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -727,7 +727,7 @@ async def activate(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -768,7 +768,7 @@ async def deactivate(self, id: str, *, request_options: typing.Optional[RequestO from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/reactions/client.py b/src/whop_sdk/reactions/client.py index 0ab8d75bd..133b4c6f6 100644 --- a/src/whop_sdk/reactions/client.py +++ b/src/whop_sdk/reactions/client.py @@ -79,7 +79,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -140,7 +140,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -182,7 +182,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -376,7 +376,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -426,7 +426,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -479,7 +479,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/refunds/client.py b/src/whop_sdk/refunds/client.py index a72e4e41f..3fa6f63ea 100644 --- a/src/whop_sdk/refunds/client.py +++ b/src/whop_sdk/refunds/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -143,7 +143,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -239,7 +239,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -296,7 +296,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/resolution_center_cases/client.py b/src/whop_sdk/resolution_center_cases/client.py index 055f30981..728b2a55d 100644 --- a/src/whop_sdk/resolution_center_cases/client.py +++ b/src/whop_sdk/resolution_center_cases/client.py @@ -145,7 +145,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -305,7 +305,7 @@ def summary( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -346,7 +346,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ def accept( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -448,7 +448,7 @@ def appeal( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -497,7 +497,7 @@ def deny( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -552,7 +552,7 @@ def events( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -604,7 +604,7 @@ def reply( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -653,7 +653,7 @@ def request_info( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -688,7 +688,7 @@ def withdraw(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -805,7 +805,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -880,7 +880,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -982,7 +982,7 @@ async def summary( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1033,7 +1033,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1091,7 +1091,7 @@ async def accept( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1151,7 +1151,7 @@ async def appeal( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1208,7 +1208,7 @@ async def deny( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1273,7 +1273,7 @@ async def events( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1334,7 +1334,7 @@ async def reply( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1391,7 +1391,7 @@ async def request_info( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1436,7 +1436,7 @@ async def withdraw( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/review_reports/client.py b/src/whop_sdk/review_reports/client.py index e4a189705..0861d67b1 100644 --- a/src/whop_sdk/review_reports/client.py +++ b/src/whop_sdk/review_reports/client.py @@ -96,7 +96,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -210,7 +210,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/reviews/client.py b/src/whop_sdk/reviews/client.py index 0fe0d988b..7a7323651 100644 --- a/src/whop_sdk/reviews/client.py +++ b/src/whop_sdk/reviews/client.py @@ -105,7 +105,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -158,7 +158,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -191,7 +191,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -295,7 +295,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -357,7 +357,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -400,7 +400,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/search/client.py b/src/whop_sdk/search/client.py index 0587c6894..4a7b8974f 100644 --- a/src/whop_sdk/search/client.py +++ b/src/whop_sdk/search/client.py @@ -75,7 +75,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -163,7 +163,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/setup_intents/client.py b/src/whop_sdk/setup_intents/client.py index 044a4271c..917d4ddcb 100644 --- a/src/whop_sdk/setup_intents/client.py +++ b/src/whop_sdk/setup_intents/client.py @@ -104,7 +104,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -192,7 +192,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -237,7 +237,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -283,7 +283,7 @@ def update_return_url( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -328,7 +328,7 @@ def retrieve_status( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -432,7 +432,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -529,7 +529,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -582,7 +582,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -636,7 +636,7 @@ async def update_return_url( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -689,7 +689,7 @@ async def retrieve_status( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/setup_intents/direct/client.py b/src/whop_sdk/setup_intents/direct/client.py index 756029d51..09efa83d1 100644 --- a/src/whop_sdk/setup_intents/direct/client.py +++ b/src/whop_sdk/setup_intents/direct/client.py @@ -84,7 +84,7 @@ def create( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -189,7 +189,7 @@ async def create( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/shipments/client.py b/src/whop_sdk/shipments/client.py index e3667b364..d01c117b3 100644 --- a/src/whop_sdk/shipments/client.py +++ b/src/whop_sdk/shipments/client.py @@ -99,7 +99,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -162,7 +162,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -218,7 +218,7 @@ def lookup( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -258,7 +258,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -296,7 +296,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -393,7 +393,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -465,7 +465,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -529,7 +529,7 @@ async def lookup( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -577,7 +577,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -623,7 +623,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/social_accounts/client.py b/src/whop_sdk/social_accounts/client.py index c6af49ccb..f0207d004 100644 --- a/src/whop_sdk/social_accounts/client.py +++ b/src/whop_sdk/social_accounts/client.py @@ -110,7 +110,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ def create( from whop_sdk.social_accounts import CreateSocialAccountsRequestBody_Facebook client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -207,7 +207,7 @@ def connect( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -254,7 +254,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -296,7 +296,7 @@ def refresh( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -398,7 +398,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -458,7 +458,7 @@ async def create( from whop_sdk.social_accounts import CreateSocialAccountsRequestBody_Facebook client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -512,7 +512,7 @@ async def connect( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -567,7 +567,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -619,7 +619,7 @@ async def refresh( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/stats/client.py b/src/whop_sdk/stats/client.py index 0dac993bc..c4d8437bf 100644 --- a/src/whop_sdk/stats/client.py +++ b/src/whop_sdk/stats/client.py @@ -58,7 +58,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> Li from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -394,7 +394,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -544,7 +544,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -888,7 +888,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/stats/reports/client.py b/src/whop_sdk/stats/reports/client.py index 62b496c5b..e7462e641 100644 --- a/src/whop_sdk/stats/reports/client.py +++ b/src/whop_sdk/stats/reports/client.py @@ -42,7 +42,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> Li from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -88,7 +88,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/stats/time_series/client.py b/src/whop_sdk/stats/time_series/client.py index dcf244f02..bcdb13e52 100644 --- a/src/whop_sdk/stats/time_series/client.py +++ b/src/whop_sdk/stats/time_series/client.py @@ -49,7 +49,7 @@ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> Li from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -385,7 +385,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -516,7 +516,7 @@ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -860,7 +860,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/support_channels/client.py b/src/whop_sdk/support_channels/client.py index 8e8a98eb1..f9bf0fe28 100644 --- a/src/whop_sdk/support_channels/client.py +++ b/src/whop_sdk/support_channels/client.py @@ -111,7 +111,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -186,7 +186,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -229,7 +229,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -337,7 +337,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -421,7 +421,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -472,7 +472,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/swaps/client.py b/src/whop_sdk/swaps/client.py index e20e3b0a0..dc6d2e4fe 100644 --- a/src/whop_sdk/swaps/client.py +++ b/src/whop_sdk/swaps/client.py @@ -64,7 +64,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -132,7 +132,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -214,7 +214,7 @@ def create_quote( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -260,7 +260,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -320,7 +320,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -396,7 +396,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -486,7 +486,7 @@ async def create_quote( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -542,7 +542,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/team_members/client.py b/src/whop_sdk/team_members/client.py index dbf5eceea..f12bb36a3 100644 --- a/src/whop_sdk/team_members/client.py +++ b/src/whop_sdk/team_members/client.py @@ -130,7 +130,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -204,7 +204,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -241,7 +241,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -274,7 +274,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -316,7 +316,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -440,7 +440,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -523,7 +523,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -568,7 +568,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -611,7 +611,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -661,7 +661,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/trades/client.py b/src/whop_sdk/trades/client.py index 78fab9f6c..c6f3ff48a 100644 --- a/src/whop_sdk/trades/client.py +++ b/src/whop_sdk/trades/client.py @@ -104,7 +104,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +227,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -282,7 +282,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -315,7 +315,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -413,7 +413,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -545,7 +545,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -608,7 +608,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -649,7 +649,7 @@ async def cancel(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/trades/markets/client.py b/src/whop_sdk/trades/markets/client.py index 8340c3505..d9b1cdb52 100644 --- a/src/whop_sdk/trades/markets/client.py +++ b/src/whop_sdk/trades/markets/client.py @@ -76,7 +76,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -164,7 +164,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/transfers/client.py b/src/whop_sdk/transfers/client.py index c604f5090..ca2be765a 100644 --- a/src/whop_sdk/transfers/client.py +++ b/src/whop_sdk/transfers/client.py @@ -98,7 +98,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -147,7 +147,7 @@ def create( from whop_sdk.transfers import CreateTransfersRequestBody_Balance client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -202,7 +202,7 @@ def list_recipients( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -243,7 +243,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -335,7 +335,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -393,7 +393,7 @@ async def create( from whop_sdk.transfers import CreateTransfersRequestBody_Balance client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -456,7 +456,7 @@ async def list_recipients( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -506,7 +506,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/types/__init__.py b/src/whop_sdk/types/__init__.py index a3809847b..858a735ef 100644 --- a/src/whop_sdk/types/__init__.py +++ b/src/whop_sdk/types/__init__.py @@ -333,10 +333,28 @@ from .cashback_payout import CashbackPayout from .cashback_payout_status import CashbackPayoutStatus from .cashback_rule import CashbackRule + from .channel import Channel + from .channel_kind import ChannelKind + from .channel_list_item import ChannelListItem + from .channel_list_item_kind import ChannelListItemKind + from .channel_member import ChannelMember + from .channel_member_inbox_status import ChannelMemberInboxStatus + from .channel_member_notification_preference import ChannelMemberNotificationPreference + from .channel_moderation import ChannelModeration + from .channel_moderation_who_can_post import ChannelModerationWhoCanPost + from .channel_moderation_who_can_react import ChannelModerationWhoCanReact + from .channel_support_state import ChannelSupportState + from .channel_support_state_last_message_by import ChannelSupportStateLastMessageBy + from .channel_support_state_status import ChannelSupportStateStatus from .chat_channel import ChatChannel from .chat_channel_experience import ChatChannelExperience from .chat_channel_list_item import ChatChannelListItem from .chat_channel_list_item_experience import ChatChannelListItemExperience + from .chat_message import ChatMessage + from .chat_message_message_type import ChatMessageMessageType + from .chat_message_poll import ChatMessagePoll + from .chat_message_poll_option import ChatMessagePollOption + from .chat_reaction import ChatReaction from .checkout_configuration import CheckoutConfiguration from .checkout_configuration_currency import CheckoutConfigurationCurrency from .checkout_configuration_list_item import CheckoutConfigurationListItem @@ -530,6 +548,10 @@ from .economic_intelligence_sentiment import EconomicIntelligenceSentiment from .economic_intelligence_status import EconomicIntelligenceStatus from .email_address import EmailAddress + from .embed import Embed + from .embed_field import EmbedField + from .embed_footer import EmbedFooter + from .embed_image import EmbedImage from .embed_types import EmbedTypes from .entry import Entry from .entry_custom_field_responses_item import EntryCustomFieldResponsesItem @@ -628,6 +650,7 @@ from .funnel_step import FunnelStep from .funnel_step_result import FunnelStepResult from .future_usage_types import FutureUsageTypes + from .gif import Gif from .global_affiliate_statuses import GlobalAffiliateStatuses from .grantable_authorized_user_roles import GrantableAuthorizedUserRoles from .identity_profile import IdentityProfile @@ -813,6 +836,9 @@ from .memberships_sortable_columns import MembershipsSortableColumns from .message import Message from .message_channel_order import MessageChannelOrder + from .message_custom_author import MessageCustomAuthor + from .message_link_footer import MessageLinkFooter + from .message_link_preview import MessageLinkPreview from .message_list_item import MessageListItem from .message_list_item_poll import MessageListItemPoll from .message_list_item_poll_options_item import MessageListItemPollOptionsItem @@ -822,6 +848,8 @@ from .message_poll import MessagePoll from .message_poll_options_item import MessagePollOptionsItem from .message_poll_votes_item import MessagePollVotesItem + from .message_reaction_count import MessageReactionCount + from .message_reaction_count_kind import MessageReactionCountKind from .message_reaction_counts_item import MessageReactionCountsItem from .message_user import MessageUser from .money import Money @@ -1921,10 +1949,28 @@ "CashbackPayout": ".cashback_payout", "CashbackPayoutStatus": ".cashback_payout_status", "CashbackRule": ".cashback_rule", + "Channel": ".channel", + "ChannelKind": ".channel_kind", + "ChannelListItem": ".channel_list_item", + "ChannelListItemKind": ".channel_list_item_kind", + "ChannelMember": ".channel_member", + "ChannelMemberInboxStatus": ".channel_member_inbox_status", + "ChannelMemberNotificationPreference": ".channel_member_notification_preference", + "ChannelModeration": ".channel_moderation", + "ChannelModerationWhoCanPost": ".channel_moderation_who_can_post", + "ChannelModerationWhoCanReact": ".channel_moderation_who_can_react", + "ChannelSupportState": ".channel_support_state", + "ChannelSupportStateLastMessageBy": ".channel_support_state_last_message_by", + "ChannelSupportStateStatus": ".channel_support_state_status", "ChatChannel": ".chat_channel", "ChatChannelExperience": ".chat_channel_experience", "ChatChannelListItem": ".chat_channel_list_item", "ChatChannelListItemExperience": ".chat_channel_list_item_experience", + "ChatMessage": ".chat_message", + "ChatMessageMessageType": ".chat_message_message_type", + "ChatMessagePoll": ".chat_message_poll", + "ChatMessagePollOption": ".chat_message_poll_option", + "ChatReaction": ".chat_reaction", "CheckoutConfiguration": ".checkout_configuration", "CheckoutConfigurationCurrency": ".checkout_configuration_currency", "CheckoutConfigurationListItem": ".checkout_configuration_list_item", @@ -2106,6 +2152,10 @@ "EconomicIntelligenceSentiment": ".economic_intelligence_sentiment", "EconomicIntelligenceStatus": ".economic_intelligence_status", "EmailAddress": ".email_address", + "Embed": ".embed", + "EmbedField": ".embed_field", + "EmbedFooter": ".embed_footer", + "EmbedImage": ".embed_image", "EmbedTypes": ".embed_types", "Entry": ".entry", "EntryCustomFieldResponsesItem": ".entry_custom_field_responses_item", @@ -2202,6 +2252,7 @@ "FunnelStep": ".funnel_step", "FunnelStepResult": ".funnel_step_result", "FutureUsageTypes": ".future_usage_types", + "Gif": ".gif", "GlobalAffiliateStatuses": ".global_affiliate_statuses", "GrantableAuthorizedUserRoles": ".grantable_authorized_user_roles", "IdentityProfile": ".identity_profile", @@ -2383,6 +2434,9 @@ "MembershipsSortableColumns": ".memberships_sortable_columns", "Message": ".message", "MessageChannelOrder": ".message_channel_order", + "MessageCustomAuthor": ".message_custom_author", + "MessageLinkFooter": ".message_link_footer", + "MessageLinkPreview": ".message_link_preview", "MessageListItem": ".message_list_item", "MessageListItemPoll": ".message_list_item_poll", "MessageListItemPollOptionsItem": ".message_list_item_poll_options_item", @@ -2392,6 +2446,8 @@ "MessagePoll": ".message_poll", "MessagePollOptionsItem": ".message_poll_options_item", "MessagePollVotesItem": ".message_poll_votes_item", + "MessageReactionCount": ".message_reaction_count", + "MessageReactionCountKind": ".message_reaction_count_kind", "MessageReactionCountsItem": ".message_reaction_counts_item", "MessageUser": ".message_user", "Money": ".money", @@ -3395,10 +3451,28 @@ def __dir__(): "CashbackPayout", "CashbackPayoutStatus", "CashbackRule", + "Channel", + "ChannelKind", + "ChannelListItem", + "ChannelListItemKind", + "ChannelMember", + "ChannelMemberInboxStatus", + "ChannelMemberNotificationPreference", + "ChannelModeration", + "ChannelModerationWhoCanPost", + "ChannelModerationWhoCanReact", + "ChannelSupportState", + "ChannelSupportStateLastMessageBy", + "ChannelSupportStateStatus", "ChatChannel", "ChatChannelExperience", "ChatChannelListItem", "ChatChannelListItemExperience", + "ChatMessage", + "ChatMessageMessageType", + "ChatMessagePoll", + "ChatMessagePollOption", + "ChatReaction", "CheckoutConfiguration", "CheckoutConfigurationCurrency", "CheckoutConfigurationListItem", @@ -3580,6 +3654,10 @@ def __dir__(): "EconomicIntelligenceSentiment", "EconomicIntelligenceStatus", "EmailAddress", + "Embed", + "EmbedField", + "EmbedFooter", + "EmbedImage", "EmbedTypes", "Entry", "EntryCustomFieldResponsesItem", @@ -3676,6 +3754,7 @@ def __dir__(): "FunnelStep", "FunnelStepResult", "FutureUsageTypes", + "Gif", "GlobalAffiliateStatuses", "GrantableAuthorizedUserRoles", "IdentityProfile", @@ -3857,6 +3936,9 @@ def __dir__(): "MembershipsSortableColumns", "Message", "MessageChannelOrder", + "MessageCustomAuthor", + "MessageLinkFooter", + "MessageLinkPreview", "MessageListItem", "MessageListItemPoll", "MessageListItemPollOptionsItem", @@ -3866,6 +3948,8 @@ def __dir__(): "MessagePoll", "MessagePollOptionsItem", "MessagePollVotesItem", + "MessageReactionCount", + "MessageReactionCountKind", "MessageReactionCountsItem", "MessageUser", "Money", diff --git a/src/whop_sdk/types/api_key_api_version_date.py b/src/whop_sdk/types/api_key_api_version_date.py index 55cd97dcf..b728a1e03 100644 --- a/src/whop_sdk/types/api_key_api_version_date.py +++ b/src/whop_sdk/types/api_key_api_version_date.py @@ -98,6 +98,7 @@ "2026-11-05", "2026-11-05-1", "2026-11-06", + "2026-11-07", ], typing.Any, ] diff --git a/src/whop_sdk/types/channel.py b/src/whop_sdk/types/channel.py new file mode 100644 index 000000000..83b10547c --- /dev/null +++ b/src/whop_sdk/types/channel.py @@ -0,0 +1,60 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .channel_kind import ChannelKind +from .channel_member import ChannelMember +from .channel_moderation import ChannelModeration +from .channel_support_state import ChannelSupportState +from .file import File + + +class Channel(UniversalBaseModel): + account_id: typing.Optional[str] = None + created_at: str = pydantic.Field() + """ + Creation time as an ISO 8601 timestamp. + """ + + experience_id: typing.Optional[str] = None + icon: typing.Optional[File] = pydantic.Field(default=None) + """ + Experience logo, falling back to the app icon for community channels. Null for other channel kinds or when neither image exists. + """ + + id: str = pydantic.Field() + """ + Existing public channel ID, preserved across REST and chat clients. + """ + + kind: ChannelKind + last_message_at: typing.Optional[str] = pydantic.Field(default=None) + """ + When the channel last recorded message activity, as an ISO 8601 timestamp. Null when no message activity is recorded. + """ + + last_message_id: typing.Optional[str] = None + membership: typing.Optional[ChannelMember] = None + moderation: typing.Optional[ChannelModeration] = None + name: typing.Optional[str] = None + notifications_enabled: bool = pydantic.Field() + """ + Whether app notifications are on. Webhooks fire either way. + """ + + support: typing.Optional[ChannelSupportState] = None + updated_at: str = pydantic.Field() + """ + Last channel change as an ISO 8601 timestamp. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/channel_kind.py b/src/whop_sdk/types/channel_kind.py new file mode 100644 index 000000000..6fb8b6e53 --- /dev/null +++ b/src/whop_sdk/types/channel_kind.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelKind = typing.Union[typing.Literal["private", "community", "support"], typing.Any] diff --git a/src/whop_sdk/types/channel_list_item.py b/src/whop_sdk/types/channel_list_item.py new file mode 100644 index 000000000..4f113cffd --- /dev/null +++ b/src/whop_sdk/types/channel_list_item.py @@ -0,0 +1,67 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .channel_list_item_kind import ChannelListItemKind +from .channel_member import ChannelMember +from .channel_moderation import ChannelModeration +from .channel_support_state import ChannelSupportState +from .chat_message import ChatMessage +from .file import File + + +class ChannelListItem(UniversalBaseModel): + account_id: typing.Optional[str] = None + created_at: str = pydantic.Field() + """ + Creation time as an ISO 8601 timestamp. + """ + + experience_id: typing.Optional[str] = None + icon: typing.Optional[File] = pydantic.Field(default=None) + """ + Experience logo, falling back to the app icon for community channels. Null for other channel kinds or when neither image exists. + """ + + id: str = pydantic.Field() + """ + Existing public channel ID, preserved across REST and chat clients. + """ + + kind: ChannelListItemKind + last_message: typing.Optional[ChatMessage] = pydantic.Field(default=None) + """ + Latest visible message, or null. Present when include_last_message=true. + """ + + last_message_at: typing.Optional[str] = pydantic.Field(default=None) + """ + When the channel last recorded message activity, as an ISO 8601 timestamp. Null when no message activity is recorded. + """ + + last_message_id: typing.Optional[str] = None + members: typing.Optional[typing.List[ChannelMember]] = None + membership: typing.Optional[ChannelMember] = None + moderation: typing.Optional[ChannelModeration] = None + name: typing.Optional[str] = None + notifications_enabled: bool = pydantic.Field() + """ + Whether app notifications are on. Webhooks fire either way. + """ + + support: typing.Optional[ChannelSupportState] = None + updated_at: str = pydantic.Field() + """ + Last channel change as an ISO 8601 timestamp. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/channel_list_item_kind.py b/src/whop_sdk/types/channel_list_item_kind.py new file mode 100644 index 000000000..9a4b98a5f --- /dev/null +++ b/src/whop_sdk/types/channel_list_item_kind.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelListItemKind = typing.Union[typing.Literal["private", "community", "support"], typing.Any] diff --git a/src/whop_sdk/types/channel_member.py b/src/whop_sdk/types/channel_member.py new file mode 100644 index 000000000..4c3d9ef77 --- /dev/null +++ b/src/whop_sdk/types/channel_member.py @@ -0,0 +1,59 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .channel_member_inbox_status import ChannelMemberInboxStatus +from .channel_member_notification_preference import ChannelMemberNotificationPreference +from .user_summary import UserSummary + + +class ChannelMember(UniversalBaseModel): + channel_id: str + created_at: typing.Optional[str] = pydantic.Field(default=None) + """ + When the stored channel membership was created, as an ISO 8601 timestamp. Null for users whose access does not have a stored membership. + """ + + id: typing.Optional[str] = pydantic.Field(default=None) + """ + Stored membership ID, or null for access-derived users. + """ + + inbox_status: typing.Optional[ChannelMemberInboxStatus] = pydantic.Field(default=None) + """ + Your private-channel inbox state; null for other users or channel kinds. + """ + + last_viewed_at: typing.Optional[str] = pydantic.Field(default=None) + """ + Authorized participant read position. Community positions are visible only to the user themselves. + """ + + notification_preference: typing.Optional[ChannelMemberNotificationPreference] = None + pinned_position: typing.Optional[int] = None + unread: typing.Optional[bool] = pydantic.Field(default=None) + """ + Personal unread state; null for other users. + """ + + updated_at: typing.Optional[str] = pydantic.Field(default=None) + """ + When the stored channel membership last changed, as an ISO 8601 timestamp. Null for users whose access does not have a stored membership. + """ + + user: UserSummary + user_id: str = pydantic.Field() + """ + User ID + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/channel_member_inbox_status.py b/src/whop_sdk/types/channel_member_inbox_status.py new file mode 100644 index 000000000..c84693efb --- /dev/null +++ b/src/whop_sdk/types/channel_member_inbox_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelMemberInboxStatus = typing.Union[typing.Literal["requested", "accepted", "hidden"], typing.Any] diff --git a/src/whop_sdk/types/channel_member_notification_preference.py b/src/whop_sdk/types/channel_member_notification_preference.py new file mode 100644 index 000000000..653e60fc9 --- /dev/null +++ b/src/whop_sdk/types/channel_member_notification_preference.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelMemberNotificationPreference = typing.Union[typing.Literal["all", "mentions", "none"], typing.Any] diff --git a/src/whop_sdk/types/channel_moderation.py b/src/whop_sdk/types/channel_moderation.py new file mode 100644 index 000000000..6225a98a0 --- /dev/null +++ b/src/whop_sdk/types/channel_moderation.py @@ -0,0 +1,45 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .channel_moderation_who_can_post import ChannelModerationWhoCanPost +from .channel_moderation_who_can_react import ChannelModerationWhoCanReact + + +class ChannelModeration(UniversalBaseModel): + ban_media: bool = pydantic.Field() + """ + Prevent members from posting media. + """ + + ban_urls: bool = pydantic.Field() + """ + Prevent members from posting links. + """ + + banned_words: typing.Optional[typing.List[str]] = None + user_posts_cooldown_seconds: typing.Optional[int] = pydantic.Field(default=None) + """ + Seconds a member must wait between messages. `0` or `null` turns the cooldown off. + """ + + who_can_post: ChannelModerationWhoCanPost = pydantic.Field() + """ + Who can post messages. + """ + + who_can_react: ChannelModerationWhoCanReact = pydantic.Field() + """ + Who can react to messages. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/channel_moderation_who_can_post.py b/src/whop_sdk/types/channel_moderation_who_can_post.py new file mode 100644 index 000000000..5ac998068 --- /dev/null +++ b/src/whop_sdk/types/channel_moderation_who_can_post.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelModerationWhoCanPost = typing.Union[typing.Literal["everyone", "admins"], typing.Any] diff --git a/src/whop_sdk/types/channel_moderation_who_can_react.py b/src/whop_sdk/types/channel_moderation_who_can_react.py new file mode 100644 index 000000000..bafd11f75 --- /dev/null +++ b/src/whop_sdk/types/channel_moderation_who_can_react.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelModerationWhoCanReact = typing.Union[typing.Literal["everyone", "no_one"], typing.Any] diff --git a/src/whop_sdk/types/channel_support_state.py b/src/whop_sdk/types/channel_support_state.py new file mode 100644 index 000000000..afb2e9bc3 --- /dev/null +++ b/src/whop_sdk/types/channel_support_state.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .channel_support_state_last_message_by import ChannelSupportStateLastMessageBy +from .channel_support_state_status import ChannelSupportStateStatus + + +class ChannelSupportState(UniversalBaseModel): + awaiting_reply: bool + customer_user_id: str + last_message_by: typing.Optional[ChannelSupportStateLastMessageBy] = None + resolved_at: typing.Optional[str] = pydantic.Field(default=None) + """ + When the support conversation was resolved, as an ISO 8601 timestamp. Null while unresolved. + """ + + status: ChannelSupportStateStatus + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/channel_support_state_last_message_by.py b/src/whop_sdk/types/channel_support_state_last_message_by.py new file mode 100644 index 000000000..36613f683 --- /dev/null +++ b/src/whop_sdk/types/channel_support_state_last_message_by.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelSupportStateLastMessageBy = typing.Union[typing.Literal["customer", "support"], typing.Any] diff --git a/src/whop_sdk/types/channel_support_state_status.py b/src/whop_sdk/types/channel_support_state_status.py new file mode 100644 index 000000000..5728f92bb --- /dev/null +++ b/src/whop_sdk/types/channel_support_state_status.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChannelSupportStateStatus = typing.Union[typing.Literal["unresolved", "resolved"], typing.Any] diff --git a/src/whop_sdk/types/chat_message.py b/src/whop_sdk/types/chat_message.py new file mode 100644 index 000000000..5a44aca32 --- /dev/null +++ b/src/whop_sdk/types/chat_message.py @@ -0,0 +1,86 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .chat_message_message_type import ChatMessageMessageType +from .chat_message_poll import ChatMessagePoll +from .embed import Embed +from .file import File +from .gif import Gif +from .message_custom_author import MessageCustomAuthor +from .message_link_preview import MessageLinkPreview +from .message_reaction_count import MessageReactionCount +from .user_summary import UserSummary + + +class ChatMessage(UniversalBaseModel): + attachments: typing.List[File] + author: typing.Optional[UserSummary] = None + author_is_team_member: bool = pydantic.Field() + """ + `true` if the author is a team member of the account that owns this community channel. `false` for partners, private and support channels, and deleted messages. + """ + + author_user_id: typing.Optional[str] = None + channel_id: str + content: typing.Optional[str] = pydantic.Field(default=None) + """ + Markdown content; null for a deleted message. + """ + + created_at: str = pydantic.Field() + """ + Creation time as an ISO 8601 timestamp. + """ + + custom_author: typing.Optional[MessageCustomAuthor] = None + deleted_at: typing.Optional[str] = pydantic.Field(default=None) + """ + Deletion time, or null for a live message. + """ + + edited: bool + embeds: typing.List[Embed] + gifs: typing.List[Gif] + id: str = pydantic.Field() + """ + Existing public message ID, preserved across REST and chat clients. + """ + + link_previews: typing.List[MessageLinkPreview] + mentioned_user_ids: typing.List[str] + message_type: ChatMessageMessageType + pinned: bool + plain_content: typing.Optional[str] = pydantic.Field(default=None) + """ + Unformatted message text. null when the text is absent or the message is deleted + """ + + poll: typing.Optional[ChatMessagePoll] = None + reaction_counts: typing.List[MessageReactionCount] + replying_to_message_id: typing.Optional[str] = None + replying_to_user_id: typing.Optional[str] = pydantic.Field(default=None) + """ + User ID of the replied-to message's author, prefixed `user_`. `null` without a reply in this channel, or when either message is deleted. + """ + + updated_at: str = pydantic.Field() + """ + Last message change as an ISO 8601 timestamp. + """ + + view_count: typing.Optional[int] = pydantic.Field(default=None) + """ + Experience view count; null for DM-backed channels. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/chat_message_message_type.py b/src/whop_sdk/types/chat_message_message_type.py new file mode 100644 index 000000000..5bc3657a8 --- /dev/null +++ b/src/whop_sdk/types/chat_message_message_type.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +ChatMessageMessageType = typing.Union[typing.Literal["regular", "system", "automated"], typing.Any] diff --git a/src/whop_sdk/types/chat_message_poll.py b/src/whop_sdk/types/chat_message_poll.py new file mode 100644 index 000000000..8b4f1632c --- /dev/null +++ b/src/whop_sdk/types/chat_message_poll.py @@ -0,0 +1,20 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .chat_message_poll_option import ChatMessagePollOption + + +class ChatMessagePoll(UniversalBaseModel): + options: typing.List[ChatMessagePollOption] + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/chat_message_poll_option.py b/src/whop_sdk/types/chat_message_poll_option.py new file mode 100644 index 000000000..84f64ee05 --- /dev/null +++ b/src/whop_sdk/types/chat_message_poll_option.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class ChatMessagePollOption(UniversalBaseModel): + id: str = pydantic.Field() + """ + Option identifier within the poll. + """ + + text: str + vote_count: int + voted: bool = pydantic.Field() + """ + Whether you voted for this option. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/chat_reaction.py b/src/whop_sdk/types/chat_reaction.py new file mode 100644 index 000000000..46d21e172 --- /dev/null +++ b/src/whop_sdk/types/chat_reaction.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .user_summary import UserSummary + + +class ChatReaction(UniversalBaseModel): + created_at: str = pydantic.Field() + """ + When the user reacted, as an ISO 8601 timestamp. + """ + + emoji: str = pydantic.Field() + """ + The Unicode emoji, including any skin tone or variation selectors. + """ + + user: UserSummary = pydantic.Field() + """ + Public profile of the user who reacted. + """ + + user_id: str = pydantic.Field() + """ + ID of the user who reacted, prefixed `user_`. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/embed.py b/src/whop_sdk/types/embed.py new file mode 100644 index 000000000..eb5571e79 --- /dev/null +++ b/src/whop_sdk/types/embed.py @@ -0,0 +1,34 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .embed_field import EmbedField +from .embed_footer import EmbedFooter +from .embed_image import EmbedImage + + +class Embed(UniversalBaseModel): + color: typing.Optional[int] = None + description: typing.Optional[str] = None + fields: typing.List[EmbedField] + footer: typing.Optional[EmbedFooter] = None + image: typing.Optional[EmbedImage] = None + thumbnail: typing.Optional[EmbedImage] = None + timestamp_at: typing.Optional[str] = pydantic.Field(default=None) + """ + Time supplied by the embed author, as an ISO 8601 timestamp in UTC. Null when missing or invalid. + """ + + title: typing.Optional[str] = None + url: typing.Optional[str] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/embed_field.py b/src/whop_sdk/types/embed_field.py new file mode 100644 index 000000000..12678bc89 --- /dev/null +++ b/src/whop_sdk/types/embed_field.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class EmbedField(UniversalBaseModel): + inline: bool + name: str + value: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/embed_footer.py b/src/whop_sdk/types/embed_footer.py new file mode 100644 index 000000000..8c24754c0 --- /dev/null +++ b/src/whop_sdk/types/embed_footer.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .embed_image import EmbedImage + + +class EmbedFooter(UniversalBaseModel): + icon: typing.Optional[EmbedImage] = None + text: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/embed_image.py b/src/whop_sdk/types/embed_image.py new file mode 100644 index 000000000..8adf01fc5 --- /dev/null +++ b/src/whop_sdk/types/embed_image.py @@ -0,0 +1,22 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class EmbedImage(UniversalBaseModel): + blurhash: typing.Optional[str] = None + height: typing.Optional[int] = None + url: str + width: typing.Optional[int] = None + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/gif.py b/src/whop_sdk/types/gif.py new file mode 100644 index 000000000..7dbb62649 --- /dev/null +++ b/src/whop_sdk/types/gif.py @@ -0,0 +1,25 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class Gif(UniversalBaseModel): + height: int + original_url: str + preview_url: str + slug: str + title: str + url: str + width: int + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/message_custom_author.py b/src/whop_sdk/types/message_custom_author.py new file mode 100644 index 000000000..a7219db1b --- /dev/null +++ b/src/whop_sdk/types/message_custom_author.py @@ -0,0 +1,28 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .file import File + + +class MessageCustomAuthor(UniversalBaseModel): + display_name: typing.Optional[str] = pydantic.Field(default=None) + """ + Webhook display name, or null to use the user's name. + """ + + profile_picture: typing.Optional[File] = pydantic.Field(default=None) + """ + Webhook profile image, or null to use the user's image. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/message_link_footer.py b/src/whop_sdk/types/message_link_footer.py new file mode 100644 index 000000000..8e6eb9cd3 --- /dev/null +++ b/src/whop_sdk/types/message_link_footer.py @@ -0,0 +1,21 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel + + +class MessageLinkFooter(UniversalBaseModel): + description: typing.Optional[str] = None + icon_url: str + title: str + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/message_link_preview.py b/src/whop_sdk/types/message_link_preview.py new file mode 100644 index 000000000..a4c0156f4 --- /dev/null +++ b/src/whop_sdk/types/message_link_preview.py @@ -0,0 +1,53 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .message_link_footer import MessageLinkFooter + + +class MessageLinkPreview(UniversalBaseModel): + description: typing.Optional[str] = pydantic.Field(default=None) + """ + Page description, or null while unavailable. + """ + + favicon_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Site icon URL, or null when unavailable. + """ + + footer: typing.Optional[MessageLinkFooter] = pydantic.Field(default=None) + """ + Additional preview information, or null when unavailable. + """ + + image_url: typing.Optional[str] = pydantic.Field(default=None) + """ + Preview image URL, or null when unavailable. + """ + + processing: bool = pydantic.Field() + """ + Whether the server is still generating this preview. + """ + + title: typing.Optional[str] = pydantic.Field(default=None) + """ + Page title, or null while unavailable. + """ + + url: str = pydantic.Field() + """ + URL being previewed. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/message_reaction_count.py b/src/whop_sdk/types/message_reaction_count.py new file mode 100644 index 000000000..1a282355f --- /dev/null +++ b/src/whop_sdk/types/message_reaction_count.py @@ -0,0 +1,31 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +import pydantic +from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel +from .message_reaction_count_kind import MessageReactionCountKind + + +class MessageReactionCount(UniversalBaseModel): + kind: MessageReactionCountKind + reacted: bool = pydantic.Field() + """ + Whether you reacted with this value. + """ + + total_score: int + user_count: int + value: typing.Optional[str] = pydantic.Field(default=None) + """ + The Unicode emoji for emoji reactions; otherwise the reaction's value. + """ + + if IS_PYDANTIC_V2: + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 + else: + + class Config: + frozen = True + smart_union = True + extra = pydantic.Extra.allow diff --git a/src/whop_sdk/types/message_reaction_count_kind.py b/src/whop_sdk/types/message_reaction_count_kind.py new file mode 100644 index 000000000..f47a37f40 --- /dev/null +++ b/src/whop_sdk/types/message_reaction_count_kind.py @@ -0,0 +1,5 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +MessageReactionCountKind = typing.Union[typing.Literal["like", "view", "emoji"], typing.Any] diff --git a/src/whop_sdk/users/client.py b/src/whop_sdk/users/client.py index 1570439e3..c0319d95c 100644 --- a/src/whop_sdk/users/client.py +++ b/src/whop_sdk/users/client.py @@ -52,6 +52,7 @@ def with_raw_response(self) -> RawUsersClient: def list( self, *, + context_channel_id: typing.Optional[str] = None, query: typing.Optional[str] = None, first: typing.Optional[int] = None, after: typing.Optional[str] = None, @@ -64,6 +65,9 @@ def list( Parameters ---------- + context_channel_id : typing.Optional[str] + Prioritize people relevant to this channel for mentions. Results remain global; channel access is required. + query : typing.Optional[str] A search term to filter users by name or username. @@ -92,7 +96,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -104,7 +108,13 @@ def list( yield page """ return self._raw_client.list( - query=query, first=first, after=after, last=last, before=before, request_options=request_options + context_channel_id=context_channel_id, + query=query, + first=first, + after=after, + last=last, + before=before, + request_options=request_options, ) def me( @@ -162,7 +172,7 @@ def me( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -227,7 +237,7 @@ def update_me( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -304,7 +314,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -376,7 +386,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -424,7 +434,7 @@ def check_access( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -460,7 +470,7 @@ def recommend_actions( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -527,6 +537,7 @@ def with_raw_response(self) -> AsyncRawUsersClient: async def list( self, *, + context_channel_id: typing.Optional[str] = None, query: typing.Optional[str] = None, first: typing.Optional[int] = None, after: typing.Optional[str] = None, @@ -539,6 +550,9 @@ async def list( Parameters ---------- + context_channel_id : typing.Optional[str] + Prioritize people relevant to this channel for mentions. Results remain global; channel access is required. + query : typing.Optional[str] A search term to filter users by name or username. @@ -569,7 +583,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -588,7 +602,13 @@ async def main() -> None: asyncio.run(main()) """ return await self._raw_client.list( - query=query, first=first, after=after, last=last, before=before, request_options=request_options + context_channel_id=context_channel_id, + query=query, + first=first, + after=after, + last=last, + before=before, + request_options=request_options, ) async def me( @@ -648,7 +668,7 @@ async def me( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -721,7 +741,7 @@ async def update_me( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -806,7 +826,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -886,7 +906,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -942,7 +962,7 @@ async def check_access( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -986,7 +1006,7 @@ async def recommend_actions( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/fees/client.py b/src/whop_sdk/users/fees/client.py index e26b92db0..ea8eaa7b2 100644 --- a/src/whop_sdk/users/fees/client.py +++ b/src/whop_sdk/users/fees/client.py @@ -45,7 +45,7 @@ def retrieve(self, user_id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -96,7 +96,7 @@ async def retrieve(self, user_id: str, *, request_options: typing.Optional[Reque from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/oauth_grants/client.py b/src/whop_sdk/users/oauth_grants/client.py index 466f24ee0..005c23b0e 100644 --- a/src/whop_sdk/users/oauth_grants/client.py +++ b/src/whop_sdk/users/oauth_grants/client.py @@ -84,7 +84,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -173,7 +173,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -268,7 +268,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -366,7 +366,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/passkeys/client.py b/src/whop_sdk/users/passkeys/client.py index 2963a2cc3..2cbef70a1 100644 --- a/src/whop_sdk/users/passkeys/client.py +++ b/src/whop_sdk/users/passkeys/client.py @@ -80,7 +80,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -148,7 +148,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -202,7 +202,7 @@ def challenge( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -254,7 +254,7 @@ def delete( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -339,7 +339,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -416,7 +416,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -478,7 +478,7 @@ async def challenge( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -538,7 +538,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/client.py b/src/whop_sdk/users/preferences/client.py index b0145d993..bc4a0c4b6 100644 --- a/src/whop_sdk/users/preferences/client.py +++ b/src/whop_sdk/users/preferences/client.py @@ -51,7 +51,7 @@ def retrieve(self, *, request_options: typing.Optional[RequestOptions] = None) - from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -99,7 +99,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -161,7 +161,7 @@ async def retrieve(self, *, request_options: typing.Optional[RequestOptions] = N from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -217,7 +217,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/client.py b/src/whop_sdk/users/preferences/notifications/client.py index a989d5a47..c915f70d0 100644 --- a/src/whop_sdk/users/preferences/notifications/client.py +++ b/src/whop_sdk/users/preferences/notifications/client.py @@ -66,7 +66,7 @@ def set( ) client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -149,7 +149,7 @@ async def set( ) client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/experiences/client.py b/src/whop_sdk/users/preferences/notifications/experiences/client.py index b9b88376b..dd130cc98 100644 --- a/src/whop_sdk/users/preferences/notifications/experiences/client.py +++ b/src/whop_sdk/users/preferences/notifications/experiences/client.py @@ -56,7 +56,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -118,7 +118,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/preferences/notifications/topics/client.py b/src/whop_sdk/users/preferences/notifications/topics/client.py index 7d54adbdf..d3a9521b3 100644 --- a/src/whop_sdk/users/preferences/notifications/topics/client.py +++ b/src/whop_sdk/users/preferences/notifications/topics/client.py @@ -77,7 +77,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -168,7 +168,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/users/raw_client.py b/src/whop_sdk/users/raw_client.py index 9fe75fb69..50ad8b7e6 100644 --- a/src/whop_sdk/users/raw_client.py +++ b/src/whop_sdk/users/raw_client.py @@ -40,6 +40,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): def list( self, *, + context_channel_id: typing.Optional[str] = None, query: typing.Optional[str] = None, first: typing.Optional[int] = None, after: typing.Optional[str] = None, @@ -52,6 +53,9 @@ def list( Parameters ---------- + context_channel_id : typing.Optional[str] + Prioritize people relevant to this channel for mentions. Results remain global; channel access is required. + query : typing.Optional[str] A search term to filter users by name or username. @@ -80,6 +84,7 @@ def list( base_url=self._client_wrapper.get_environment().api, method="GET", params={ + "context_channel_id": context_channel_id, "query": query, "first": first, "after": after, @@ -104,6 +109,7 @@ def list( _parsed_next = _parsed_response.page_info.end_cursor _has_next = _parsed_next is not None and _parsed_next != "" _get_next = lambda: self.list( + context_channel_id=context_channel_id, query=query, first=first, after=_parsed_next, @@ -634,6 +640,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): async def list( self, *, + context_channel_id: typing.Optional[str] = None, query: typing.Optional[str] = None, first: typing.Optional[int] = None, after: typing.Optional[str] = None, @@ -646,6 +653,9 @@ async def list( Parameters ---------- + context_channel_id : typing.Optional[str] + Prioritize people relevant to this channel for mentions. Results remain global; channel access is required. + query : typing.Optional[str] A search term to filter users by name or username. @@ -674,6 +684,7 @@ async def list( base_url=self._client_wrapper.get_environment().api, method="GET", params={ + "context_channel_id": context_channel_id, "query": query, "first": first, "after": after, @@ -700,6 +711,7 @@ async def list( async def _get_next(): return await self.list( + context_channel_id=context_channel_id, query=query, first=first, after=_parsed_next, diff --git a/src/whop_sdk/variants/client.py b/src/whop_sdk/variants/client.py index e55bb896a..49c095be5 100644 --- a/src/whop_sdk/variants/client.py +++ b/src/whop_sdk/variants/client.py @@ -130,7 +130,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -316,7 +316,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -397,7 +397,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -439,7 +439,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -597,7 +597,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -681,7 +681,7 @@ def calculate_tax( from whop_sdk.variants import CalculateTaxVariantsRequestAddress client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -803,7 +803,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -998,7 +998,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1087,7 +1087,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1139,7 +1139,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1305,7 +1305,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1397,7 +1397,7 @@ async def calculate_tax( from whop_sdk.variants import CalculateTaxVariantsRequestAddress client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/verifications/client.py b/src/whop_sdk/verifications/client.py index 148bc276a..9a2acccda 100644 --- a/src/whop_sdk/verifications/client.py +++ b/src/whop_sdk/verifications/client.py @@ -94,7 +94,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -153,7 +153,7 @@ def create( from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -190,7 +190,7 @@ def retrieve( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def update( from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -321,7 +321,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -389,7 +389,7 @@ async def create( from whop_sdk.verifications import CreateVerificationsRequestBody_Individual client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -434,7 +434,7 @@ async def retrieve( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -484,7 +484,7 @@ async def update( from whop_sdk.verifications import UpdateVerificationsRequestBodyPersonalAddress client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/waitlist_entries/client.py b/src/whop_sdk/waitlist_entries/client.py index 08190c2ab..afb92200c 100644 --- a/src/whop_sdk/waitlist_entries/client.py +++ b/src/whop_sdk/waitlist_entries/client.py @@ -114,7 +114,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -184,7 +184,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -232,7 +232,7 @@ def approve_all( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -267,7 +267,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -300,7 +300,7 @@ def approve(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -333,7 +333,7 @@ def cancel(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -366,7 +366,7 @@ def deny(self, id: str, *, request_options: typing.Optional[RequestOptions] = No from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -474,7 +474,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -553,7 +553,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -609,7 +609,7 @@ async def approve_all( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -652,7 +652,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -693,7 +693,7 @@ async def approve(self, id: str, *, request_options: typing.Optional[RequestOpti from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -734,7 +734,7 @@ async def cancel(self, id: str, *, request_options: typing.Optional[RequestOptio from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -775,7 +775,7 @@ async def deny(self, id: str, *, request_options: typing.Optional[RequestOptions from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) diff --git a/src/whop_sdk/webhooks/client.py b/src/whop_sdk/webhooks/client.py index 756d6830a..93c793fd9 100644 --- a/src/whop_sdk/webhooks/client.py +++ b/src/whop_sdk/webhooks/client.py @@ -95,7 +95,7 @@ def list( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -169,7 +169,7 @@ def create( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -211,7 +211,7 @@ def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -244,7 +244,7 @@ def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -306,7 +306,7 @@ def update( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -385,7 +385,7 @@ def list_deliveries( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -446,7 +446,7 @@ def replay_delivery( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -507,7 +507,7 @@ def replay( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -554,7 +554,7 @@ def test( from whop_sdk import Whop client = Whop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -639,7 +639,7 @@ async def list( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -722,7 +722,7 @@ async def create( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -772,7 +772,7 @@ async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOpt from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -815,7 +815,7 @@ async def delete( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -885,7 +885,7 @@ async def update( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -972,7 +972,7 @@ async def list_deliveries( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1042,7 +1042,7 @@ async def replay_delivery( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1111,7 +1111,7 @@ async def replay( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", ) @@ -1166,7 +1166,7 @@ async def test( from whop_sdk import AsyncWhop client = AsyncWhop( - "2026-11-06", + "2026-11-07", idempotency_key="YOUR_IDEMPOTENCY_KEY", token="YOUR_TOKEN", )