# Create a document folder

Make an empty folder on a record. Omit parentFolderId (or send null) to put it at the record's Documents root; pass another folder's id to nest it. A name already used at the same level of the same record is a conflict.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/folders`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| rowId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "name": "string",
    "parentFolderId": ""
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "createdAt": "string",
    "createdByUserId": 1,
    "fileCount": 1,
    "folderCount": 1,
    "id": "",
    "name": "string",
    "parentFolderId": "",
    "position": 1,
    "updatedAt": "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"
}
```
