# Create

`POST /api/2.0/clean-rooms`

Create a new clean room with the specified collaborators.
 This method is asynchronous; the returned name field inside the clean_room field can be used to poll the clean room status,
 using the [cleanrooms/get](https://docs.databricks.com/api/workspace/cleanrooms/get) method.
 When this method returns, the clean room will be in a PROVISIONING state, with only name, owner, comment, created_at and status populated.
 The clean room will be usable once it enters an ACTIVE state.

 The caller must be a metastore admin or have the **CREATE_CLEAN_ROOM** privilege on the
 metastore.

API scopes: cleanrooms

## Request body

- `clean_room` (object, optional)
  - `name` (string, optional)
    The name of the clean room.
     It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
    Example: `test-clean-room1`
  - `remote_detailed_info` (object, optional)
    Central clean room details. During creation, users need to specify
     cloud_vendor, region, and collaborators.global_metastore_id.
     This field will not be filled in the ListCleanRooms call.
    - `central_clean_room_id` (string, optional)
      Central clean room ID.
      Example: `b5c8d856-ff41-4c5f-8ccd-2b13b44fec27`
    - `cloud_vendor` (string, optional)
      Cloud vendor (aws,azure,gcp) of the central clean room.
      Example: `aws`
    - `region` (string, optional)
      Region of the central clean room.
      Example: `us-west-2`
    - `collaborators` (array of object, optional)
      Collaborators in the central clean room. There should one and only one collaborator
       in the list that satisfies the owner condition:
      
       1. It has the creator's global_metastore_id (determined by caller of CreateCleanRoom).
      
       2. Its invite_recipient_email is empty.
      - `global_metastore_id` (string, optional)
        The global Unity Catalog metastore ID of the collaborator. The identifier is of format cloud:region:metastore-uuid.
        Example: `aws:us-west-2:aff56c64-a34e-4c1f-a24c-c2dd2889517a`
      - `organization_name` (string, optional)
        [Organization name](:method:metastores/list#metastores-delta_sharing_organization_name)
         configured in the metastore
        Example: `acme corporation`
      - `invite_recipient_workspace_id` (int64, optional)
        Workspace ID of the user who is receiving the clean room "invitation". Must be specified if
         invite_recipient_email is specified.
         It should be empty when the collaborator is the creator of the clean room.
        Example: `6822898386300992`
      - `invite_recipient_email` (string, optional)
        Email of the user who is receiving the clean room "invitation". It should be empty
         for the creator of the clean room, and non-empty for the invitees of the clean room.
         It is only returned in the output when clean room creator calls GET
        Example: `john.doe@databricks.com`
      - `collaborator_alias` (string, optional)
        Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive
         multiple values internally such as catalog alias and clean room name for single metastore clean rooms.
         It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
        Example: `creator`
      - `display_name` (string, optional)
        Generated display name for the collaborator. In the case of a single metastore clean room, it is the clean
         room name. For x-metastore clean rooms, it is the organization name of the metastore. It is not restricted to
         these values and could change in the future
        Example: `acme corporation`
    - `creator` (object, optional)
      Collaborator who creates the clean room.
      - `global_metastore_id` (string, optional)
        The global Unity Catalog metastore ID of the collaborator. The identifier is of format cloud:region:metastore-uuid.
        Example: `aws:us-west-2:aff56c64-a34e-4c1f-a24c-c2dd2889517a`
      - `organization_name` (string, optional)
        [Organization name](:method:metastores/list#metastores-delta_sharing_organization_name)
         configured in the metastore
        Example: `acme corporation`
      - `invite_recipient_workspace_id` (int64, optional)
        Workspace ID of the user who is receiving the clean room "invitation". Must be specified if
         invite_recipient_email is specified.
         It should be empty when the collaborator is the creator of the clean room.
        Example: `6822898386300992`
      - `invite_recipient_email` (string, optional)
        Email of the user who is receiving the clean room "invitation". It should be empty
         for the creator of the clean room, and non-empty for the invitees of the clean room.
         It is only returned in the output when clean room creator calls GET
        Example: `john.doe@databricks.com`
      - `collaborator_alias` (string, optional)
        Collaborator alias specified by the clean room creator. It is unique across all collaborators of this clean room, and used to derive
         multiple values internally such as catalog alias and clean room name for single metastore clean rooms.
         It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
        Example: `creator`
      - `display_name` (string, optional)
        Generated display name for the collaborator. In the case of a single metastore clean room, it is the clean
         room name. For x-metastore clean rooms, it is the organization name of the metastore. It is not restricted to
         these values and could change in the future
        Example: `acme corporation`
    - `egress_network_policy` (object, optional)
      Egress network policy to apply to the central clean room workspace.
      - `internet_access` (object, optional)
        The access policy enforced for egress traffic to the internet.
    - `compliance_security_profile` (object, optional)
      - `is_enabled` (boolean, optional)
        Whether the compliance security profile is enabled.
      - `compliance_standards` (array of string, optional)
        The list of compliance standards that the compliance security profile is configured to enforce.
        Possible values: `COMPLIANCE_STANDARD_UNSPECIFIED`, `NONE`, `HIPAA`, `PCI_DSS`, `FEDRAMP_MODERATE`, `IRAP_PROTECTED`, `FEDRAMP_HIGH`, `FEDRAMP_IL5`, `ITAR_EAR`, `CYBER_ESSENTIAL_PLUS`, `CANADA_PROTECTED_B`, `ISMAP`, `HITRUST`, `K_FSI`, `GERMANY_C5`, `GERMANY_TISAX`, `KSA_ECC_CCC_DCC`
    - `enable_shared_output` (boolean, optional)
      Whether to enable shared output for the central clean room.
       When enabled, clean room task runs can write to the run-scoped shared output schema
       which is accessible by all collaborators.
      Example: `false`
    - `package_provider_collaborator_alias` (string, optional)
      Alias of the provider collaborator. If set, packaged clean rooms mode is enabled.
       The consumer's experience is restricted: they can view notebook names and READMEs,
       add their own data assets, and trigger runs, but cannot view notebook code,
       provider data assets, or notebook run output.
  - `owner` (string, optional)
    This is the <Databricks> username of the owner of the local clean room securable for permission management.
    Example: `alice@example.com`
  - `comment` (string, optional)
    Example: `This is a clean room for demo`
    Constraints: `<= 1000 characters`
  - `created_at` (int64, optional)
    When the clean room was created, in epoch milliseconds.
    Example: `1716424663321`
  - `updated_at` (int64, optional)
    When the clean room was last updated, in epoch milliseconds.
    Example: `1716424663321`
  - `status` (string, optional)
    Clean room status.
    Possible values: `ENUM_UNSPECIFIED`, `ACTIVE`, `PROVISIONING`, `DELETED`, `FAILED`
  - `local_collaborator_alias` (string, optional)
    The alias of the collaborator tied to the local clean room.
    Example: `creator`
  - `output_catalog` (object, optional)
    Output catalog of the clean room. It is an output only field. Output catalog is manipulated
     using the separate CreateCleanRoomOutputCatalog API.
    - `status` (string, optional)
      Possible values: `OUTPUT_CATALOG_STATUS_UNSPECIFIED`, `NOT_ELIGIBLE`, `NOT_CREATED`, `CREATED`
    - `catalog_name` (string, optional)
      The name of the output catalog in UC.
       It should follow [UC securable naming requirements](https://docs.databricks.com/en/data-governance/unity-catalog/index.html#securable-object-naming-requirements).
       The field will always exist if status is CREATED.
  - `access_restricted` (string, optional)
    Whether clean room access is restricted due to [CSP](https://docs.databricks.com/en/security/privacy/security-profile.html)
    Possible values: `NO_RESTRICTION`, `CSP_MISMATCH`
  - `enable_shared_output` (boolean, optional)
    Whether allow task to write to shared output schema.
     When enabled, clean room task runs triggered by the current collaborator
     can write to the run-scoped shared output schema which is accessible by all collaborators.
    Example: `false`

## Returns

Returns the CleanRoom object.

## Response

```json
{
  "name": "test-clean-room1",
  "remote_detailed_info": {
    "central_clean_room_id": "b5c8d856-ff41-4c5f-8ccd-2b13b44fec27",
    "cloud_vendor": "aws",
    "region": "us-west-2",
    "collaborators": [
      {}
    ],
    "creator": {},
    "egress_network_policy": {},
    "compliance_security_profile": {},
    "enable_shared_output": false,
    "package_provider_collaborator_alias": "string"
  },
  "owner": "alice@example.com",
  "comment": "This is a clean room for demo",
  "created_at": 1716424663321,
  "updated_at": 1716424663321,
  "status": "string",
  "local_collaborator_alias": "creator",
  "output_catalog": {
    "status": "string",
    "catalog_name": "string"
  },
  "access_restricted": "string",
  "enable_shared_output": false
}
```

