Case comments
POST
/api/v1/cases/:caseIdAdds a comment to an existing case with optional attachments. Can also add internal notes or tag case assignees.
cv-api-key
Production
https://api.care360-next.carevalidate.com/api/v1/cases/:caseIdStaging
https://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseIdPath Parameters
caseIdstringrequiredThe unique identifier (UUID) of the case.
Headers
cv-api-keystringrequiredYour unique API key for authentication.
Content-TypestringrequiredMust be application/json.
Example:
application/jsonRequest Body
Body Parameters
actionstringrequiredThe action to be performed.
Values:ADD_COMMUNICATION
communicationobjectrequiredCommunication details for the comment.
Show 6 child properties
textstringrequiredThe message to be added to the case.
isRestrictedbooleanrequiredIndicates if the communication should be restricted. False by default.
webhookNotifybooleanoptionalIndicates if the comment webhook notification should be sent. True by default.
authorobjectrequiredAuthor details for the comment.
Show 3 child properties
emailstringrequiredThe author's email address.
firstNamestringoptionalThe author's first name.
lastNamestringoptionalThe author's last name.
attachmentsarray of objectsoptionalOptional array of file attachments.
Show 4 child properties
isRestrictedbooleanoptionalIndicates if the attachment should be restricted.
isPHIbooleanoptionalIndicates if the attachment contains Protected Health Information.
fileNamestringrequiredThe file name of the attachment (e.g., document.pdf).
contentstringrequiredThe file content encoded as a Base64 string.
commentThreadobjectoptionalOptional comment thread to associate the comment with. Either `id` or `externalId` must be provided to identify the thread. If omitted entirely, the comment is added without an associated thread.
Show 4 child properties
idstring<UUID>optionalThe unique identifier of the comment thread. Must be a valid UUID. Required if `externalId` is not provided.
externalIdstringoptionalAn external identifier for the comment thread, used for correlating with an external system. Required if `id` is not provided.
tagstringrequiredThe tag identifying the comment thread type.
Values:cv_providercv_support
namestringoptionalThe display name for the comment thread.
Request Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.care360-next.carevalidate.com/api/v1/cases/YOUR_CASE_ID" \
-H "cv-api-key: YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "ADD_COMMUNICATION",
"communication": {
"text": "Comment text",
"isRestricted": false,
"author": {
"email": "support_user@carevalidate.com",
"firstName": "John",
"lastName": "Doe"
},
"webhookNotify": true,
"attachments": [
{
"isRestricted": false,
"isPHI": false,
"fileName": "Screenshot_01.png",
"content": "BASE64_STRING"
}
],
"commentThread": {
"id": "01f4998b-3d23-4fff-b048-6c76ca5a1d0c",
"tag": "cv_provider",
"name": "Thread Name",
"externalId": "External Thread Id"
}
}
}'
const caseId = 'YOUR_CASE_ID';
const response = await fetch(
`https://api.care360-next.carevalidate.com/api/v1/cases/${caseId}`,
{
method: 'POST',
headers: {
'cv-api-key': 'YOUR_SECRET_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
action: 'ADD_COMMUNICATION',
communication: {
text: 'Comment text',
isRestricted: false,
author: {
email: 'support_user@carevalidate.com',
firstName: 'John',
lastName: 'Doe',
},
webhookNotify: true,
attachments: [
{
isRestricted: false,
isPHI: false,
fileName: 'Screenshot_01.png',
content: 'BASE64_STRING',
},
],
commentThread: {
id: '01f4998b-3d23-4fff-b048-6c76ca5a1d0c',
tag: 'cv_provider',
name: 'Thread Name',
externalId: 'External Thread Id',
},
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
case_id = "YOUR_CASE_ID"
url = f"https://api.care360-next.carevalidate.com/api/v1/cases/{case_id}"
headers = {
"cv-api-key": "YOUR_SECRET_KEY",
"Content-Type": "application/json",
}
payload = {
"action": "ADD_COMMUNICATION",
"communication": {
"text": "Comment text",
"isRestricted": False,
"author": {
"email": "support_user@carevalidate.com",
"firstName": "John",
"lastName": "Doe",
},
"webhookNotify": True,
"attachments": [
{
"isRestricted": False,
"isPHI": False,
"fileName": "Screenshot_01.png",
"content": "BASE64_STRING",
}
],
"commentThread": {
"id": "01f4998b-3d23-4fff-b048-6c76ca5a1d0c",
"tag": "cv_provider",
"name": "Thread Name",
"externalId": "External Thread Id",
},
},
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)
Responses
▶200SuccessCase comment created successfully. If a `commentThread` was included in the request, `data.commentThread` reflects the associated thread's stored details.
{
"status": 200,
"success": true,
"message": "Case comment created successfully",
"data": {
"commentId": "e4f8d5a2-9b2f-4c5c-8d1f-8c6f1d9e2a3b",
"createdAt": "2024-09-04T12:00:00.000Z",
"commentThread": {
"id": "01f4998b-3d23-4fff-b048-6c76ca5a1d0c",
"name": "Thread Name",
"description": null,
"tag": "cv_provider",
"externalId": "External Thread Id",
"createdAt": "2026-09-10T19:13:14.760Z"
}
}
}
▶400Invalid ActionThe action field is not a recognized value.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Invalid action"
}
▶400Missing Required FieldsRequired fields (text, isRestricted, or author) are missing from the communication object.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Missing required field `text`"
}
▶400Missing Attachment FieldsAn attachment object is missing the content or fileName field.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "`content` field is required for attachments"
}
▶400Invalid Tagged UserA tagged user object is missing the required email field.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "`email` field is required for tagged users"
}
▶400Missing Comment Thread IdentifierThe commentThread object must include either an id or an externalId to identify the thread.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "communication.commentThread, Either `id` or `externalId` is required"
}
▶400Invalid Comment Thread IDThe commentThread.id field was provided but is not a valid UUID.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "`commentThread.id` must be a valid UUID"
}
▶400Invalid Comment Thread External IDThe commentThread.externalId field was provided but is not a valid string.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "communication.commentThread.externalId, Invalid input: expected string, received null"
}
▶400Invalid Comment Thread TagThe commentThread object is missing the tag field or the tag value is not one of the allowed values.
{
"status": 400,
"success": false,
"message": "Invalid request",
"error": "Invalid option: expected one of cv_provider, cv_support"
}
▶404Case Not FoundNo case exists with the provided caseId.
{
"status": 404,
"success": false,
"message": "Invalid request",
"error": "No Case found for provided details!"
}
▶403Permission DeniedThe case belongs to a different organization than the one associated with the API key.
{
"status": 403,
"success": false,
"message": "Invalid request",
"error": "Permission denied!"
}
Try It Out
Try itAPI Playground
▶