> For the complete documentation index, see [llms.txt](https://docs.userlane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.userlane.com/developers/analytics-api/getting-started-with-survey-responses.md). Agents can also search and read this documentation through its [MCP server](https://docs.userlane.com/~gitbook/mcp).

# Getting started with Survey responses

All requests go to `https://api.userlane.com/analytics`. For pagination, sorting, empty values, and errors that apply to every Analytics API endpoint, see [Using the Analytics API](https://docs.userlane.com/developers/analytics-api/using-the-analytics-api.md).

## Typical use cases

* **Feature-level satisfaction** — Track CSAT for individual features or workflows over time.
* **Post-task feedback** — Measure whether users felt successful after completing a key flow.
* **Comment mining** — Pull free-text comments into your BI tool or LLM pipeline to surface themes.

## Enriching with user attributes

`user.applicationUserId` is the join key back to your own user system. To answer segment-level questions (satisfaction by role, region, licence type), join survey responses with your customer data warehouse on `applicationUserId`. To enrich with Userlane-side attributes (first seen, last seen, custom attributes), use the [Enduser data API](https://github.com/Userlane/developer-docs/tree/main/docs/core-api/getting-started-with-user-data.md) (Core API).

To correlate satisfaction with actual product usage, join survey responses with the Tags API (feature interactions) or Guide progress API (onboarding completion) on `user.id`.

## Endpoint

`GET /public/surveys/property_id/{property_id}/survey_id/{survey_id}/responses`

## Path Parameters

| Parameter     | Description                                        |
| ------------- | -------------------------------------------------- |
| `property_id` | Your Userlane property ID (lowercase alphanumeric) |
| `survey_id`   | The ID of the survey to retrieve responses for     |

## Query Parameters

### Date Range

| Parameter | Default  | Description                                                                                           |
| --------- | -------- | ----------------------------------------------------------------------------------------------------- |
| `start`   | —        | Start of the date range. Accepts ISO date (`2024-01-01`) or ISO datetime (`2024-01-01T00:00:00.000Z`) |
| `end`     | —        | End of the date range. Accepts ISO date (`2024-12-31`) or ISO datetime (`2024-12-31T23:59:59.999Z`)   |
| `type`    | `custom` | Type of date range (informational)                                                                    |

### Pagination

| Parameter | Default | Description                                 |
| --------- | ------- | ------------------------------------------- |
| `page`    | `1`     | Page number                                 |
| `limit`   | `1000`  | Number of records per page, from 1 to 5,000 |

### Filtering

| Parameter     | Default                 | Description                                                                         |
| ------------- | ----------------------- | ----------------------------------------------------------------------------------- |
| `commentOnly` | `false`                 | When `true`, only return responses that include a comment                           |
| `score`       | `1`, `2`, `3`, `4`, `5` | Filter by score value. Repeat the parameter for multiple values: `?score=4&score=5` |

### Sorting

| Parameter | Default      | Description                                                                                                                                                            |
| --------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sort`    | `-timestamp` | Sort direction and field. Prefix with `+` for ascending or `-` for descending. Valid fields: `timestamp`, `score`. Example: `-timestamp` sorts by timestamp descending |

## Response

**`data`** — a paginated list of survey responses, each with:

| Field                    | Description                                                           |
| ------------------------ | --------------------------------------------------------------------- |
| `timestamp`              | ISO 8601 timestamp of the response (UTC, e.g. `2024-01-15T10:30:00Z`) |
| `score`                  | Survey score (1–5)                                                    |
| `comment`                | Free-text comment submitted with the response (optional)              |
| `user.id`                | Userlane user ID                                                      |
| `user.applicationUserId` | Client-defined user identifier (optional)                             |

**`pagination`** — standard pagination envelope:

| Field           | Description                |
| --------------- | -------------------------- |
| `page`          | Current page number        |
| `limit`         | Number of records per page |
| `totalElements` | Total number of records    |
| `totalPages`    | Total number of pages      |

## Limitations

**Pagination**: 1,000 records per page by default, 5,000 at most (set with `limit`). Use `page` to get the next pages.

**Pull cadence**: Once every 24 hours is recommended. Pulling more frequently won't give you fresher data and may trigger rate limiting.

**Rate Limiting:** Userlane can limit the frequency of calls to ensure Quality of Service.

## Authentication

This API is protected and requires authentication by a Bearer Token. You can generate your token under **Settings > API Token** in the Userlane Portal.

## Next steps

* Try a request from the API reference for `/public/surveys/property_id/{property_id}/survey_id/{survey_id}/responses`
* To enrich survey data with user attributes, see [Getting started with Enduser data](https://github.com/Userlane/developer-docs/tree/main/docs/core-api/getting-started-with-user-data.md) (Core API)
* To correlate satisfaction with feature usage, see [Getting started with Tags](https://docs.userlane.com/developers/analytics-api/getting-started-with-tags.md)
* To correlate satisfaction with onboarding completion, see [Getting started with Guide progress](https://docs.userlane.com/developers/analytics-api/getting-started-with-guide-progress.md)
* For product-wide sentiment beyond individual surveys, see [Getting started with NPS responses](https://docs.userlane.com/developers/analytics-api/getting-started-with-nps-responses.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.userlane.com/developers/analytics-api/getting-started-with-survey-responses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
