> 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-nps-responses.md). Agents can also search and read this documentation through its [MCP server](https://docs.userlane.com/~gitbook/mcp).

# Getting started with NPS 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

* **Sentiment trends** — Is NPS improving or declining over time?
* **Promoters vs detractors** — Who are your champions, and who's at risk?
* **Comment mining** — Pull free-text comments into your BI tool or LLM pipeline to surface themes.
* **Sentiment by segment** — When joined with your own user attributes, see which roles, regions, or business units are happiest.

## Enriching with user attributes

`user.applicationUserId` is the join key back to your own user system. To answer segment-level questions (NPS by role, region, licence type), join NPS 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 sentiment with actual product usage, join NPS responses with the Tags API (feature interactions) or Guide progress API (onboarding completion) on `user.id`.

## Endpoint

`GET /public/nps/property_id/{property_id}/responses`

## Path Parameters

| Parameter     | Description                                        |
| ------------- | -------------------------------------------------- |
| `property_id` | Your Userlane property ID (lowercase alphanumeric) |

## 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                                                             |
| `category`    | `promoters`, `passives`, `detractors` | Filter responses by NPS category. Repeat the parameter for multiple values: `?category=promoters&category=detractors` |

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

## NPS Categories

| Category     | Score Range |
| ------------ | ----------- |
| `promoters`  | 9–10        |
| `passives`   | 7–8         |
| `detractors` | 0–6         |

## Response

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

| Field                    | Description                                                           |
| ------------------------ | --------------------------------------------------------------------- |
| `timestamp`              | ISO 8601 timestamp of the response (UTC, e.g. `2024-01-15T10:30:00Z`) |
| `score`                  | NPS score (0–10)                                                      |
| `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/nps/property_id/{property_id}/responses`
* To enrich NPS 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 sentiment with feature usage, see [Getting started with Tags](https://docs.userlane.com/developers/analytics-api/getting-started-with-tags.md)
* To correlate sentiment with onboarding completion, see [Getting started with Guide progress](https://docs.userlane.com/developers/analytics-api/getting-started-with-guide-progress.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-nps-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.
