Create an error comment

Add a comment to an error's conversation. When the error is linked to an issue in Linear and its integration syncs comments, the comment is posted there too. A comment made with OAuth is posted under your name. A comment made with a team or global API token is signed Comment added using API.

POST https://errors.betterstack.com/api/v4/applications/{application_id}/errors/{error_id}/comments

URL parameters

application_id
required string
error_id
required string

Query parameters

team_id
string

Headers

Authorization
required string
Content-Type
string

Body parameters

content
required string
201

Response 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"
    }
  }
}
401

Response 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"
}
403

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404
422

Response body

{
  "errors": "Sorry, some values are incorrect",
  "invalid_values": {
    "content": "Mention a user by a user ID such as u123, not `3`. Get it via List team members, or mention their e-mail."
  }
}

Response attributes

id
string
type
string
content
string
plaintext_content
string
author_name
string
user_email
string or null
posted_via
string or null
linear_issue
string or null
event
string or null
created_at
datetime
updated_at
datetime

Example cURL

Comment on an error
curl --request POST \
  --url https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/comments \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "content": "Rolled back the 14:05 deploy. The error stopped."
}'