From e6b891ea19ce4ae518ffee501a71ae0e30883359 Mon Sep 17 00:00:00 2001 From: Matthew Mauer Date: Wed, 8 May 2024 18:26:22 -0400 Subject: [PATCH] support legacy_org_id on org creation --- propelauth_py/__init__.py | 2 ++ propelauth_py/api/org.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/propelauth_py/__init__.py b/propelauth_py/__init__.py index 830bffe..11f686d 100644 --- a/propelauth_py/__init__.py +++ b/propelauth_py/__init__.py @@ -375,6 +375,7 @@ def create_org( members_must_have_matching_domain=False, domain=None, max_users=None, + legacy_org_id=None, ): return _create_org( auth_url, @@ -384,6 +385,7 @@ def create_org( members_must_have_matching_domain, domain, max_users, + legacy_org_id, ) def update_org_metadata( diff --git a/propelauth_py/api/org.py b/propelauth_py/api/org.py index 25c016d..55f82ad 100644 --- a/propelauth_py/api/org.py +++ b/propelauth_py/api/org.py @@ -74,6 +74,7 @@ def _create_org( members_must_have_matching_domain=False, domain=None, max_users=None, + legacy_org_id=None, ): url = auth_url + f"{ENDPOINT_PATH}/" json = { @@ -85,6 +86,8 @@ def _create_org( json["domain"] = domain if max_users is not None: json["max_users"] = max_users + if legacy_org_id: + json["legacy_org_id"] = legacy_org_id response = requests.post(url, json=json, auth=_ApiKeyAuth(integration_api_key)) if response.status_code == 401: