---
title: "Create Alarm Comment"
method: POST
path: "/v1/alarms/{alarm-id}/comments"
tags: ["Alarms"]
---

# Create Alarm Comment

`POST /v1/alarms/{alarm-id}/comments`

Add a new comment to an alarm. If the alarm is linked to an open helpdesk issue, the comment is also added to that issue.

## Path parameters

- `alarm-id` integer, required

## Request body

- object
  - `text` string, required — Comment text

## Response `201`

Comment created.

- AlarmComment — Comment attached to an alarm
  - `id` integer — Comment ID
  - `alarmId` integer — ID of the alarm this comment belongs to
  - `userId` integer — ID of the user who created or last edited the comment
  - `userName` string — Name of the user who created or last edited the comment
  - `lastChangeTime` string, date-time — Time when the comment was created or last edited
  - `text` string — Comment text

## Other responses

- `400` — Invalid alarm ID or empty comment text
- `401` — Unauthorized
- `403` — User does not have update access to alarm or alarm's source object
- `404` — Alarm with given ID does not exist
- `500` — Database failure

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/ee1f54ee3abd/schema)
