# Create storage-accounts

Connects a file store so this workspace's documents land in its own Drive or SharePoint. Body: `connection_id` is required and names which already-connected provider account the store rides on (`get_connections`); `provider` says which kind of store; `label` is optional and falls back to the connected address, which is what distinguishes three Drives from each other; `root_folder_id` is optional and empty means the provider's own root, a legal choice rather than a missing one. A workspace admin's.

Access class: `workspace`.

## Endpoint

`POST /v1/storage-accounts`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "connection_id": "",
    "label": "string",
    "provider": "string",
    "root_folder_id": ""
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "connection_id": "",
    "id": "",
    "label": "string",
    "mine": true,
    "provider": "string",
    "root_folder_id": "",
    "status": "string",
    "status_detail": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
