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

# Get All Live Surveys

> Retrieve a list of all live surveys based on filtering criteria.

## Get All Live Surveys

Retrieve a list of all live surveys based on filtering criteria.

> **Note:** The `rows` parameter accepts a maximum value of **500** surveys per page. The fields `loi` and `ir` are deprecated. Please use `length_of_interview` and `incidence_rate` instead.

### Endpoint

```http theme={null}
POST /surveys
```

### Headers

```json theme={null}
{
  "publisher-authentication-key": "your_project_secret_key"
}
```

> **Note:** The `publisher-authentication-key` header corresponds to your **Secret Key**. The `authorizationKey` in the request body corresponds to your **Web API Key**.

### Request Body

```json theme={null}
{
  "authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU",
  "country": "US",
  "language": "English",
  "lengthOfInterviewGTE": 1,
  "lengthOfInterviewLTE": 5,
  "collectPII": false,
  "rows": 50,
  "page": 1,
  "CPIGTE": 1,
  "CPILTE": 5,
  "surveyGroupExists": false,
  "incidenceRateGTE": 1,
  "incidenceRateLTE": 25
}
```

### Response

```json theme={null}
{
  "success": true,
  "surveys": [
    {
      "_id": "691af562a929b3a5a2232679",
      "cost_per_interview": {
        "value": 1.07,
        "currency_code": "USD"
      },
      "surveyNumber": 17633744316785364,
      "survey_number": 17633744316785364,
      "length_of_interview": 10,
      "incidence_rate": 10,
      "cpi": 1.07,
      "country": "United States of America",
      "countryCode": "US",
      "country_code": "US",
      "required_completes": 13,
      "overall_completes": 0,
      "revenue_per_click": 0,
      "survey_created_date": "2025-11-17T10:24:10.829Z",
      "survey_last_updated_date": "2025-11-17T10:24:10.829Z"
    },
    {
      "_id": "691af51da929b31134b52678",
      "cost_per_interview": {
        "value": 1.28,
        "currency_code": "USD"
      },
      "surveyNumber": 17633743620135364,
      "survey_number": 17633743620135364,
      "length_of_interview": 35,
      "incidence_rate": 20,
      "cpi": 1.28,
      "country": "United States of America",
      "countryCode": "US",
      "country_code": "US",
      "required_completes": 49,
      "overall_completes": 0,
      "revenue_per_click": 0,
      "survey_created_date": "2025-11-17T10:24:10.829Z",
      "survey_last_updated_date": "2025-11-17T10:24:10.829Z"
    },
    {
      "_id": "691af51da92923453sb52677",
      "cost_per_interview": {
        "value": 1.28,
        "currency_code": "USD"
      },
      "surveyNumber": 17633743615055360,
      "survey_number": 17633743615055360,
      "length_of_interview": 35,
      "incidence_rate": 20,
      "cpi": 1.28,
      "country": "United States of America",
      "countryCode": "US",
      "country_code": "US",
      "required_completes": 50,
      "overall_completes": 0,
      "revenue_per_click": 0,
      "survey_created_date": "2025-11-17T10:24:10.829Z",
      "survey_last_updated_date": "2025-11-17T10:24:10.829Z"
    }
  ],
  "surveysCount": 3,
  "pagination": {
    "totalDocuments": 26654,
    "rows": 3,
    "page": 1,
    "totalPages": 8885
  },
  "projectName": "New Campaign 007",
  "projectNumber": 10000092,
  "organisation": "Mirats Quanto DIY"
}
```

### Error Response

```json theme={null}
{
  "message": "internal server error",
  "code": 500,
  "success": false
}
```


## OpenAPI

````yaml POST /surveys
openapi: 3.0.0
info:
  title: Mirats Quanto Publisher API
  description: API documentation for Mirats Quanto Publisher services
  version: 1.0.0
servers:
  - url: https://api.publisher.miratsquanto.com/api/v1/publisher
    description: Publisher API Base URL
security:
  - publisher-authentication-key: []
paths:
  /surveys:
    post:
      tags:
        - Surveys
      summary: Get All Live Surveys
      description: Retrieve a list of all live surveys based on filtering criteria.
      operationId: getAllLiveSurveys
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetAllSurveysRequest'
      responses:
        '200':
          description: Successful response with list of live surveys
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  surveys:
                    type: array
                    items:
                      $ref: '#/components/schemas/Survey'
                  surveysCount:
                    type: integer
                    description: Number of surveys returned in this response
                    example: 3
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                  projectName:
                    type: string
                    example: New Campaign 007
                  projectNumber:
                    type: integer
                    example: 10000092
                  organisation:
                    type: string
                    example: Mirats Quanto DIY
                required:
                  - success
                  - surveys
                  - surveysCount
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    GetAllSurveysRequest:
      type: object
      description: >-
        Payload for retrieving live surveys. Includes your Web API Key plus
        optional filtering criteria.
      properties:
        authorizationKey:
          type: string
          description: Web API Key (maps to authorizationKey field in SDK).
          example: DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU
        country:
          type: string
          description: ISO 2-letter country code (e.g., US, IN).
          example: US
        language:
          type: string
          description: Language name for survey targeting.
          example: English
        lengthOfInterviewGTE:
          type: integer
          description: Minimum length of interview in minutes.
          example: 1
        lengthOfInterviewLTE:
          type: integer
          description: Maximum length of interview in minutes.
          example: 5
        collectPII:
          type: boolean
          description: >-
            Only return surveys that collect personally identifiable
            information.
          example: false
        rows:
          type: integer
          description: Number of surveys to return per page (1-500).
          minimum: 1
          maximum: 500
          example: 50
        page:
          type: integer
          description: Page number for pagination (starts from 1).
          minimum: 1
          example: 1
        CPIGTE:
          type: number
          format: float
          description: Minimum CPI value.
          example: 1
        CPILTE:
          type: number
          format: float
          description: Maximum CPI value.
          example: 5
        surveyGroupExists:
          type: boolean
          description: Filter by whether a survey group exists.
          example: false
        incidenceRateGTE:
          type: integer
          description: Minimum incidence rate.
          example: 1
        incidenceRateLTE:
          type: integer
          description: Maximum incidence rate.
          example: 25
      required:
        - authorizationKey
        - country
    Survey:
      type: object
      properties:
        _id:
          type: string
          example: 691af562a929b3a5a2232679
        cost_per_interview:
          type: object
          properties:
            value:
              type: number
              format: float
              example: 1.07
            currency_code:
              type: string
              example: USD
          required:
            - value
            - currency_code
        surveyNumber:
          type: integer
          example: 17633744316785364
        survey_number:
          type: integer
          example: 17633744316785364
        loi:
          type: integer
          example: 10
          deprecated: true
          description: >-
            Deprecated: Use 'length_of_interview' instead. This field will be
            removed in a future version.
        length_of_interview:
          type: integer
          example: 10
          description: Length of interview in minutes
        ir:
          type: integer
          example: 10
          deprecated: true
          description: >-
            Deprecated: Use 'incidence_rate' instead. This field will be removed
            in a future version.
        incidence_rate:
          type: integer
          example: 10
          description: Incidence rate as a percentage
        cpi:
          type: number
          format: float
          example: 1.28
        country:
          type: string
          example: United States of America
        countryCode:
          type: string
          example: US
        country_code:
          type: string
          example: US
        required_completes:
          type: integer
          example: 13
        overall_completes:
          type: integer
          example: 0
        revenue_per_click:
          type: number
          format: float
          example: 0
        survey_created_date:
          type: string
          format: date-time
          description: ISO 8601 date-time when the survey was created
          example: '2025-11-17T10:24:10.829Z'
        survey_last_updated_date:
          type: string
          format: date-time
          description: ISO 8601 date-time when the survey was last updated
          example: '2025-11-17T10:24:10.829Z'
      required:
        - _id
        - surveyNumber
        - length_of_interview
        - incidence_rate
        - cpi
        - countryCode
    Pagination:
      type: object
      properties:
        totalDocuments:
          type: integer
          example: 26654
        rows:
          type: integer
          example: 3
        page:
          type: integer
          example: 1
        totalPages:
          type: integer
          example: 8885
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          example: internal server error
        code:
          type: integer
          example: 500
        success:
          type: boolean
          example: false
      required:
        - message
        - code
        - success
  securitySchemes:
    publisher-authentication-key:
      type: apiKey
      in: header
      name: publisher-authentication-key
      description: >-
        Send your Secret Key using the `publisher-authentication-key` header.
        This header is required for every request.

````