> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.crehana.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.crehana.com/_mcp/server.

# Get Learning Course Survey Report

GET https://www.crehana.com/api/v5/rest/org/{organization_slug}/reports/learning/course-surveys/

Learning report: answers to the course satisfaction surveys.

One row per answer: the course, the question (`question_type`
`evaluative`, `multiple` or `open`, and whether it is mandatory), the
answer as given and who gave it. Answers of deleted enrollments are left
out. Rows come ordered by `answered_at`, newest first; page through them
with `cursor` / `next_cursor`.

Reference: https://developer.crehana.com/api-reference/endpoints/reports/get-learning-course-survey-report

## Authentication

- `Api-Key` header (required) — API key of the organization. Always sent together with the `Secret-Access` header.

## Servers

- `https://www.crehana.com` (Production, default)
- `https://qa.creha.co` (QA)

## Request

### Path parameters

- `organization_slug` (string, required)

### Query parameters

- `course_id` (list of integer, optional) — Learning course ids to filter by. Repeat the parameter for several courses (`course_id=1&course_id=2`), up to 100. A course that does not belong to the organization simply matches no row.
- `user_email` (string, optional) — Exact match on the user email.
- `document` (string, optional) — Exact match on the identity document loaded in the organization (`user_document`). Organizations that keep no documents match no row.
- `question_type` (enum, optional) — Only answers to this type of question.
  - Allowed values: `evaluative`, `multiple`, `open`
- `from_date` (string, optional) — Start of the range, in YYYY-MM-DD format. Inclusive. With no `to_date` the range stays open going forward. Applies to the date of the survey answer (`answered_at`), interpreted in UTC — the same zone the report returns that field in.
- `to_date` (string, optional) — End of the range, in YYYY-MM-DD format. Inclusive: the whole day is covered, not just its midnight. For a single day, send the same date in `from_date` and in `to_date`. Applies to the date of the survey answer (`answered_at`), interpreted in UTC — the same zone the report returns that field in.
- `limit` (integer, optional, default: 1000) — Rows per page, up to 1000. Defaults to 1000 when omitted.
- `cursor` (string, optional) — Cursor for the next page. Take it from `next_cursor` in the previous response and send it back unchanged; it is opaque. Omit it for the first page.

## Response

### 200

Successful Response

- `results` (list of LearningCourseSurveyAnswerReport, required)
- `total` (integer, optional) — Rows matching the filters, ignoring pagination.
- `next_cursor` (string, optional) — Cursor of the next page. Send it back unchanged in `cursor`; null on the last page.
- `has_next_page` (boolean, optional, default: false) — Whether there is a page after this one.

## Errors

### 400 Bad Request Error

Bad Request

- `message` (string, required)
- `errors` (list of string, required)
- `datetime` (string, optional)

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### LearningCourseSurveyAnswerReport

One row per answer of a course satisfaction survey.

- `answer_id` (string, required) — Unique id of the answer.
- `survey_id` (integer, optional) — Survey id.
- `course_id` (integer, optional) — Learning course id.
- `course_title` (string, optional)
- `user_id` (integer, optional) — Learning user id — the same `user_id` the other `/reports/learning/…` reports use.
- `user_full_name` (string, optional)
- `user_email` (string, optional)
- `user_document` (string, optional) — Identity document as loaded in the organization. Always a string, so leading zeros are kept. Null when the person has none.
- `question_id` (integer, optional) — Question id within its question type: together with `question_type` it identifies the question.
- `question` (string, optional) — Question text.
- `question_type` (enum, optional) — `evaluative` (rating scale), `multiple` (multiple choice) or `open` (free text).
  - Allowed values: `evaluative`, `multiple`, `open`
- `is_mandatory` (boolean, optional, default: false) — Whether the question is mandatory.
- `answer` (string, optional) — The answer as given: the number chosen in an evaluative question, the text of an open one or the options chosen in a multiple choice one.
- `answered_at` (datetime, optional) — Date of the answer, UTC. Rows come newest first.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### ValidationErrorLocItems

- string
- integer

## Examples

**Response**

```json
{
  "results": [
    {
      "answer_id": "string",
      "survey_id": 1,
      "course_id": 1,
      "course_title": "string",
      "user_id": 1,
      "user_full_name": "string",
      "user_email": "string",
      "user_document": "string",
      "question_id": 1,
      "question": "string",
      "question_type": "evaluative",
      "is_mandatory": false,
      "answer": "string",
      "answered_at": "2024-01-15T09:30:00Z"
    }
  ],
  "total": 1,
  "next_cursor": "string",
  "has_next_page": false
}
```

**SDK Code**

```python
import requests

url = "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/"

headers = {
    "Secret-Access": "Secret-Access",
    "Api-Key": "<apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/';
const options = {
  method: 'GET',
  headers: {'Secret-Access': 'Secret-Access', 'Api-Key': '<apiKey>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Secret-Access", "Secret-Access")
	req.Header.Add("Api-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Secret-Access"] = 'Secret-Access'
request["Api-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/")
  .header("Secret-Access", "Secret-Access")
  .header("Api-Key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/', [
  'headers' => [
    'Api-Key' => '<apiKey>',
    'Secret-Access' => 'Secret-Access',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/");
var request = new RestRequest(Method.GET);
request.AddHeader("Secret-Access", "Secret-Access");
request.AddHeader("Api-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Secret-Access": "Secret-Access",
  "Api-Key": "<apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://www.crehana.com/api/v5/rest/org/organization_slug/reports/learning/course-surveys/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```