> ## 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 project

> # Description

Create a new SightX project.

# Payload

```json
{
    "title": "string",
    "survey": {
        "pages": array
    },
    "color": "string"
}
```

where:

- `title`: Title of the new project. **Required**.
- `survey`: Object containing the pages of the projects. Optional.
- `color`: Hex color without the # symbol (e.g. 3632a8). Optional.

# Response

## 200 OK

```json
{
    "createdAt": "string",
    "id": "string",
    "isLive": "boolean",
    "status": "string",
    "title": "string",
    "survey": "object"
}
```

where: 

- `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
- `id`: Id of the project.
- `isLive`: Wether the project is live or not. It is `false` by default.
- `status`: The status of the project. When the project is created, it will be `draft` by default.
- `survey`: Object containing the survey structure, eg. pages, questions, etc.
  - `pages`: Array of page objects. Empty by default.
- `customization`: Object containing the survey visual configurations.
  - `foregroundColor`: Color of the text of the survey.
  - `backgroundColor`: Color of the background of the elements of the survey.
  - `question`: Object containing question title configurations.
    - `font`: The font of the question title.
    - `color`: The color of the font of the question title.
    - `align`: The position to align the question title.
  - `answer`: Object containing answers configurations.
    - `font`: The font of the answers.
    - `color`: Font color of the answers.
    - `align`: The position to align the answers.
  - `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
  - `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
  - `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
  - `progressBar`: Object containing the survey progress bar configurations.
    - `enabled`: Boolean value to specify if the progress bar should be displayed or not.
    - `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
- `stats`: Object containing some relevant stats of the project.
  - `questions`: Object containing question stats.
    - `totalCount`: Total number of questions present in the survey.
    - `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
  - `totalResponsesCount`: Deprecated.
  - `totalTimeToComplete`: Deprecated.
- `hasSignatureConfirmation`: Boolean value to specify if the survey asks for a signature confirmation before starting.- `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
- `id`: Id of the project.
- `isLive`: Wether the project is live or not. It is `false` by default.
- `status`: The status of the project. When the project is created, it will be `draft` by default.
- `survey`: Object containing the survey structure, eg. pages, questions, etc.
  - `pages`: Array of page objects. Empty by default.
- `customization`: Object containing the survey visual configurations.
  - `foregroundColor`: Color of the text of the survey.
  - `backgroundColor`: Color of the background of the elements of the survey.
  - `question`: Object containing question title configurations.
    - `font`: The font of the question title.
    - `color`: The color of the font of the question title.
    - `align`: The position to align the question title.
  - `answer`: Object containing answers configurations.
    - `font`: The font of the answers.
    - `color`: Font color of the answers.
    - `align`: The position to align the answers.
  - `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
  - `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
  - `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
  - `progressBar`: Object containing the survey progress bar configurations.
    - `enabled`: Boolean value to specify if the progress bar should be displayed or not.
    - `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
- `stats`: Object containing some relevant stats of the project.
  - `questions`: Object containing question stats.
    - `totalCount`: Total number of questions present in the survey.
    - `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
  - `totalResponsesCount`: Deprecated.
  - `totalTimeToComplete`: Deprecated.
- `hasSignatureConfirmation`: Boolean value to specify if the survey asks for a signature confirmation before starting.

## 401 Unauthorized

> The user doesn't have permissions.

## 422 Bad Request

> `title` is missing.

## 500 Internal Server Error

> Error occurred while processing the request.

# Description

Create a new SightX project.

# Payload

```json theme={null}
{
    "title": "string",
    "survey": {
        "pages": array
    },
    "color": "string"
}
```

where:

* `title`: Title of the new project. **Required**.
* `survey`: Object containing the pages of the projects. Optional.
* `color`: Hex color without the # symbol (e.g. 3632a8). Optional.

# Response

## 200 OK

```json theme={null}
{
    "createdAt": "string",
    "id": "string",
    "isLive": "boolean",
    "status": "string",
    "title": "string",
    "survey": "object"
}
```

where:

* `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
* `id`: Id of the project.
* `isLive`: Wether the project is live or not. It is `false` by default.
* `status`: The status of the project. When the project is created, it will be `draft` by default.
* `survey`: Object containing the survey structure, eg. pages, questions, etc.
  * `pages`: Array of page objects. Empty by default.
* `customization`: Object containing the survey visual configurations.
  * `foregroundColor`: Color of the text of the survey.
  * `backgroundColor`: Color of the background of the elements of the survey.
  * `question`: Object containing question title configurations.
    * `font`: The font of the question title.
    * `color`: The color of the font of the question title.
    * `align`: The position to align the question title.
  * `answer`: Object containing answers configurations.
    * `font`: The font of the answers.
    * `color`: Font color of the answers.
    * `align`: The position to align the answers.
  * `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
  * `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
  * `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
  * `progressBar`: Object containing the survey progress bar configurations.
    * `enabled`: Boolean value to specify if the progress bar should be displayed or not.
    * `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
* `stats`: Object containing some relevant stats of the project.
  * `questions`: Object containing question stats.
    * `totalCount`: Total number of questions present in the survey.
    * `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
  * `totalResponsesCount`: Deprecated.
  * `totalTimeToComplete`: Deprecated.
* `hasSignatureConfirmation`: Boolean value to specify if the survey asks for a signature confirmation before starting.- `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
* `id`: Id of the project.
* `isLive`: Wether the project is live or not. It is `false` by default.
* `status`: The status of the project. When the project is created, it will be `draft` by default.
* `survey`: Object containing the survey structure, eg. pages, questions, etc.
  * `pages`: Array of page objects. Empty by default.
* `customization`: Object containing the survey visual configurations.
  * `foregroundColor`: Color of the text of the survey.
  * `backgroundColor`: Color of the background of the elements of the survey.
  * `question`: Object containing question title configurations.
    * `font`: The font of the question title.
    * `color`: The color of the font of the question title.
    * `align`: The position to align the question title.
  * `answer`: Object containing answers configurations.
    * `font`: The font of the answers.
    * `color`: Font color of the answers.
    * `align`: The position to align the answers.
  * `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
  * `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
  * `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
  * `progressBar`: Object containing the survey progress bar configurations.
    * `enabled`: Boolean value to specify if the progress bar should be displayed or not.
    * `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
* `stats`: Object containing some relevant stats of the project.
  * `questions`: Object containing question stats.
    * `totalCount`: Total number of questions present in the survey.
    * `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
  * `totalResponsesCount`: Deprecated.
  * `totalTimeToComplete`: Deprecated.
* `hasSignatureConfirmation`: Boolean value to specify if the survey asks for a signature confirmation before starting.

## 401 Unauthorized

> The user doesn't have permissions.

## 422 Bad Request

> `title` is missing.

## 500 Internal Server Error

> Error occurred while processing the request.


## OpenAPI

````yaml POST /projects-api/v2/folders/{folderId}/projects
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/v2/folders/{folderId}/projects:
    post:
      summary: Create a project
      description: >-
        # Description


        Create a new SightX project.


        # Payload


        ```json

        {
            "title": "string",
            "survey": {
                "pages": array
            },
            "color": "string"
        }

        ```


        where:


        - `title`: Title of the new project. **Required**.

        - `survey`: Object containing the pages of the projects. Optional.

        - `color`: Hex color without the # symbol (e.g. 3632a8). Optional.


        # Response


        ## 200 OK


        ```json

        {
            "createdAt": "string",
            "id": "string",
            "isLive": "boolean",
            "status": "string",
            "title": "string",
            "survey": "object"
        }

        ```


        where: 


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

        - `id`: Id of the project.

        - `isLive`: Wether the project is live or not. It is `false` by default.

        - `status`: The status of the project. When the project is created, it
        will be `draft` by default.

        - `survey`: Object containing the survey structure, eg. pages,
        questions, etc.
          - `pages`: Array of page objects. Empty by default.
        - `customization`: Object containing the survey visual configurations.
          - `foregroundColor`: Color of the text of the survey.
          - `backgroundColor`: Color of the background of the elements of the survey.
          - `question`: Object containing question title configurations.
            - `font`: The font of the question title.
            - `color`: The color of the font of the question title.
            - `align`: The position to align the question title.
          - `answer`: Object containing answers configurations.
            - `font`: The font of the answers.
            - `color`: Font color of the answers.
            - `align`: The position to align the answers.
          - `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
          - `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
          - `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
          - `progressBar`: Object containing the survey progress bar configurations.
            - `enabled`: Boolean value to specify if the progress bar should be displayed or not.
            - `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
        - `stats`: Object containing some relevant stats of the project.
          - `questions`: Object containing question stats.
            - `totalCount`: Total number of questions present in the survey.
            - `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
          - `totalResponsesCount`: Deprecated.
          - `totalTimeToComplete`: Deprecated.
        - `hasSignatureConfirmation`: Boolean value to specify if the survey
        asks for a signature confirmation before starting.- `createdAt`: Date of
        creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.

        - `id`: Id of the project.

        - `isLive`: Wether the project is live or not. It is `false` by default.

        - `status`: The status of the project. When the project is created, it
        will be `draft` by default.

        - `survey`: Object containing the survey structure, eg. pages,
        questions, etc.
          - `pages`: Array of page objects. Empty by default.
        - `customization`: Object containing the survey visual configurations.
          - `foregroundColor`: Color of the text of the survey.
          - `backgroundColor`: Color of the background of the elements of the survey.
          - `question`: Object containing question title configurations.
            - `font`: The font of the question title.
            - `color`: The color of the font of the question title.
            - `align`: The position to align the question title.
          - `answer`: Object containing answers configurations.
            - `font`: The font of the answers.
            - `color`: Font color of the answers.
            - `align`: The position to align the answers.
          - `showNumbers`: Boolean value to specify if numbers are displayed next to question titles.
          - `paging`: String value containing the type of the pagination of the survey for desktop. Accepted values are page|question|none.
          - `mobilePaging`: String value containing the type of the pagination of the survey for mobile. Accepted values are page|question|none.
          - `progressBar`: Object containing the survey progress bar configurations.
            - `enabled`: Boolean value to specify if the progress bar should be displayed or not.
            - `type`: The type of progress bar to display. Accepted values are bar|percent|simple|none.
        - `stats`: Object containing some relevant stats of the project.
          - `questions`: Object containing question stats.
            - `totalCount`: Total number of questions present in the survey.
            - `contactInfoRelatedItemsCount`: Total number of contact info items to relate.
          - `totalResponsesCount`: Deprecated.
          - `totalTimeToComplete`: Deprecated.
        - `hasSignatureConfirmation`: Boolean value to specify if the survey
        asks for a signature confirmation before starting.


        ## 401 Unauthorized


        > The user doesn't have permissions.


        ## 422 Bad Request


        > `title` is missing.


        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: create-a-project-post-projects-api-v2-folders-folderid-projects
      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: Name of the new project
              survey:
                pages: []
              color: 3632a8
      responses:
        '200':
          description: Successful response
        '201':
          description: Create a project
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                createdAt: '2021-09-16T23:54:53.801Z'
                updatedAt: '2021-09-16T23:54:53.801Z'
                title: Name of the new project
                status: draft
                survey:
                  pages: []
                customization:
                  foregroundColor: '#00b3be'
                  backgroundColor: '#ffffff'
                  question:
                    font: Source Sans Pro
                    color: '#000000'
                    align: left
                  answer:
                    font: Source Sans Pro
                    color: '#000000'
                    align: center
                  showNumbers: true
                  paging: page
                  mobilePaging: page
                  progressBar:
                    enabled: true
                    type: percent
                stats:
                  questions:
                    totalCount: 0
                    contactInfoRelatedItemsCount: 0
                  totalResponsesCount: 0
                  totalTimeToComplete: 0
                hasSignatureConfirmation: false
                isLive: false
                id: 6143d94d9e3abc0d3b382733
                color: 'Hex color without the # symbol (e.g. 3632a8)'
                lastResponsesRecreationDate: '2021-09-16T23:54:53.799Z'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '500':
          description: Internal server error
      servers:
        - url: https://sx-projects.sightx.io
components:
  securitySchemes:
    AuthorizationHeader:
      type: apiKey
      in: header
      name: Authorization
      description: Access token obtained from the m2m-token endpoint.

````