Identity & auth
WorkOS mock API
WorkOS API: user management and authentication (password + refresh), organizations and memberships, SSO code exchange, directory sync, audit logs and signed webhooks.
At a glance
- Operations
- 274
- Stateful operations
- 28
- Stateful resources
- 7
- Webhook events
- 7
- Vendor API version
- 2026-11
- Verification
- Spec-verified
How it works
Use WorkOS without calling WorkOS, Inc.
- Install the mock from the library into a workspace. It runs as a virtual service.
- Point your client's base URL at the virtual service instead of the vendor.
- Authenticate the way you already do. The mock accepts the same credential shape:
Authorization: Bearer sk_test_ExampleApiKey0123456789 State
Resources that remember
Writes persist per caller, so a create followed by a read returns what you created.
| Resource | Operations |
|---|---|
| Users | 5 |
| Authentication | 1 |
| Organizations | 5 |
| Organization memberships | 7 |
| Single sign-on | 3 |
| Directory sync | 6 |
| Audit logs | 1 |
Webhooks
Events your handlers can receive
- user.created
- user.deleted
- user.updated
- authentication.password_succeeded
- authentication.password_failed
- organization.created
- organization_membership.created
Deliveries are signed with the workos scheme, so your verification code runs unchanged.
Coverage
274 operations
28 of them are stateful. The largest groups:
| Group | Operations |
|---|---|
| Other operations | 246 |
| Organization memberships | 7 |
| Directory sync | 6 |
| Organizations | 5 |
| Users | 5 |
| Single sign-on | 3 |
Verification
Spec-verified
Generated operations are checked against the vendor OpenAPI description, which proves shape and routing. Stateful operations and scenario suites prove behaviour. Responses are not yet compared with a live vendor sandbox.
2 operations cannot be checked against the specification.
Source and limits
License, source and limits
- Generated from the WorkOS, Inc. API description, licensed under MIT.
- WorkOS, Inc. API documentation
- Source specification
Each collection holds up to 1 MiB of objects per API key; writes beyond that are dropped (x-maxoperf-vs-state: capacity). State is isolated by the Authorization header, so send the same API key on /user_management/authenticate and /sso/token (WorkOS itself reads client_secret from the body). Access tokens are RS256 JWTs signed with a per-install mock key; the keyed JWKS endpoint is not served from the pinned schema (it requires x5c certificates). SSO authorize redirects straight back with a one-time code (no identity provider screen); /sso/token accepts any code once and then answers invalid_grant. Directories, directory users and groups are seeded and read-only. Deletes answer 200 with an empty body as the pinned spec declares. Ids that do not use the vendor prefix (user_, org_, om_, directory_...) are answered with a stateless sample. membership.user is a snapshot taken at creation; password changes through update are not applied. Audit log events are accepted but not stored. Webhooks are delivered to the Virtual Service webhook setting, signed with the WorkOS-Signature scheme.
MaxoPerf is not affiliated with, endorsed by, or sponsored by WorkOS, Inc. WorkOS is a trademark of its owner.