From 547a904036de961c0ad73222f6286a763d30d936 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 16:00:56 +0000 Subject: [PATCH 1/3] feat(user_management): Update user management API surface --- src/workos/user_management/_resource.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/workos/user_management/_resource.py b/src/workos/user_management/_resource.py index 7293a2e9..7d99b9dd 100644 --- a/src/workos/user_management/_resource.py +++ b/src/workos/user_management/_resource.py @@ -1242,6 +1242,7 @@ def create_user( Raises: BadRequestError: If the request is malformed (400). + AuthorizationError: If the request is forbidden (403). NotFoundError: If the resource is not found (404). UnprocessableEntityError: If the request data is unprocessable (422). AuthenticationError: If the API key is invalid (401). @@ -2040,6 +2041,7 @@ def create_magic_auth( Raises: BadRequestError: If the request is malformed (400). + AuthorizationError: If the request is forbidden (403). UnprocessableEntityError: If the request data is unprocessable (422). RateLimitExceededError: If rate limited (429). AuthenticationError: If the API key is invalid (401). @@ -3994,6 +3996,7 @@ async def create_user( Raises: BadRequestError: If the request is malformed (400). + AuthorizationError: If the request is forbidden (403). NotFoundError: If the resource is not found (404). UnprocessableEntityError: If the request data is unprocessable (422). AuthenticationError: If the API key is invalid (401). @@ -4792,6 +4795,7 @@ async def create_magic_auth( Raises: BadRequestError: If the request is malformed (400). + AuthorizationError: If the request is forbidden (403). UnprocessableEntityError: If the request data is unprocessable (422). RateLimitExceededError: If rate limited (429). AuthenticationError: If the API key is invalid (401). From 4767844686430c8b37e88a4f7a7b8019bfc318fc Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 16:00:56 +0000 Subject: [PATCH 2/3] chore(generated): regenerate shared files for AdminPortal, Agents, ApiKeys, AuditLogs, Authorization, ClientApi, Connect, DirectorySync, Events, FeatureFlags, Groups, MultiFactorAuth, OrganizationDomains, OrganizationMembership, Organizations, Pipes, PipesProvider, PlatformTeams, Radar, SSO, UserManagement, Vault, Webhooks, Widgets --- .last-synced-sha | 2 +- .oagen-manifest.json | 2 +- src/workos/admin_portal/_resource.py | 4 ++-- tests/test_admin_portal.py | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.last-synced-sha b/.last-synced-sha index 90399c99..54a4cc9f 100644 --- a/.last-synced-sha +++ b/.last-synced-sha @@ -1 +1 @@ -81a34a1dfa516c1987aff4038af330436b53e151 +d430b394483f6e00ff7f9e2ca8d4340ff8f7aa54 diff --git a/.oagen-manifest.json b/.oagen-manifest.json index 80065d9d..787ef6ee 100644 --- a/.oagen-manifest.json +++ b/.oagen-manifest.json @@ -2297,7 +2297,7 @@ "service": "admin_portal" }, "POST /portal/revoke_link": { - "sdkMethod": "create_revoke_link", + "sdkMethod": "revoke_link", "service": "admin_portal" }, "POST /radar/attempts": { diff --git a/src/workos/admin_portal/_resource.py b/src/workos/admin_portal/_resource.py index cb85a3ce..6c4558f4 100644 --- a/src/workos/admin_portal/_resource.py +++ b/src/workos/admin_portal/_resource.py @@ -82,7 +82,7 @@ def generate_link( request_options=request_options, ) - def create_revoke_link( + def revoke_link( self, *, organization: str, @@ -186,7 +186,7 @@ async def generate_link( request_options=request_options, ) - async def create_revoke_link( + async def revoke_link( self, *, organization: str, diff --git a/tests/test_admin_portal.py b/tests/test_admin_portal.py index f75c374c..f61bea46 100644 --- a/tests/test_admin_portal.py +++ b/tests/test_admin_portal.py @@ -34,9 +34,9 @@ def test_generate_link(self, workos, httpx_mock): body = json.loads(request.content) assert body["organization"] == "test_organization" - def test_create_revoke_link(self, workos, httpx_mock): + def test_revoke_link(self, workos, httpx_mock): httpx_mock.add_response(json={}) - workos.admin_portal.create_revoke_link( + workos.admin_portal.revoke_link( organization="test_organization", external_user_id="test_external_user_id" ) request = httpx_mock.get_request() @@ -137,9 +137,9 @@ async def test_generate_link(self, async_workos, httpx_mock): assert request.url.path.endswith("/portal/generate_link") @pytest.mark.asyncio - async def test_create_revoke_link(self, async_workos, httpx_mock): + async def test_revoke_link(self, async_workos, httpx_mock): httpx_mock.add_response(json={}) - await async_workos.admin_portal.create_revoke_link( + await async_workos.admin_portal.revoke_link( organization="test_organization", external_user_id="test_external_user_id" ) request = httpx_mock.get_request() From 6ffe7c4335ce1db8372f569620a4af5d9f80ee37 Mon Sep 17 00:00:00 2001 From: "workos-sdk-automation[bot]" <255426317+workos-sdk-automation[bot]@users.noreply.github.com> Date: Thu, 15 Oct 2026 16:01:05 +0000 Subject: [PATCH 3/3] chore(generated): add release notes fragment --- ...6-01-05-f828c87a2b14abbb0f0127a6cb0b3a52f3dfc76f.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changelog-pending/2026-10-15T16-01-05-f828c87a2b14abbb0f0127a6cb0b3a52f3dfc76f.md diff --git a/.changelog-pending/2026-10-15T16-01-05-f828c87a2b14abbb0f0127a6cb0b3a52f3dfc76f.md b/.changelog-pending/2026-10-15T16-01-05-f828c87a2b14abbb0f0127a6cb0b3a52f3dfc76f.md new file mode 100644 index 00000000..8e031365 --- /dev/null +++ b/.changelog-pending/2026-10-15T16-01-05-f828c87a2b14abbb0f0127a6cb0b3a52f3dfc76f.md @@ -0,0 +1,10 @@ +* [#749](https://github.com/workos/workos-python/pull/749) feat(generated)!: regenerate from spec (3 changes) + + **Features** + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Changed errors for endpoint `POST /user_management/users` + * Changed errors for endpoint `POST /user_management/magic_auth` + + **Fixes** + * **[user_management](https://workos.com/docs/reference/authkit/user)**: + * Changed errors for endpoint `POST /user_management/authenticate`