Skip to main content
GET/pending-approvals/{pendingId}/comments

List Comments

Lists the comments on a pending change, oldest first, filtered by what the caller may see at the time of the request.

People eligible to decide the change see every comment; the person who asked for it, and anyone else who can read the change, see everyone comments only, and nothing in the answer reveals that other comments exist.

Eligibility is checked on every read, so someone removed from the approvers stops seeing approvers_only comments at once.

Comments stay readable after the change is decided.

Pages with limit (1 to 200, default 50) and the returned nextCursor.

Parameters
pendingId *path

The pending change's id (apr_...).

projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Responses
HTTPK9O CodeDescription
200Success
400K9O_INVALID_FIELD_VALUE`limit` is not an integer between 1 and 200.
400K9O_INVALID_CURSORThe cursor is malformed or was issued for a different case; omit it to start from the first comment.
401K9O_SESSION_EXPIREDThe caller's session token is expired or invalid; re-authenticate to continue.
403K9O_RBAC_DENYThe caller can't read this case.
404K9O_NOT_FOUNDNo pending change with this id exists in this project.
Response body (200)
data *object[]

Oldest first.

Only the comments the caller may see; nothing reveals that others exist.

id *string

The comment's id (acm_...).

caseId *string

The id of the pending change or gate the comment is on (apr_...).

authorId *string

The author's opaque user id.

visibility *"everyone" | "approvers_only"

Fixed when posted. approvers_only comments are returned only to people eligible to decide the case, never to the person who asked for it.

body *string

Plain text.

Render it as text, never as HTML.

createdAt *string <date-time>

When the comment was posted.

nextCursor *any

Pass as cursor for the next page; null on the last page.

An opaque string.

One of: string
or: null
meta *object

Request metadata: cost, timing and correlation ids.

cost *object

Metered usage for this request; empty when nothing was metered.

timing *object
gatewayMs *number
totalMs *number
context *object
requestId *string
traceId *string
projectIdstring
warningsobject[]
code *string
message *string
TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.approvals.comments.list('apr_3Lq9Wx2Km7Rp5Tz8')

Showing example in TypeScript

Response example (200)
{
  "data": [
    {
      "id": "string",
      "caseId": "string",
      "authorId": "string",
      "visibility": "everyone",
      "body": "string",
      "createdAt": "string"
    }
  ],
  "nextCursor": "string",
  "meta": {
    "timing": {
      "gatewayMs": 0,
      "totalMs": 0
    },
    "context": {
      "requestId": "string",
      "traceId": "string",
      "projectId": "string"
    },
    "warnings": [
      {
        "code": "string",
        "message": "string"
      }
    ]
  }
}

More in Policy & Approvals