---
updatedAt: 2025-06-09T22:41:49.000Z
agentTools:
  projectIndex: https://docs.zenloop.com/llms.txt
---

# Get Summary of Survey

This endpoint is used for fetching basic survey data and NPS scores.

```json Example request
{
  "date_shortcut": "all_time"
}
```

## Response attributes

| Attribute                        |  Type  | Description                                                                             |
| :------------------------------- | :----: | :-------------------------------------------------------------------------------------- |
| **survey**                       | object | Survey information data.                                                                |
| survey.**title**                 | string | Survey title.                                                                           |
| surveys.**question**             | string | Survey question.                                                                        |
| survey.**status**                | string | Survey status. One of: `draft`, `active`                                                |
| surveys.**channel\_type**        | string | Survey type. One of: `email`, `email_embed`, `link`, `website_overlay`, `website_embed` |
| survey.**response\_rate**        | string | Survey response rate.                                                                   |
| survey.**public\_hash\_id**      | string | Survey public hash id used to identify survey.                                          |
| survey.**promoters**             | object | Summary data about promoters from survey answers.                                       |
| survey.promoters.**percentage**  | number | Percentage of answers that were promoters.                                              |
| survey.promoters.**delta**       | number | Promoters delta - describing the +/- change for the similar period we measure against.  |
| survey.**passives**              | object | Summary data about passives from survey answers.                                        |
| survey.passives.**percentage**   | number | Percentage of answers that were passives.                                               |
| survey.passives.**delta**        | number | Passives delta - describing the +/- change for the similar period we measure against.   |
| survey.**number\_of\_responses** | number | Number of answers.                                                                      |
| survey.**nps**                   | object | Summary data about NPS from survey answers.                                             |
| survey.nps.**percentage**        | number | The NPS score.                                                                          |
| survey.nps.**delta**             | number | NPS delta - describing the +/- change for the similar period we measure against.        |
| survey.**inserted\_at**          |  date  | Survey creation date.                                                                   |
| survey.**detractors**            | object | Summary data about detractors from survey answers.                                      |
| survey.detractors.**percentage** | number | Percentage of answers that were detractors.                                             |
| survey.detractors.**delta**      | number | Detractors delta - describing the +/- change for the similar period we measure against. |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "external-apps-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.zenloop.com/external_app"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v1/surveys/{survey_id}": {
      "get": {
        "summary": "Get Summary of Survey",
        "description": "This endpoint is used for fetching basic survey data and NPS scores.",
        "operationId": "external-app-get-summary-of-survey",
        "parameters": [
          {
            "name": "survey_id",
            "in": "path",
            "description": "Unique ID of a survey",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "api_key",
            "in": "query",
            "description": "Concatenation of the plugin identifier and a unique user key.",
            "schema": {
              "type": "string",
              "default": "plugin.key"
            }
          },
          {
            "name": "date_shortcut",
            "in": "query",
            "description": "Date range for which we want to fetch answers. Allowed values: `today`, `yesterday`, `last_week`, `last_month`, `last_7_days`, `last_30_days`, `all_time`",
            "schema": {
              "type": "string",
              "default": "all_time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"survey\":\n    \"title\": \"Sample Test Survey\",\n    \"status\": \"active\",\n    \"channel_type\": \"email\",\n    \"response_rate\": \"N/A\",\n    \"public_hash_id\": \"RXpqTHZLTVNYU29nQnNzQ3V1VVgveEdmNTJTK2VheXNtc1lrN2VjOXdGZz0=\",\n    \"promoters\": {\n      \"percentage\": 58.25,\n      \"delta\": 0\n    },\n    \"passives\": {\n      \"percentage\": 30.25,\n      \"delta\": 0\n    },\n    \"number_of_responses\": 3,\n    \"nps\": {\n      \"percentage\": 46.75,\n      \"delta\": 0\n    },\n    \"inserted_at\": \"2016-10-13T13:02:21Z\",\n    \"detractors\": {\n      \"percentage\": 11.5,\n      \"delta\": 0\n    }\n  }\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": 400,\n  \"title\": \"Invalid request body.\",\n  \"links\": {\n    \"documentation\": \"https://docs.zenloop.com/v1.0/reference#get-summary-of-survey\"\n  },\n  \"code\": \"INVALID_REQUEST\",\n  \"details\": [{\n    \"detail\": \"Value \\\"invalid\\\" is not allowed in enum.\",\n    \"pointer\": \"/date_shortcut\"\n  }]\n}\n"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 400,
                      "default": 0
                    },
                    "title": {
                      "type": "string",
                      "example": "Invalid request body."
                    },
                    "links": {
                      "type": "object",
                      "properties": {
                        "documentation": {
                          "type": "string",
                          "example": "https://docs.zenloop.com/v1.0/reference#get-summary-of-survey"
                        }
                      }
                    },
                    "code": {
                      "type": "string",
                      "example": "INVALID_REQUEST"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "detail": {
                            "type": "string",
                            "example": "Value \"invalid\" is not allowed in enum."
                          },
                          "pointer": {
                            "type": "string",
                            "example": "/date_shortcut"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 401,\n    \"code\": \"UNAUTHORIZED\",\n    \"title\": \"Invalid or expired token.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 401,
                          "default": 0
                        },
                        "code": {
                          "type": "string",
                          "example": "UNAUTHORIZED"
                        },
                        "title": {
                          "type": "string",
                          "example": "Invalid or expired token."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 404,\n    \"code\": \"NOT_FOUND\",\n    \"title\": \"Survey not found.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 404,
                          "default": 0
                        },
                        "code": {
                          "type": "string",
                          "example": "NOT_FOUND"
                        },
                        "title": {
                          "type": "string",
                          "example": "Survey not found."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 429,\n    \"code\": \"TOO_MANY_REQUESTS\",\n    \"title\": \"Rate limit exceeded.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 429,
                          "default": 0
                        },
                        "code": {
                          "type": "string",
                          "example": "TOO_MANY_REQUESTS"
                        },
                        "title": {
                          "type": "string",
                          "example": "Rate limit exceeded."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```