> ## Documentation Index
> Fetch the complete documentation index at: https://docs.repdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a folder

> # Description

Create a folder inside the folder passed in the url to group projects inside it.

# Response

## 200 OK

```json
{
    "createdAt": "string",
    "id": "string",
    "title": "string",
    "totalProjectsCount": "number",
}
```

where: 

- `createdAt`: Date of creation of the folder in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
- `id`: Id of the folder created.
- `title`: Name of the folder.
- `totalProjectsCount`: Number of projects inside the folder. When the folder is created, this value will always be zero.

## 400 Bad Request

> `folderId` from url path is not found.

## 401 Unauthorized

> The user doesn't have permissions.

## 500 Internal Server Error

> Error occurred while processing the request.

# Description

Create a folder inside the folder passed in the url to group projects inside it.

# Response

## 200 OK

```json theme={null}
{
    "createdAt": "string",
    "id": "string",
    "title": "string",
    "totalProjectsCount": "number",
}
```

where:

* `createdAt`: Date of creation of the folder in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
* `id`: Id of the folder created.
* `title`: Name of the folder.
* `totalProjectsCount`: Number of projects inside the folder. When the folder is created, this value will always be zero.

## 400 Bad Request

> `folderId` from url path is not found.

## 401 Unauthorized

> The user doesn't have permissions.

## 500 Internal Server Error

> Error occurred while processing the request.


## OpenAPI

````yaml POST /projects-api/v1/folders/{folderId}/subfolders
openapi: 3.0.3
info:
  title: SightX API
  version: 1.0.0
  description: >-
    SightX REST API documentation. Most responses are JSON; some export
    endpoints return files. API access is a paid add-on — contact
    sales@sightx.io for details.
servers:
  - url: https://auth.admin.sightx.io
    description: Authentication (Production)
  - url: https://auth.staging-admin.sightx.io
    description: Authentication (Staging)
security:
  - AuthorizationHeader: []
paths:
  /projects-api/v1/folders/{folderId}/subfolders:
    post:
      summary: Create a folder
      description: >-
        # Description


        Create a folder inside the folder passed in the url to group projects
        inside it.


        # Response


        ## 200 OK


        ```json

        {
            "createdAt": "string",
            "id": "string",
            "title": "string",
            "totalProjectsCount": "number",
        }

        ```


        where: 


        - `createdAt`: Date of creation of the folder in the format
        `YYYY-MM-DDTHH:mm:ss.SSSZ`.

        - `id`: Id of the folder created.

        - `title`: Name of the folder.

        - `totalProjectsCount`: Number of projects inside the folder. When the
        folder is created, this value will always be zero.


        ## 400 Bad Request


        > `folderId` from url path is not found.


        ## 401 Unauthorized


        > The user doesn't have permissions.


        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: create-a-folder-post-projects-api-v1-folders-folderid-subfolders
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Authorization token
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            example:
              title: string
      responses:
        '200':
          description: Successful response
        '201':
          description: Create a folder
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                title: string
                createdAt: '2021-09-17T22:28:48.375Z'
                id: 614516a0ec80380d3543de85
                totalProjectsCount: 0
                userId: 5e1155a9091833000f274bbd
                parentFolderId: f00000000000000000000001
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://project.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````