Skip to main content
Decisions (Beta)

List Decisions

List judgment records within the current authentication scope with pagination, optionally filtered by Session.

The Decision API is currently in Beta. Interface definitions, response structures, and behavior may change in subsequent versions. Follow documentation updates and verify compatibility before using it in production.
GET /api/v1/forward/decisions

Request headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>. Supports administrator and Identity-level SATs.

Query parameters

ParameterTypeRequiredDefaultDescription
session_idstringNo—List only judgment records for this Session. The Session must be within the current authentication scope and not archived.
after_idstringNo—Page toward older records using the previous page's last_id.
before_idstringNo—Page toward newer records using the current page's first_id.
limitintegerNo20Records per page, from 1 to 100.
Each parameter may appear only once and must not be empty. after_id and before_id cannot be supplied together. ID parameters must be 1–256 bytes, with no leading or trailing whitespace, control characters, or /, \\, ?, #. Other query parameters such as identity_id, status, and order are not accepted.

Example request

Query records in the current scope:
curl --silent --show-error --fail-with-body \
  "https://api.qoder.com/api/v1/forward/decisions?limit=20" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"
Query the next page of records for a Session, using the previous page's last_id as after_id:
curl --silent --show-error --fail-with-body --get \
  "https://api.qoder.com/api/v1/forward/decisions" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  --data-urlencode "session_id=sess_xxx" \
  --data-urlencode "after_id=dec_xxx" \
  --data-urlencode "limit=20"

Example response

HTTP 200 OK (includes a running record)
{
  "data": [{
    "id": "dec_xxx",
    "session_id": "sess_xxx",
    "source": "api",
    "status": "running",
    "questions": [{
      "type": "choice",
      "name": "resolved",
      "instructions": "Has the user confirmed resolution?",
      "choices": [{"value": true}, {"value": false}]
    }],
    "answers": [],
    "context": {"mode": "session"},
    "error": null,
    "created_at": "2026-10-26T10:00:00Z",
    "completed_at": null
  }],
  "has_more": false,
  "first_id": "dec_xxx",
  "last_id": "dec_xxx"
}

Response fields and pagination

FieldTypeDescription
dataarrayDecision objects on the current page. May include running, completed, and failed records.
has_morebooleanWhether more records exist in the current query direction. The default and after_id query toward older records; before_id queries toward newer records.
first_idstring or nullID of the first record on the current page; null for an empty page.
last_idstring or nullID of the last record on the current page; null for an empty page.
All pages return records from newest to oldest by creation time, using a stable server-side order for equal timestamps. Keep the same authentication scope and filters across consecutive pages, and preserve the order returned by the server. Cursors must belong to the current scope and match the current session_id filter; a mismatch returns 404. When session_id is omitted, records produced from both explicit state input and Session input can be returned. An Identity-level SAT can list only records within its bound Identity's scope.

Errors

HTTPCodeTrigger
400invalid_decision_input or no CodeDuplicate, empty, unknown, or malformed parameters; limit out of range; or both cursors supplied.
401—Credentials are missing, invalid, or expired.
403—The current credentials lack the required access permissions.
404—The filtered Session is inaccessible or archived, its Identity is unavailable, or the cursor is outside the current filter scope.
500—Internal service error.
For the error response structure, see Create Decision.