Create organization

POSThttps://test.stytch.com/v1/b2b/organizations

Creates an Organization. An organization_name and a unique organization_slug are required.

By default, email_invites and sso_jit_provisioning will be set to ALL_ALLOWED, and mfa_policy will be set to OPTIONAL if no Organization authentication settings are explicitly defined in the request.

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


Body parameters


organization_name*string

organization_slug*string

mfa_policystring

organization_logo_urlstring

trusted_metadataobject

email_jit_provisioningstring

email_invitesstring

email_allowed_domainsarray[strings]

sso_jit_provisioningstring

auth_methodsstring

allowed_auth_methodsarray[strings]

mfa_methodsstring

allowed_mfa_methodsarray[strings]

rbac_email_implicit_role_assignmentsarray[object]

Response fields


request_idstring

status_codeint

organizationobject
curl --request POST \
  --url https://test.stytch.com/v1/b2b/organizations \
  -u 'PROJECT_ID:SECRET' \
  -H 'Content-Type: application/json' \
  -d '{
    "organization_name": "Example Org Inc.",
    "organization_slug": "example-org"
  }'

RESPONSE

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