# List error comments

List the comments on an error and on its occurrences, newest first. An error with no comments, or one that never occurred, returns an empty list.

[endpoint]
method = "GET"
base_url = "https://errors.betterstack.com"
path = "/api/v4/applications/{application_id}/errors/{error_id}/comments"

[[path_param]]
name = "application_id"
required = true
type = "string"
description = "The ID of the application, from [List applications](/docs/errors/api/applications/list/)."

[[path_param]]
name = "error_id"
required = true
type = "string"
description = "The error's `id`, from [List errors](/docs/errors/api/errors/list/). Can contain dots."

[[query_param]]
name = "page"
type = "integer"
description = "Page to return, starting at 1."

[[query_param]]
name = "per_page"
default = "50"
type = "integer"
description = "Results per page. Maximum 250."

[[query_param]]
name = "team_id"
type = "string"
description = "Team to use, such as `t123`. Get the ID via [List teams](/docs/uptime/api/teams/list/). Required when you can access more than one team."

[[header]]
name = "Authorization"
description = "Bearer `$TOKEN`"
required = true
type = "string"
[/endpoint]

[info]
#### Results are paginated
Use `pagination.next` and `pagination.prev` to move through pages or jump to a specific one using `page` and `per_page`. See [Pagination](/docs/getting-started/integrations/api/#pagination).
[/info]

[responses]
[[response]]
status = 200
description = "Returns the list of error comments."
body = '''
{
  "data": [
    {
      "id": "123456789",
      "type": "error_comment",
      "attributes": {
        "content": "Rolled back the 14:05 deploy. The error stopped.",
        "plaintext_content": "Rolled back the 14:05 deploy. The error stopped.",
        "author_name": "Jane Smith",
        "user_email": "jane@example.com",
        "posted_via": null,
        "linear_issue": null,
        "event": null,
        "created_at": "2026-11-16T07:58:02Z",
        "updated_at": "2026-11-16T07:58:02Z"
      }
    }
  ],
  "pagination": {
    "first": "https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/comments?page=1",
    "last": "https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/comments?page=1",
    "prev": null,
    "next": null,
    "total_count": 1
  }
}
'''

[[response]]
status = 401
description = "The API token is missing or invalid."
body = '''
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
'''

[[response]]
status = 403
description = "Your role doesn't allow viewing this, or the token can't be used for this API."

[[response]]
status = 404
description = "No application with that ID."
[/responses]

[params]
title = "Response attributes"

[[param]]
name = "id"
type = "string"
description = "The ID of the error comment."

[[param]]
name = "type"
type = "string"
description = "Always `error_comment`."

[[param]]
name = "content"
type = "string"
description = "Comment text, in Markdown. A mention is a `**M_START**{...}**M_END**` block whose `id` is the team member's user ID, such as `**M_START**{\"id\":\"u123\"}**M_END**`. To mention someone, send that block with their `u123` ID or e-mail as `id`. Get the user ID via [List team members](/docs/uptime/api/team-members/list/)."

[[param]]
name = "plaintext_content"
type = "string"
description = "The comment as plain text, with each mention written as `@name`."

[[param]]
name = "author_name"
type = "string"
description = "Who wrote the comment. A comment created with a team or global API token is signed `Comment added using API`."

[[param]]
name = "user_email"
type = "string or null"
description = "The author's e-mail, when a Better Stack user wrote the comment."

[[param]]
name = "posted_via"
type = "string or null"
description = "How the comment was posted. `null` when it was written in the web app.<br/>Valid values:<br/>`mcp`: Posted through the Better Stack MCP server.<br/>`cli`: A signed-in person posted it with the Better Stack CLI.<br/>`ai_sre`: AI SRE posted it for a person.<br/>`ai_engineer`: AI Engineer posted it for a person.<br/>`api`: Posted with an API token that has no user of its own.<br/>`slack`: Someone replied in the error's Slack thread.<br/>`linear`: Synced from a comment in Linear on the issue linked to the error.<br/>`email_reply`: Arrived as a reply to an e-mail.<br/>`microsoft_teams`: Arrived from Microsoft Teams.<br/>`policy_step`: An escalation policy step posted it."

[[param]]
name = "linear_issue"
type = "string or null"
description = "The Linear issue a synced comment came from, such as `ENG-123`."

[[param]]
name = "event"
type = "string or null"
description = "The occurrence the comment was left on, as its event ID, or as its timestamp when the occurrence has no ID. `null` for a comment on the error itself."

[[param]]
name = "created_at"
type = "datetime"
description = "When the comment was created. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "updated_at"
type = "datetime"
description = "When the comment was last updated. In ISO 8601 format, such as `2026-07-01T12:00:00Z`."

[[param]]
name = "pagination.first"
type = "string"
description = "The URL of the first page of results."

[[param]]
name = "pagination.last"
type = "string"
description = "The URL of the last page of results."

[[param]]
name = "pagination.prev"
type = "string or null"
description = "The URL of the previous page, or `null` on the first page."

[[param]]
name = "pagination.next"
type = "string or null"
description = "The URL of the next page, or `null` on the last page."

[[param]]
name = "pagination.total_count"
type = "integer"
description = "How many results the whole list holds, across every page."
[/params]

#### Example cURL

```shell
[label List error comments]
curl --request GET \
  --url https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/comments \
  --header "Authorization: Bearer $TOKEN"
```
