Reviews

List, filter, sort, count and fetch the reviews of the apps in your workspace.

After this page you will be able to list reviews with filters and sorting, count them and fetch a single review by id.

Prerequisites: an API key of your workspace with the reviews:read permission (see Authentication), the host https://api.nortly.app and Node.js 20 or later for the example at the end.

The three routes

RouteReturns
GET /api/2026-07/reviewsA page of reviews in data, with meta.pagination (Pagination).
GET /api/2026-07/reviews/countThe number of reviews that match the filters: data is { "count": 7 }.
GET /api/2026-07/reviews/{id}One review in data, or 404.

All three are read-only and need reviews:read. You only see the reviews of the apps in your own workspace.

The Review object

FieldTypeMeaning
idstring<appId>:<reviewId>: the id of the app in Nortly and the id of the review within the app, for example 4815162342:1200345.
appIdstringThe id of the app in Nortly. The appId filter takes the same value.
customerIdstring or nullThe customer the review is linked to (the customerId filter takes the same value). null when it is not linked.
ratinginteger1 to 5.
textstringThe text of the review. An empty string "" when the review has none.
statusstringpublished or deleted.
createdAtstringThe date of the review, YYYY-MM-DD. A calendar date, not a timestamp.
updatedAtstringYYYY-MM-DD: the date of the last restore, otherwise of the last delete, otherwise createdAt. A text edit is not tracked.
{
  "id": "4815162342:1200345",
  "appId": "4815162342",
  "customerId": null,
  "rating": 5,
  "text": "",
  "status": "published",
  "createdAt": "2026-06-12",
  "updatedAt": "2026-06-12"
}

Filters and sorting

The list and the count take the same filters. The count takes nothing else: limit, cursor, sort and sortDirection are only for the list.

ParameterRoutesValuesDefault
statuslist, countpublished, all, deletedpublished
ratinglist, countinteger 1 to 5all ratings
appIdlist, countid of an app, as in the appId fieldall apps
customerIdlist, countcustomer id, as in the customerId fieldall customers
limitlistinteger 1 to 10025
cursorlistthe nextCursor of the previous pagefirst page
sortlistcreatedAt, ratingcreatedAt
sortDirectionlistdesc, ascdesc

Things to know:

  • A filter that matches nothing is not an error: the list is empty and the count is 0.
  • Unknown query parameters are rejected with 422 (code VALIDATION_ERROR), they are not ignored. For example countryCode is not accepted.
  • appId and customerId take up to 128 characters from letters, digits and _ : / . -.
  • With sort=createdAt, ties are broken by app and review id, so pages never overlap.

Common queries

Latest published reviews (this is the default, so no filter is needed):

const url = `${BASE_URL}/api/2026-07/reviews?limit=10`;

Low ratings of one app, lowest first:

const url = `${BASE_URL}/api/2026-07/reviews?appId=4815162342&sort=rating&sortDirection=asc&limit=50`;

Reviews that were deleted:

const url = `${BASE_URL}/api/2026-07/reviews?status=deleted`;

The count per rating is five calls to the count route, one per rating:

const url = `${BASE_URL}/api/2026-07/reviews/count?rating=1&appId=4815162342`;
// { "success": true, "data": { "count": 7 }, "message": "Reviews counted", "meta": { ... } }

Fetching one review

Pass the id of a review from the list. The colon can be sent as is or as %3A:

const url = `${BASE_URL}/api/2026-07/reviews/4815162342:1200345`;

By id you can also read a deleted review; check its status. The answer is 404 with code NOT_FOUND when the review does not exist, when the id is not of the form <appId>:<reviewId>, and when the review belongs to another workspace; the three cases look the same on purpose.

Errors you can meet here

StatuscodeTypical cause
401UNAUTHORIZEDMissing or invalid API key.
403FORBIDDENThe key has no reviews:read permission.
404NOT_FOUNDNo such review in your workspace.
422VALIDATION_ERRORrating=6, limit=500, an unknown parameter, a cursor of another sort. errors says which.
503UNAVAILABLETemporary. Retry with exponential backoff.

All codes are described in Errors.

Next steps

Example

A complete program that prints the distribution of ratings of your published reviews, then fetches the newest low-rated review by id. Run it with NORTLY_API_KEY=<your key> npx tsx reviews.ts.

const BASE_URL = "https://api.nortly.app";
const API_KEY = process.env.NORTLY_API_KEY;

if (!API_KEY) {
  throw new Error("Set NORTLY_API_KEY to an API key with the reviews:read permission");
}

type Review = {
  id: string;
  appId: string;
  customerId: string | null;
  rating: number;
  text: string;
  status: "published" | "deleted";
  createdAt: string;
  updatedAt: string;
};

type Envelope<T> = { success: true; data: T; message: string; meta: { timestamp: string } };
type ErrorResponse = { success: false; message: string; code: string; errors?: string[] };

class ApiError extends Error {
  constructor(
    readonly status: number,
    readonly code: string,
    message: string,
  ) {
    super(message);
  }
}

async function get<T>(path: string, query: Record<string, string> = {}): Promise<T> {
  const url = new URL(`/api/2026-07/${path}`, BASE_URL);
  for (const [name, value] of Object.entries(query)) url.searchParams.set(name, value);

  const response = await fetch(url, { headers: { Authorization: `Bearer ${API_KEY}` } });

  if (response.status === 401) throw new ApiError(401, "UNAUTHORIZED", "API key missing or invalid");
  if (!response.ok) {
    const error = (await response.json()) as ErrorResponse;
    throw new ApiError(response.status, error.code, `${error.message} ${(error.errors ?? []).join("; ")}`.trim());
  }
  return ((await response.json()) as Envelope<T>).data;
}

async function main(): Promise<void> {
  // The count per rating: one call per rating.
  for (const rating of [1, 2, 3, 4, 5]) {
    const { count } = await get<{ count: number }>("reviews/count", { rating: String(rating) });
    console.log(`${rating} star(s): ${count}`);
  }

  // The lowest-rated review: sort by rating, ascending.
  const lowest = await get<Review[]>("reviews", { sort: "rating", sortDirection: "asc", limit: "1" });
  if (lowest.length === 0) {
    console.log("No published reviews yet");
    return;
  }

  // Fetch it again by id. The colon in the id is valid in a path; the URL class keeps it as is.
  try {
    const review = await get<Review>(`reviews/${encodeURIComponent(lowest[0].id)}`);
    console.log(`Lowest review ${review.id} (${review.rating}/5, ${review.createdAt}): ${review.text || "(no text)"}`);
  } catch (error) {
    if (error instanceof ApiError && error.code === "NOT_FOUND") {
      console.log("The review is not in your workspace");
    } else {
      throw error;
    }
  }
}

try {
  await main();
} catch (error) {
  if (error instanceof ApiError && error.status === 503) {
    console.error("The service is temporarily unavailable. Retry with exponential backoff.");
  } else {
    console.error(error instanceof Error ? error.message : error);
  }
  process.exitCode = 1;
}

Expected output (values depend on your workspace):

1 star(s): 7
2 star(s): 12
3 star(s): 20
4 star(s): 31
5 star(s): 58
Lowest review 4815162342:1198411 (1/5, 2026-02-03): (no text)

Did this page help you?