# List Comments

`GET /pending-approvals/{pendingId}/comments` · Core · Policy & Approvals

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

| Name | In | Required | Description |
|---|---|---|---|
| `pendingId` | path | yes | The pending change's id (`apr_...`). Example: `"apr_3Lq9Wx2Km7Rp5Tz8"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | array of object | yes | Oldest first. Only the comments the caller may see; nothing reveals that others exist. |
| `data.[]id` | string | yes | The comment's id (`acm_...`). |
| `data.[]caseId` | string | yes | The id of the pending change or gate the comment is on (`apr_...`). |
| `data.[]authorId` | string | yes | The author's opaque user id. |
| `data.[]visibility` | enum ("everyone", "approvers_only") | yes | Fixed when posted. `approvers_only` comments are returned only to people eligible to decide the case, never to the person who asked for it. |
| `data.[]body` | string | yes | Plain text. Render it as text, never as HTML. |
| `data.[]createdAt` | string (date-time) | yes | When the comment was posted. |
| `nextCursor` | object | yes | Pass as `cursor` for the next page; null on the last page. An opaque string. |
| _one of_ | | |  |
| _or_ | | |  |
| `meta` | object | yes | Request metadata: cost, timing and correlation ids. |
| `meta.cost` | object | yes | Metered usage for this request; empty when nothing was metered. |
| `meta.timing` | object | yes |  |
| `meta.timing.gatewayMs` | number | yes |  |
| `meta.timing.totalMs` | number | yes |  |
| `meta.context` | object | yes |  |
| `meta.context.requestId` | string | yes |  |
| `meta.context.traceId` | string | yes |  |
| `meta.context.projectId` | string | no |  |
| `meta.warnings` | array of object | no |  |
| `meta.warnings.[]code` | string | yes |  |
| `meta.warnings.[]message` | string | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_SESSION_EXPIRED` | The caller's session token is expired or invalid; re-authenticate to continue. |
| 400 | `K9O_INVALID_FIELD_VALUE` | `limit` is not an integer between 1 and 200. |
| 400 | `K9O_INVALID_CURSOR` | The cursor is malformed or was issued for a different case; omit it to start from the first comment. |
| 403 | `K9O_RBAC_DENY` | The caller can't read this case. |
| 404 | `K9O_NOT_FOUND` | No pending change with this id exists in this project. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/pending-approvals/<pendingId>/comments' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/pending-approvals/<pendingId>/comments', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o approvals comments <id>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.approvals.comments.list('apr_3Lq9Wx2Km7Rp5Tz8')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.approvals.comments.list("apr_3Lq9Wx2Km7Rp5Tz8")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Approvals.Comments.List(ctx, "apr_3Lq9Wx2Km7Rp5Tz8", k9o.ListApprovalCommentsOptions{})
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.approvals().comments().list("apr_3Lq9Wx2Km7Rp5Tz8", ListApprovalCommentsOptions::default()).await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.approvals().comments().list("apr_3Lq9Wx2Km7Rp5Tz8")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Approvals.Comments.ListAsync("apr_3Lq9Wx2Km7Rp5Tz8")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.approvals.comments.list("apr_3Lq9Wx2Km7Rp5Tz8")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->approvals->comments->list('apr_3Lq9Wx2Km7Rp5Tz8')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/list-comments
