# Create Datarooms

Create one or more datarooms from Apex.

> Kind: Apex method · Updated: 2026-07-01

## Signature

```apex
global static List<Dataroom> createDatarooms(
  List<Types.CreateDataroomInput> dataroomInputs,
  String runAs
)
```

### Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| dataroomInputs | List&lt;<a href="#/apex-type-create-dataroom-input">Types.CreateDataroomInput</a>&gt; | required | List of Types.CreateDataroomInput; one entry per dataroom to create. |
| runAs | String | required | Email Id of the user on whose behalf the function should run. To run the action as the automation user, supply integrationUser. |

## Return Type

List<Dataroom&gt;

## Example

```apex
List<cldfs.Types.CreateDataroomInput> dataroomInputs = new List<cldfs.Types.CreateDataroomInput>{
    new cldfs.Types.CreateDataroomInput('Dataroom - 01', 'Test Dataroom')
};
List<cldfs.Dataroom> dataroom = cldfs.Client.createDatarooms(dataroomInputs, 'integrationUser');
```
