(customer_portal.members)
- list_members - List Members
- add_member - Add Member
- update_member - Update Member
- remove_member - Remove Member
List all members of the customer's team.
Only available to owners and billing managers of team customers.
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.customer_portal.members.list_members(page=1, limit=10)
while res is not None:
# Handle items
res = res.next()| Parameter | Type | Required | Description |
|---|---|---|---|
page |
Optional[int] | ➖ | Page number, defaults to 1. |
limit |
Optional[int] | ➖ | Size of a page, defaults to 10. Maximum is 100. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.CustomerPortalMembersListMembersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Add a new member to the customer's team.
Only available to owners and billing managers of team customers.
Rules:
- Cannot add a member with the owner role (there must be exactly one owner)
- If a member with this email already exists, the existing member is returned
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.customer_portal.members.add_member(request={
"email": "Domenica.Schamberger@yahoo.com",
})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.CustomerPortalMemberCreate | ✔️ | The request object to use for the request. |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Update a member's role.
Only available to owners and billing managers of team customers.
Rules:
- Cannot modify your own role (to prevent self-demotion)
- Customer must have exactly one owner at all times
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
res = polar.customer_portal.members.update_member(id="8319ae11-ed5f-4642-81e4-4b40731df195", customer_portal_member_update={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | N/A |
customer_portal_member_update |
models.CustomerPortalMemberUpdate | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |
Remove a member from the team.
Only available to owners and billing managers of team customers.
Rules:
- Cannot remove yourself
- Cannot remove the only owner
from polar_sdk import Polar
with Polar(
access_token="<YOUR_BEARER_TOKEN_HERE>",
) as polar:
polar.customer_portal.members.remove_member(id="b61c5e87-cda5-4b14-93ee-71a695f42d9d")
# Use the SDK ...| Parameter | Type | Required | Description |
|---|---|---|---|
id |
str | ✔️ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models.HTTPValidationError | 422 | application/json |
| models.SDKError | 4XX, 5XX | */* |