(waitlistEntries())
- list - List all waitlist entries
- create - 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.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.operations.ListWaitlistEntriesRequest;
import com.clerk.backend_api.models.operations.ListWaitlistEntriesResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
ListWaitlistEntriesRequest req = ListWaitlistEntriesRequest.builder()
.build();
ListWaitlistEntriesResponse res = sdk.waitlistEntries().list()
.request(req)
.call();
if (res.waitlistEntries().isPresent()) {
// handle response
}
}
}
ListWaitlistEntriesResponse
Error Type |
Status Code |
Content Type |
models/errors/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.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.CreateWaitlistEntryRequestBody;
import com.clerk.backend_api.models.operations.CreateWaitlistEntryResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
.build();
CreateWaitlistEntryRequestBody req = CreateWaitlistEntryRequestBody.builder()
.emailAddress("[email protected]")
.build();
CreateWaitlistEntryResponse res = sdk.waitlistEntries().create()
.request(req)
.call();
if (res.waitlistEntry().isPresent()) {
// handle response
}
}
}
CreateWaitlistEntryResponse
Error Type |
Status Code |
Content Type |
models/errors/ClerkErrors |
400, 422 |
application/json |
models/errors/SDKError |
4XX, 5XX |
*/* |