# Create and open an app

Create an app and open it by using the [CreateDocEx Method](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/EngineJSONAPI/Content/service-global-createdocex.htm).

## Example

[](https://help.qlik.com/en-US/sense-developer/Subsystems/EngineAPI/Content/Sense_EngineAPI/CreatingAppLoadingData/CreateApps/create-and-open-app.htm)

#### The client wants to create and open the app Sales2ndQuarter.

1. Create and open the app.

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 0,
  "method": "CreateDocEx",
  "handle": -1,
  "params": [
    "Sales2ndQuarter.qvf"
  ]
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 0,
  "result": {
    "qReturn": {
      "qType": "Doc",
      "qHandle": 1
    },
    "qDocId": "C:\\Users\\smu\\Documents\\Qlik\\Sense\\Apps\\Sales2ndQuarter.qvf"
  },
  "change": [
    1
  ]
}
```

The app is created and is located in the path specified by qDocId. The app has 1 as a handle.

2. Check that an engine session is opened (the app is opened).

The client sends:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "GetActiveDoc",
  "handle": -1,
  "params": []
}
```

The engine returns:

```
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "qReturn": {
      "qType": "Doc",
      "qHandle": 1
    }
  }
}
```

The app is active. The handle of the app is returned.