Item Comments

Item comments let you post notes on a Rollbar item through the API, in addition to the UI. Comments created via the API carry a "via API" label wherever comments appear in the Rollbar UI.

Creating a comment

POST /api/1/item/{item_id}/comments

Requires a personal access token with write scope. See Access Tokens for how to create one. Project access tokens and service tokens are rejected.

FieldTypeDescription
bodystringThe comment text. Supports Markdown and @mentions. Maximum 65,535 bytes.

Example:

curl -X POST \
  --header 'X-Rollbar-Access-Token: YOUR_PERSONAL_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{"body": "Looking into this now."}' \
  'https://api.rollbar.com/api/1/item/12345/comments'

Comments created this way show the "via API" label in the Rollbar UI, the same as comments posted by a person through the dashboard.

🚧

Unconfirmed, verify before documenting as generally available: whether API-created comments trigger the same notifications (email, Slack, etc.) as comments created in the UI, and whether this endpoint is gated by plan or tier.

Reading comments

GET /api/1/item/{item_id}/comments is deprecated. Use GET /api/1/item/{item_id}/events instead, which returns the full item history, including comments.

Related

  • Access Tokens — personal access tokens and how they differ from project and account tokens
  • Rollbar API — authentication and access token overview

Did this page help you?