List compatible directories
GET /compat/workos/directories: List compatible directories.
GET /
Directory and organization filters are optional. Supplying both before and after returns 422.
- Scope
directories:read- Auth
- Secret key (
sk_…) - Since
- 1.0
Query parameters
Section titled “Query parameters”limitintegermin 1 · max 100 · default
10beforestringmin length 1 · max length 2048
afterstringmin length 1 · max length 2048
orderstringone of
asc,desc· default"desc"directorystringmin length 1 · max length 2048
organization_idstringmin length 1 · max length 2048
Responses
Section titled “Responses”- 200 OK WorkOSDirectoryList
- 401 A secret API key is required. WorkOSDsyncError
- 403 The secret key lacks the required scope. WorkOSDsyncError
- 404 The resource is absent or compatibility is disabled. WorkOSDsyncError
- 422 Invalid compatibility filter or cursor. WorkOSDsyncError
- default WorkOS compatibility refusal; invalid filters and cursors use 422. WorkOSDsyncError
Errors share one shape; see the error code catalogue.
curl -X GET \ "https://api.ohauthcat.com/compat/workos/directories" \ -H "Authorization: Bearer $OHAUTHCAT_API_KEY"const response = await fetch("https://api.ohauthcat.com/compat/workos/directories", { method: "GET", headers: { Authorization: `Bearer ${process.env.OHAUTHCAT_API_KEY}`, },});const data = await response.json();import osimport requests
response = requests.get( "https://api.ohauthcat.com/compat/workos/directories", headers={"Authorization": f"Bearer {os.environ['OHAUTHCAT_API_KEY']}"},)data = response.json(){ "object": "list", "data": [ { "id": "01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "object": "directory", "organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "type": "default", "state": "validating", "name": "Acme Corp", "created_at": "2026-01-15T09:30:00Z", "updated_at": "2026-01-15T09:30:00Z" } ], "list_metadata": { "before": "cur_01J9Z3K5V7W8X9Y0Z1A2B3C4D5", "after": "cur_01J9Z3K5V7W8X9Y0Z1A2B3C4D5" }}