Domains
Manage organization email domains
Use scalekit_client.domain to manage verified email domains for an organization (SSO routing and domain-based policies).
Add a domain, complete verification, then use it with SSO and organization policies.
create_domain
Section titled “create_domain”#asynccreate_domain
Method to create domain
paramorganization_idstr
Organization id to create domain for
paramdomain_namestr
Domain name for new creation
paramdomain_typeOptional[Union[str, 'DomainType']]
Domain type filter.
returnsCreateDomainResponse
Domain Response
response = scalekit_client.domain.create_domain( 'org_123456', 'acme.com', domain_type='ORGANIZATION_DOMAIN')list_domains
Section titled “list_domains”#asynclist_domains
Method to list existing domains
paramorganization_idstr
Organization id to list domains for
paramdomain_typeOptional[Union[str, 'DomainType']]
Domain type filter.
returnsListDomainResponse
List Domain Response
response = scalekit_client.domain.list_domains( 'org_123456', domain_type='ORGANIZATION_DOMAIN')
for domain in response[0].domains: print(f"Domain: {domain.domain}")get_domain
Section titled “get_domain”#asyncget_domain
Method to list existing domains
paramorganization_idstr
Organization id to list domains for
paramdomain_idstr
Domain name for new creation
returnsGetDomainResponse
Get Domain Response
response = scalekit_client.domain.get_domain('org_123456', 'domain_123456')domain = response[0].domaindelete_domain
Section titled “delete_domain”#asyncdelete_domain
Method to delete domain
paramorganization_idstr
Organization id to delete domain for
paramdomain_idstr
Domain id to delete
returnsNone
Empty on success.
scalekit_client.domain.delete_domain('org_123456', 'domain_123456')