Review questions

GET /review-questions

List the extra questions reviewers are asked beside the star rating, in the order they appear on the form. Archived questions are included.

Requires the reviews:read permission.

Query Parameters

limitnumber

The number of records to return.

cursorstring

A pagination cursor. Fetch the next page by passing the nextCursor value from the previous response.

sortsortOrder | -sortOrder | label | -label | createdAt | -createdAt

The sort order. Prefix a field with - to sort descending. Defaults to sortOrder.

filterstring

A JSON-encoded filter document, for example {"createdAt":{"$gte":"2025-01-01T00:00:00Z"}}. Filterable fields: id, label, type, required, showOnWidget, archivedAt, createdAt. See Filtering for the syntax.

includestring

A comma-separated list of extra fields to compute and return. Each one costs an additional query, so ask only for what you need. Available: answersCount.

Request
curl \
  "https://api.cascade.dev/review-questions" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "label": "string",
      "type": "scale",
      "config": {
        "steps": "...",
        "lowLabel": "...",
        "highLabel": "...",
        "middleLabel": "..."
      },
      "required": true,
      "showOnWidget": true,
      "sortOrder": 0,
      "productFilter": "...",
      "archivedAt": "2025-01-15T09:30:00Z",
      "metadata": "...",
      "createdAt": "2025-01-15T09:30:00Z",
      "updatedAt": "2025-01-15T09:30:00Z",
      "answersCount": 0
    }
  ],
  "nextCursor": "string"
}

POST /review-questions

Add a question to the review form. A scale question asks for one of a run of steps between two labelled ends; a multi_choice question offers a list of options, one or several of which can be picked. Give it a productFilter to ask it only about part of the catalog.

Requires the reviews:write permission.

Body Parameters

dataobjectrequired

The question to add.

Request
curl \
  -X POST \
  "https://api.cascade.dev/review-questions" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "label": "string",
    "type": "scale",
    "config": {
      "steps": 0,
      "lowLabel": "string",
      "highLabel": "string",
      "middleLabel": "string"
    },
    "required": true,
    "showOnWidget": true,
    "sortOrder": 0,
    "productFilter": "...",
    "metadata": "..."
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "label": "string",
  "type": "scale",
  "config": {
    "steps": 0,
    "lowLabel": "string",
    "highLabel": "string",
    "middleLabel": "string"
  },
  "required": true,
  "showOnWidget": true,
  "sortOrder": 0,
  "productFilter": "...",
  "archivedAt": "2025-01-15T09:30:00Z",
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "answersCount": 0
}

GET /review-questions/{id}

Get a single review question by ID.

Requires the reviews:read permission.

Path Parameters

idstring (uuid)required

The ID of the review question.

Query Parameters

includestring

A comma-separated list of extra fields to compute and return. Each one costs an additional query, so ask only for what you need. Available: answersCount.

Request
curl \
  "https://api.cascade.dev/review-questions/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "label": "string",
  "type": "scale",
  "config": {
    "steps": 0,
    "lowLabel": "string",
    "highLabel": "string",
    "middleLabel": "string"
  },
  "required": true,
  "showOnWidget": true,
  "sortOrder": 0,
  "productFilter": "...",
  "archivedAt": "2025-01-15T09:30:00Z",
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "answersCount": 0
}

PUT /review-questions/{id}

Edit a review question, or archive it so it stops being asked. Once reviewers have answered it, its type and its number of steps are fixed, and its options can be added to, relabeled or archived but never removed: the answers already recorded are read against them.

Requires the reviews:write permission.

Path Parameters

idstring (uuid)required

The ID of the question to update.

Body Parameters

dataobjectrequired

The fields to update.

Request
curl \
  -X PUT \
  "https://api.cascade.dev/review-questions/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "data": {
    "label": "string",
    "type": "scale",
    "config": {
      "steps": 0,
      "lowLabel": "string",
      "highLabel": "string",
      "middleLabel": "string"
    },
    "required": true,
    "showOnWidget": true,
    "sortOrder": 0,
    "productFilter": "...",
    "archived": true,
    "metadata": "..."
  }
}'
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "label": "string",
  "type": "scale",
  "config": {
    "steps": 0,
    "lowLabel": "string",
    "highLabel": "string",
    "middleLabel": "string"
  },
  "required": true,
  "showOnWidget": true,
  "sortOrder": 0,
  "productFilter": "...",
  "archivedAt": "2025-01-15T09:30:00Z",
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "answersCount": 0
}

DELETE /review-questions/{id}

Delete a review question. This is refused once any review has answered it, because deleting it would take those answers with it. Archive it instead to stop asking it while its answers keep showing.

Requires the reviews:write permission.

Path Parameters

idstring (uuid)required

The ID of the question to delete.

Request
curl \
  -X DELETE \
  "https://api.cascade.dev/review-questions/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer sk_YOUR_SECRET_KEY"
Response
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "label": "string",
  "type": "scale",
  "config": {
    "steps": 0,
    "lowLabel": "string",
    "highLabel": "string",
    "middleLabel": "string"
  },
  "required": true,
  "showOnWidget": true,
  "sortOrder": 0,
  "productFilter": "...",
  "archivedAt": "2025-01-15T09:30:00Z",
  "metadata": "...",
  "createdAt": "2025-01-15T09:30:00Z",
  "updatedAt": "2025-01-15T09:30:00Z",
  "answersCount": 0
}