B2B Saas Authentication

/

API reference

/

Organizations

/

Update an organization

Update an Organization

PUThttps://test.stytch.com/v1/b2b/organizations/{organization_id}

Updates an Organization specified by organization_id. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.

*See the Organization authentication settings resource to learn more about fields like email_jit_provisioning, email_invites, sso_jit_provisioning, etc., and their behaviors.


Path parameters


organization_id*string

Body parameters


organization_namestring

organization_slugstring

organization_logo_urlstring

trusted_metadataobject

email_jit_provisioningstring

email_invitesstring

email_allowed_domainsarray[strings]

sso_default_connection_idstring

sso_jit_provisioningstring

sso_jit_provisioning_allowed_connectionsarray[strings]

auth_methodsstring

allowed_auth_methodsarray[strings]

mfa_methodsstring

allowed_mfa_methodsarray[strings]

mfa_policystring

rbac_email_implicit_role_assignmentsarray[object]

oauth_tenant_jit_provisioningstring

allowed_oauth_tenantsobject

Header parameters


X-Stytch-Member-Sessionstring

X-Stytch-Member-SessionJWTstring

Response fields


request_idstring

status_codeint

organizationobject
curl --request PUT \
  --url https://test.stytch.com/v1/b2b/organizations/organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931 \
  -u 'PROJECT_ID:SECRET' \
  -H 'Content-Type: application/json' \
  -H "X-Stytch-Member-Session: mZAYn5aLEqKUlZ_Ad9U_fWr38GaAQ1oFAhT8ds245v7Q" \
  -d '{
    "organization_name": "Example Org Inc.",
    "email_jit_provisioning": "ALL_ALLOWED"
  }'

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "organization": {
	"email_allowed_domains": [],
	"email_invites": "ALL_ALLOWED",
	"email_jit_provisioning": "ALL_ALLOWED",
	"mfa_policy": "OPTIONAL",
	"organization_id": "organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931",
	"organization_logo_url": "",
	"organization_name": "Example Org Inc.",
	"organization_slug": "example-org",
	"sso_default_connection_id": null,
	"sso_jit_provisioning": "ALL_ALLOWED",
	"sso_jit_provisioning_allowed_connections": [],
	"sso_active_connections": [],
	"scim_active_connection": null,
	"trusted_metadata": {},
	"auth_methods": "ALL_ALLOWED",
    "allowed_auth_methods": [],
	"oauth_tenant_jit_provisioning": "NOT_ALLOWED",
	"allowed_oauth_tenants": {}
  }
}

Common Error Types