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

# List projects

> # Description

List the projects of a company, using service account toke.

# Response

## 200 OK

The response is an array of objects where each object contains the information of each project.

```json
{
    "totalCount": 9082,
    "projects": [
        {
            "_id": "667ae984645bfbxxxxxeda46",
            "title": "Conjoint build",
            "ownerId": "62015f7aaxxxxxxxxxx87eab",
            "createdAt": "2024-06-25T16:00:04.169Z",
            "updatedAt": "2024-06-25T16:38:39.399Z",
            "id": "667ae984645bfbxxxxxeda46",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a9498645bfbxxxxxe47c6",
            "title": "asd12",
            "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
            "createdAt": "2024-06-25T09:57:44.899Z",
            "updatedAt": "2024-06-25T10:05:24.091Z",
            "id": "667a9498645bfbxxxxxe47c6",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a86e6645bfbxxxxxe2f66",
            "title": "asd1",
            "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
            "createdAt": "2024-06-25T08:59:18.029Z",
            "updatedAt": "2024-06-25T09:24:08.371Z",
            "id": "667a86e6645bfbxxxxxe2f66",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a8386645bfbxxxxxe2976",
            "title": "conjoint price",
            "ownerId": "630660207xxxxxxxxxx13fbb",
            "createdAt": "2024-06-25T08:44:54.322Z",
            "updatedAt": "2024-06-25T08:50:11.297Z",
            "id": "667a8386645bfbxxxxxe2976",
            "totalQuestionsCount": 0
        }
    ]
}

 ```

where:

- `totalCount`: total projects within your company.
    
- `projects`: list of projects data.
    
- `projects[index]`
    
    - `_id or id`: Id of the project.
        
    - `title`: name/title or the project,
        
    - `ownerId`: userId of the owner of the project.
        
    - `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
        
    - `updatedAt`: Date of the last update of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
        
    - `totalQuestionsCount:` Number of answers the project has.
        

## 401 Unauthorized

> The user doesn't have permissions. 
  

## 403 Forbidden

> You are not allowed to see projects. 
  

## 422 Unprocessable Content

> Cannot process the request. the sortBy field is incorrect. 
  

## 500 Internal Server Error

> Error occurred while processing the request.

# Description

List the projects of a company, using service account toke.

# Response

## 200 OK

The response is an array of objects where each object contains the information of each project.

```json theme={null}
{
    "totalCount": 9082,
    "projects": [
        {
            "_id": "667ae984645bfbxxxxxeda46",
            "title": "Conjoint build",
            "ownerId": "62015f7aaxxxxxxxxxx87eab",
            "createdAt": "2024-06-25T16:00:04.169Z",
            "updatedAt": "2024-06-25T16:38:39.399Z",
            "id": "667ae984645bfbxxxxxeda46",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a9498645bfbxxxxxe47c6",
            "title": "asd12",
            "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
            "createdAt": "2024-06-25T09:57:44.899Z",
            "updatedAt": "2024-06-25T10:05:24.091Z",
            "id": "667a9498645bfbxxxxxe47c6",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a86e6645bfbxxxxxe2f66",
            "title": "asd1",
            "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
            "createdAt": "2024-06-25T08:59:18.029Z",
            "updatedAt": "2024-06-25T09:24:08.371Z",
            "id": "667a86e6645bfbxxxxxe2f66",
            "totalQuestionsCount": 0
        },
        {
            "_id": "667a8386645bfbxxxxxe2976",
            "title": "conjoint price",
            "ownerId": "630660207xxxxxxxxxx13fbb",
            "createdAt": "2024-06-25T08:44:54.322Z",
            "updatedAt": "2024-06-25T08:50:11.297Z",
            "id": "667a8386645bfbxxxxxe2976",
            "totalQuestionsCount": 0
        }
    ]
}

```

where:

* `totalCount`: total projects within your company.

* `projects`: list of projects data.

* `projects[index]`

  * `_id or id`: Id of the project.

  * `title`: name/title or the project,

  * `ownerId`: userId of the owner of the project.

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

  * `updatedAt`: Date of the last update of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.

  * `totalQuestionsCount:` Number of answers the project has.

## 401 Unauthorized

> The user doesn't have permissions.

## 403 Forbidden

> You are not allowed to see projects.

## 422 Unprocessable Content

> Cannot process the request. the sortBy field is incorrect.

## 500 Internal Server Error

> Error occurred while processing the request.

##### Query Parameters

| Parameter | Description | Required | Example |
| --------- | ----------- | -------- | ------- |
| `offset`  | —           | No       | —       |
| `limit`   | —           | No       | —       |
| `sortBy`  | —           | No       | —       |
| `order`   | —           | No       | —       |


## OpenAPI

````yaml GET /projects-api/v2/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/projects:
    get:
      summary: List projects
      description: >-
        # Description


        List the projects of a company, using service account toke.


        # Response


        ## 200 OK


        The response is an array of objects where each object contains the
        information of each project.


        ```json

        {
            "totalCount": 9082,
            "projects": [
                {
                    "_id": "667ae984645bfbxxxxxeda46",
                    "title": "Conjoint build",
                    "ownerId": "62015f7aaxxxxxxxxxx87eab",
                    "createdAt": "2024-06-25T16:00:04.169Z",
                    "updatedAt": "2024-06-25T16:38:39.399Z",
                    "id": "667ae984645bfbxxxxxeda46",
                    "totalQuestionsCount": 0
                },
                {
                    "_id": "667a9498645bfbxxxxxe47c6",
                    "title": "asd12",
                    "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
                    "createdAt": "2024-06-25T09:57:44.899Z",
                    "updatedAt": "2024-06-25T10:05:24.091Z",
                    "id": "667a9498645bfbxxxxxe47c6",
                    "totalQuestionsCount": 0
                },
                {
                    "_id": "667a86e6645bfbxxxxxe2f66",
                    "title": "asd1",
                    "ownerId": "65e1d0bbdxxxxxxxxxxa91db",
                    "createdAt": "2024-06-25T08:59:18.029Z",
                    "updatedAt": "2024-06-25T09:24:08.371Z",
                    "id": "667a86e6645bfbxxxxxe2f66",
                    "totalQuestionsCount": 0
                },
                {
                    "_id": "667a8386645bfbxxxxxe2976",
                    "title": "conjoint price",
                    "ownerId": "630660207xxxxxxxxxx13fbb",
                    "createdAt": "2024-06-25T08:44:54.322Z",
                    "updatedAt": "2024-06-25T08:50:11.297Z",
                    "id": "667a8386645bfbxxxxxe2976",
                    "totalQuestionsCount": 0
                }
            ]
        }

         ```

        where:


        - `totalCount`: total projects within your company.
            
        - `projects`: list of projects data.
            
        - `projects[index]`
            
            - `_id or id`: Id of the project.
                
            - `title`: name/title or the project,
                
            - `ownerId`: userId of the owner of the project.
                
            - `createdAt`: Date of creation of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
                
            - `updatedAt`: Date of the last update of the project in the format `YYYY-MM-DDTHH:mm:ss.SSSZ`.
                
            - `totalQuestionsCount:` Number of answers the project has.
                

        ## 401 Unauthorized


        > The user doesn't have permissions. 
          

        ## 403 Forbidden


        > You are not allowed to see projects. 
          

        ## 422 Unprocessable Content


        > Cannot process the request. the sortBy field is incorrect. 
          

        ## 500 Internal Server Error


        > Error occurred while processing the request.
      operationId: list-projects-get-projects-api-v2-projects
      parameters:
        - name: Authorization
          in: header
          required: true
          description: Authorization token
          schema:
            type: string
        - name: offset
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: string
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
        - name: order
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: List projects
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
              example:
                - projectId: 5e11514fbd816803d1be5e50
                  project:
                    createdAt: '2020-01-05T03:00:31.006Z'
                    updatedAt: '2020-01-05T06:25:31.098Z'
                    title: Logic + Cond
                    status: published
                    stats:
                      questions:
                        totalCount: 5
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e11514fbd816803d1be5e50
                - projectId: 5e3c833d5012fa0099725b1c
                  project:
                    createdAt: '2020-02-06T21:21:01.243Z'
                    updatedAt: '2020-10-30T22:33:45.040Z'
                    title: Full
                    status: published
                    stats:
                      questions:
                        totalCount: 3
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e3c833d5012fa0099725b1c
                - projectId: 5e7d179a9ba2dd0010f7f6ca
                  project:
                    createdAt: '2020-03-26T20:59:06.924Z'
                    updatedAt: '2020-03-26T21:01:29.543Z'
                    title: Concept Test test
                    status: published
                    stats:
                      questions:
                        totalCount: 4
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e7d179a9ba2dd0010f7f6ca
                - projectId: 5e8b5b99b009f10012685bfe
                  project:
                    createdAt: '2020-04-06T16:40:57.266Z'
                    updatedAt: '2020-04-06T16:52:03.954Z'
                    title: grid piped
                    status: published
                    stats:
                      questions:
                        totalCount: 3
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e8b5b99b009f10012685bfe
                - projectId: 5e8b6499b009f10012685c0c
                  project:
                    createdAt: '2020-04-06T17:19:21.810Z'
                    updatedAt: '2020-04-06T17:19:21.810Z'
                    title: sig-1588
                    status: draft
                    stats:
                      questions:
                        totalCount: 0
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e8b6499b009f10012685c0c
                - projectId: 5e8df1ebb009f10012685c70
                  project:
                    createdAt: '2018-05-02T16:21:33.333Z'
                    updatedAt: '2020-04-08T17:55:21.885Z'
                    title: Shopper Trends & Analysis test 8 abril
                    status: published
                    stats:
                      totalResponsesCount: 269
                      totalQuestionsCount: 54
                      totalTimeToComplete: 219117
                      questions:
                        totalCount: 54
                        contactInfoRelatedItemsCount: 0
                    id: 5e8df1ebb009f10012685c70
                - projectId: 5e8f7e19b009f1001268835b
                  project:
                    createdAt: '2020-04-09T19:57:13.735Z'
                    updatedAt: '2020-04-09T22:03:25.862Z'
                    title: sig-1547
                    status: draft
                    stats:
                      questions:
                        totalCount: 1
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e8f7e19b009f1001268835b
                - projectId: 5e8f8326b009f10012688363
                  project:
                    createdAt: '2020-04-09T20:18:46.948Z'
                    updatedAt: '2020-04-09T21:31:59.879Z'
                    title: SIG-1547
                    status: draft
                    stats:
                      questions:
                        totalCount: 0
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e8f8326b009f10012688363
                - projectId: 5e8f9aadb009f10012688367
                  project:
                    createdAt: '2020-04-09T21:59:09.654Z'
                    updatedAt: '2020-04-09T21:59:16.575Z'
                    title: sig1547
                    status: draft
                    stats:
                      questions:
                        totalCount: 1
                        contactInfoRelatedItemsCount: 0
                      totalResponsesCount: 0
                      totalTimeToComplete: 0
                    id: 5e8f9aadb009f10012688367
        '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.

````