---
updatedAt: 2025-09-24T20:45:07.000Z
agentTools:
  projectIndex: https://docs.smartsurvey.io/v1/llms.txt
---

# surveys

Get All Surveys

## Sort By Multiple Fields

To sort by multiple fields, you can add the "sort\_by" parameter more than once in the query. The following example will sort the surveys by the survey title in ascending order and date created in descending.

```toml URL
https://api.smartsurvey.io/v1/surveys?sort_by=title,asc&sort_by=date_created,desc
```

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.smartsurvey.io/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/surveys": {
      "get": {
        "summary": "surveys",
        "description": "Get All Surveys",
        "operationId": "surveys",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Which page of surveys to return.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "description": "Number of surveys to return per page",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Field used to sort returned survey list: ‘id’, ‘title’, 'date_created’, or 'responses’. Add a comma and 'asc' or 'desc' to specify the sort order.",
            "schema": {
              "type": "string",
              "default": "date_created,desc"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "You can add more than one sort_by to the querystring to sort by multiple fields.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  {\n    \"id\": 123,\n    \"type\": \"survey\",\n    \"title\": \"My Fresh New Survey\",\n    \"nickname\": \"\",\n    \"date_created\": \"2016-05-30T00:51:14Z\",\n    \"date_modified\": \"2016-05-30T01:10:38Z\",\n    \"responses\": 0,\n    \"status\": \"closed\",\n    \"survey_url\": \"http://www.smartsurvey.co.uk/s/SF6VF/\",\n    \"href\": \"https://api.smartsurvey.io/v1/surveys/223714\",\n    \"href_responses\": \"https://api.smartsurvey.io/v1/surveys/223714/responses\"\n  }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "example": 123,
                        "default": 0
                      },
                      "type": {
                        "type": "string",
                        "example": "survey"
                      },
                      "title": {
                        "type": "string",
                        "example": "My Fresh New Survey"
                      },
                      "nickname": {
                        "type": "string",
                        "example": ""
                      },
                      "date_created": {
                        "type": "string",
                        "example": "2016-05-30T00:51:14Z"
                      },
                      "date_modified": {
                        "type": "string",
                        "example": "2016-05-30T01:10:38Z"
                      },
                      "responses": {
                        "type": "integer",
                        "example": 0,
                        "default": 0
                      },
                      "status": {
                        "type": "string",
                        "example": "closed"
                      },
                      "survey_url": {
                        "type": "string",
                        "example": "http://www.smartsurvey.co.uk/s/SF6VF/"
                      },
                      "href": {
                        "type": "string",
                        "example": "https://api.smartsurvey.io/v1/surveys/223714"
                      },
                      "href_responses": {
                        "type": "string",
                        "example": "https://api.smartsurvey.io/v1/surveys/223714/responses"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```