Create a comment event
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "This is updated text",
"attachments": [
{
"log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
}
}
]
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments"
payload = {
"text": "This is updated text",
"attachments": [{ "log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
} }]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: 'This is updated text',
attachments: [
{
log: {
logContent: 'ERROR: Database connection timeout after 30 seconds',
logId: 'log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o',
logTimestamp: '2025-09-22T10:30:00.000Z',
queryLinkSuffix: '/logs/query?time=123456789&query=error'
}
}
]
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'This is updated text',
'attachments' => [
[
'log' => [
'logContent' => 'ERROR: Database connection timeout after 30 seconds',
'logId' => 'log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o',
'logTimestamp' => '2025-09-22T10:30:00.000Z',
'queryLinkSuffix' => '/logs/query?time=123456789&query=error'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments"
payload := strings.NewReader("{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"event": {
"actor": {
"system": {},
"apiKey": {
"id": "2b1c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
"name": "Incident Management Integration Key"
},
"microsoftTeams": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"teamsUserId": "29:1abc123def456",
"userEmail": "john.doe@example.com"
},
"pagerDuty": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"pagerDutyUserId": "U012AB3CD",
"userEmail": "john.doe@example.com"
},
"prometheusAlertManager": {
"receiverName": "alertmanager-main-0"
},
"serviceNow": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"id": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"userEmail": "example@coralogix.com",
"username": "<string>"
},
"slack": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"slackUserId": "U012AB3CD",
"userEmail": "john.doe@example.com"
},
"user": {
"id": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0"
}
},
"createTime": "2025-09-22T10:30:00.000Z",
"eventData": {
"assigned": {
"assigneeUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"previousAssigneeUserId": "<string>"
},
"changeAssigneeFailed": {
"unknownAssigneeError": {
"unknownAssigneeEmail": "unknown"
}
},
"comment": {
"attachments": [
{
"log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
},
"customWidget": {
"customDashboardId": "dashboard_3f166e9f-3c88-4af2-b52e-138f339dab3e",
"widgetId": "widget_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"widgetScreenshot": {
"fileId": "file_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"fileName": "screenshot_2025-09-22.png",
"isDeleted": false
},
"queryLinkSuffix": "/dashboards/custom/123/widgets/456?time=123456789"
},
"file": {
"fileId": "file_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"fileName": "screenshot_2025-09-22.png",
"isDeleted": false
}
}
],
"slack": {
"channelId": "C012AB3CD",
"threadId": "1234567890.123456",
"userEmail": "john.doe@example.com",
"userId": "U012AB3CD",
"workspaceId": "T012AB3CD"
},
"unsafeText": "Looking into DB timeouts"
},
"created": {},
"kpiBreached": {
"threshold": "300s"
},
"notificationFailed": {
"error": "Slack API: channel_not_found"
},
"notificationSent": {
"notificationRequestId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"notifications": [
{
"token": "4c8ba1ec-acee-4bc7-ad6c-d35476b58541"
}
]
},
"priorityDetailsChanged": {
"from": {},
"to": {}
},
"resolutionReasonChangedEvent": {
"from": "<string>",
"to": "<string>"
},
"statusChanged": {},
"titleChangedEvent": {
"from": "<string>",
"to": "<string>"
},
"unassigned": {
"previousAssigneeUserId": "<string>"
}
},
"eventId": "ef51d3d9-a301-496b-aa7d-9a6e519ba0d5",
"eventTime": "2025-09-22T10:29:45.000Z",
"updateTime": "2023-11-07T05:31:56Z"
}
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Case Events Service
Create a comment event
Create a new comment event for a case.
Requires the following permissions:
case:Comment
Create a comment event
curl --request POST \
--url https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "This is updated text",
"attachments": [
{
"log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
}
}
]
}
'import requests
url = "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments"
payload = {
"text": "This is updated text",
"attachments": [{ "log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
} }]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: 'This is updated text',
attachments: [
{
log: {
logContent: 'ERROR: Database connection timeout after 30 seconds',
logId: 'log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o',
logTimestamp: '2025-09-22T10:30:00.000Z',
queryLinkSuffix: '/logs/query?time=123456789&query=error'
}
}
]
})
};
fetch('https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'This is updated text',
'attachments' => [
[
'log' => [
'logContent' => 'ERROR: Database connection timeout after 30 seconds',
'logId' => 'log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o',
'logTimestamp' => '2025-09-22T10:30:00.000Z',
'queryLinkSuffix' => '/logs/query?time=123456789&query=error'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments"
payload := strings.NewReader("{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coralogix.com/mgmt/openapi/5/cases/cases/v1/{case_id}/comments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"This is updated text\",\n \"attachments\": [\n {\n \"log\": {\n \"logContent\": \"ERROR: Database connection timeout after 30 seconds\",\n \"logId\": \"log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o\",\n \"logTimestamp\": \"2025-09-22T10:30:00.000Z\",\n \"queryLinkSuffix\": \"/logs/query?time=123456789&query=error\"\n }\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"event": {
"actor": {
"system": {},
"apiKey": {
"id": "2b1c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
"name": "Incident Management Integration Key"
},
"microsoftTeams": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"teamsUserId": "29:1abc123def456",
"userEmail": "john.doe@example.com"
},
"pagerDuty": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"pagerDutyUserId": "U012AB3CD",
"userEmail": "john.doe@example.com"
},
"prometheusAlertManager": {
"receiverName": "alertmanager-main-0"
},
"serviceNow": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"id": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"userEmail": "example@coralogix.com",
"username": "<string>"
},
"slack": {
"coralogixUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"displayName": "John Doe",
"slackUserId": "U012AB3CD",
"userEmail": "john.doe@example.com"
},
"user": {
"id": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0"
}
},
"createTime": "2025-09-22T10:30:00.000Z",
"eventData": {
"assigned": {
"assigneeUserId": "3af152ee-9eaf-4803-87f1-23c5fb2fbaa0",
"previousAssigneeUserId": "<string>"
},
"changeAssigneeFailed": {
"unknownAssigneeError": {
"unknownAssigneeEmail": "unknown"
}
},
"comment": {
"attachments": [
{
"log": {
"logContent": "ERROR: Database connection timeout after 30 seconds",
"logId": "log_4f8b1a2c3d5e6f7g8h9i0j1k2l3m4n5o",
"logTimestamp": "2025-09-22T10:30:00.000Z",
"queryLinkSuffix": "/logs/query?time=123456789&query=error"
},
"customWidget": {
"customDashboardId": "dashboard_3f166e9f-3c88-4af2-b52e-138f339dab3e",
"widgetId": "widget_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"widgetScreenshot": {
"fileId": "file_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"fileName": "screenshot_2025-09-22.png",
"isDeleted": false
},
"queryLinkSuffix": "/dashboards/custom/123/widgets/456?time=123456789"
},
"file": {
"fileId": "file_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"fileName": "screenshot_2025-09-22.png",
"isDeleted": false
}
}
],
"slack": {
"channelId": "C012AB3CD",
"threadId": "1234567890.123456",
"userEmail": "john.doe@example.com",
"userId": "U012AB3CD",
"workspaceId": "T012AB3CD"
},
"unsafeText": "Looking into DB timeouts"
},
"created": {},
"kpiBreached": {
"threshold": "300s"
},
"notificationFailed": {
"error": "Slack API: channel_not_found"
},
"notificationSent": {
"notificationRequestId": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"notifications": [
{
"token": "4c8ba1ec-acee-4bc7-ad6c-d35476b58541"
}
]
},
"priorityDetailsChanged": {
"from": {},
"to": {}
},
"resolutionReasonChangedEvent": {
"from": "<string>",
"to": "<string>"
},
"statusChanged": {},
"titleChangedEvent": {
"from": "<string>",
"to": "<string>"
},
"unassigned": {
"previousAssigneeUserId": "<string>"
}
},
"eventId": "ef51d3d9-a301-496b-aa7d-9a6e519ba0d5",
"eventTime": "2025-09-22T10:29:45.000Z",
"updateTime": "2023-11-07T05:31:56Z"
}
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}{
"code": 349,
"message": "<string>"
}Authorizations
API key authentication
Path Parameters
ID of the case to add the event to. Accepts either the case UUID (the id field on a case) or the readable identifier (the readable_id field, e.g. CASE-123).
Required string length:
1 - 64Pattern:
^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[A-Z]+-[0-9]+)$Example:
"3f166e9f-3c88-4af2-b52e-138f339dab3e"
Body
application/json
Request for creating a comment on a case.
Comment text to update
Example:
"This is updated text"
Attachments to the comment
- Comment attachment
- Comment attachment
- Comment attachment
Show child attributes
Show child attributes
Response
Response returned after successfully creating a comment.
Represents an immutable entry in a case's event timeline.
Show child attributes
Show child attributes
Was this page helpful?
⌘I