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

# API quickstart

> Create a Novella API key and use cURL to list published surveys and retrieve completed survey responses.

## Create an API key

As a workspace owner or admin, open [Novella's developer settings](https://app.novellahq.com/settings/developers), then select **Create API key**. Give the key a **Name** and optionally add a **Description**. Select `surveys:read` and `responses:read` to run both examples.

Under **Survey access**, keep **Selected surveys** (the default) and choose the surveys the integration needs, or select **All workspace surveys** if it needs workspace-wide access. Confirm with your current password, then copy the key into your secret manager. Novella shows the secret once. Load it into your shell as `NOVELLA_API_KEY` for the examples below.

## List surveys

```bash theme={"system"}
curl -sS --fail-with-body 'https://api.novellahq.com/v1/surveys?limit=10' \
  -H "Authorization: Bearer ${NOVELLA_API_KEY}" \
  -H 'Accept: application/json'
```

A successful request returns HTTP 200. Here is an example with one survey.

```json theme={"system"}
{
  "data": [
    {
      "id": "35cdd1d7-cb61-40aa-bdfa-7da240617703",
      "name": "Customer feedback",
      "type": "csat",
      "status": "published",
      "created_at": "2026-09-01T10:00:00Z",
      "updated_at": "2026-09-30T18:00:00Z",
      "questions": [
        {
          "key": "rating",
          "type": "rating",
          "label": "How satisfied are you?",
          "required": true,
          "rating_scale": {
            "minimum": 1,
            "maximum": 5,
            "step": 1
          }
        },
        {
          "key": "comment",
          "type": "text",
          "label": "Anything else?",
          "required": false
        }
      ]
    }
  ],
  "pagination": {
    "limit": 10,
    "has_more": false,
    "next_cursor": null
  },
  "meta": {
    "request_id": "req_example_surveys"
  }
}
```

If `data` is empty, check that your workspace has a published survey the key can access. Add `status=all` to include archived surveys. See the [List surveys endpoint](https://docs.novellahq.com/api-reference/surveys/list-visible-surveys.md) for available filters.

## Read responses for a survey

Copy the `id` of the survey you want from the `data` array above. Replace the sample UUID in `SURVEY_ID` with the ID from your own workspace, then run the request.

```bash theme={"system"}
SURVEY_ID='35cdd1d7-cb61-40aa-bdfa-7da240617703'

curl -sS --fail-with-body --get 'https://api.novellahq.com/v1/responses' \
  -H "Authorization: Bearer ${NOVELLA_API_KEY}" \
  --data-urlencode "survey_id=${SURVEY_ID}" \
  --data-urlencode 'completion_status=completed' \
  --data-urlencode 'limit=10'
```

A successful request returns HTTP 200 with completed responses for that survey. Each result's `survey_id` matches the value you passed in the request. If `data` is empty, the survey has no completed responses visible to your key.

```json theme={"system"}
{
  "data": [
    {
      "id": "d6edda17-2837-42ae-a7f4-28dbf62e2791",
      "survey_id": "35cdd1d7-cb61-40aa-bdfa-7da240617703",
      "respondent_id": "df912d15-a2cb-4b8e-9f2e-f267d74a57f1",
      "completion_status": "completed",
      "score": 5,
      "tags": [],
      "comment": "Helpful support team.",
      "created_at": "2026-09-30T17:59:00Z",
      "updated_at": "2026-09-30T18:00:00Z",
      "submitted_at": "2026-09-30T18:00:00Z"
    }
  ],
  "pagination": {
    "limit": 10,
    "has_more": false,
    "next_cursor": null
  },
  "meta": {
    "request_id": "req_example_responses"
  }
}
```

See the [List responses endpoint](https://docs.novellahq.com/api-reference/responses/list-partial-and-completed-responses.md) for more filters. Follow [the pagination guide](https://docs.novellahq.com/pagination.md) to continue fetching results. If a request fails, use the [status and error code](https://docs.novellahq.com/errors.md) to decide whether to correct the request or retry.

## Filter feedback by rating and tag

This example finds completed responses with a rating of 2 or lower and the exact tag `Slow performance`.

```bash theme={"system"}
curl -sS --fail-with-body --get 'https://api.novellahq.com/v1/responses' \
  -H "Authorization: Bearer ${NOVELLA_API_KEY}" \
  --data-urlencode "survey_id=${SURVEY_ID}" \
  --data-urlencode 'completion_status=completed' \
  --data-urlencode 'rating_max=2' \
  --data-urlencode 'tag=Slow performance'
```

Use `rating` for an exact match or combine `rating_min` and `rating_max` for an inclusive range. Filtering by `channel` also requires `responses:context:read`.


## Related topics

- [Novella API](https://docs.novellahq.com/index.md)
- [Get API version metadata](https://docs.novellahq.com/api-reference/system/get-api-version-metadata.md)
- [Errors and rate limits](https://docs.novellahq.com/errors.md)
- [Check process liveness](https://docs.novellahq.com/api-reference/system/check-process-liveness.md)
- [Pagination and filtering](https://docs.novellahq.com/pagination.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.