Skip to content

feat: Add Waitlists methods to User Management - #1670

Draft
aksman-dev wants to merge 1 commit into
mainfrom
akshay/waitlist-api
Draft

feat: Add Waitlists methods to User Management#1670
aksman-dev wants to merge 1 commit into
mainfrom
akshay/waitlist-api

Conversation

@aksman-dev

@aksman-dev aksman-dev commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Adds SDK support for the waitlists REST API on workos.userManagement:

  • listWaitlists()GET /user_management/waitlists
  • getWaitlist(waitlistId)GET /user_management/waitlists/:id (accepts the default alias)
  • listWaitlistUsers(waitlistId, options?)GET /user_management/waitlists/:id/entries, with state and exact-email filters plus standard cursor pagination via AutoPaginatable
  • createWaitlistUser(waitlistId, payload)POST /user_management/waitlists/:id/entries with email, optional additionalFields (sent as additional_fields), and optional notify (defaults to false). Idempotent per email; 422 user_already_exists when a user with that email already exists. The default alias lazily creates the default waitlist on this write path.
  • approveWaitlistUser(waitlistUserId)POST /user_management/waitlist_entries/:id/approve
  • denyWaitlistUser(waitlistUserId)POST /user_management/waitlist_entries/:id/deny
  • Errors: 422 invalid_state for approve/deny on an entry in the wrong state, 422 invitation_email_not_sent when the approval invitation email cannot be sent
  • deleteWaitlistUser(waitlistUserId)DELETE /user_management/waitlist_entries/:id (204)

Response objects are waitlist and waitlist_user (matching the existing waitlist_user.* webhook events), deserialized to camelCase Waitlist / WaitlistUser types. waitlist_id can be absent or null on legacy entries and is normalized to waitlistId: null.

The new methods are wrapped in @oagen-ignore markers since the API endpoints are excluded from the public OpenAPI spec while incubating.

Warning

Do not merge/release until the waitlist-api feature flag reaches GA (AUTH-6723). The API returns 404 for these routes on teams without the flag, so shipping this early would expose broken methods.

Test plan

  • Unit tests with fixtures covering every method: URL/query/body serialization, camelCase deserialization, the default alias, legacy null waitlist_id, and 422 error paths (user_already_exists, invalid_state).
  • npm test (917 passed, 12 skipped), npm run lint, npm run prettier, and npm run typecheck all pass.

https://linear.app/workos/issue/AUTH-6719

Adds SDK support for the waitlists REST API: listing waitlists,
retrieving a waitlist (including the 'default' alias), listing waitlist
users with state/email filters, creating waitlist users (idempotent per
email, optional notify), and approving, denying, or deleting a waitlist
user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant