(waitlist_entries)
- list_waitlist_entries - List all waitlist entries
- create_waitlist_entry - Create a waitlist entry
Retrieve a list of waitlist entries for the instance. Entries are ordered by creation date in descending order by default. Supports filtering by email address or status and pagination with limit and offset parameters.
import clerk_backend_api
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.waitlist_entries.list_waitlist_entries(limit=20, offset=10, query="<value>", status=clerk_backend_api.ListWaitlistEntriesQueryParamStatus.COMPLETED, order_by="-created_at")
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
limit |
Optional[int] | ➖ | Applies a limit to the number of results returned. Can be used for paginating the results together with offset . |
20 |
offset |
Optional[int] | ➖ | Skip the first offset results when paginating.Needs to be an integer greater or equal to zero. To be used in conjunction with limit . |
10 |
query |
Optional[str] | ➖ | Filter waitlist entries by email address | |
status |
Optional[models.ListWaitlistEntriesQueryParamStatus] | ➖ | Filter waitlist entries by their status | |
order_by |
Optional[str] | ➖ | Specify the order of results. Supported values are: - created_at - email_address - invited_at Use + for ascending or - for descending order. Defaults to -created_at . |
|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
Error Type | Status Code | Content Type |
---|---|---|
models.SDKError | 4XX, 5XX | */* |
Creates a new waitlist entry for the given email address. If the email address is already on the waitlist, no new entry will be created and the existing waitlist entry will be returned.
from clerk_backend_api import Clerk
with Clerk(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:
res = clerk.waitlist_entries.create_waitlist_entry(request={
"email_address": "[email protected]",
"notify": True,
})
assert res is not None
# Handle response
print(res)
Parameter | Type | Required | Description |
---|---|---|---|
request |
models.CreateWaitlistEntryRequestBody | ✔️ | 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.ClerkErrors | 400, 422 | application/json |
models.SDKError | 4XX, 5XX | */* |