Skip to main content

Case comments

POST/api/v1/cases/:caseId

Adds a comment to an existing case with optional attachments. Can also add internal notes or tag case assignees.

cv-api-key
Productionhttps://api.care360-next.carevalidate.com/api/v1/cases/:caseId
Staginghttps://api-staging.care360-next.carevalidate.com/api/v1/cases/:caseId

Path Parameters

caseIdstringrequired
The unique identifier (UUID) of the case.

Headers

cv-api-keystringrequired
Your unique API key for authentication.
Content-Typestringrequired
Must be application/json.
Example: application/json

Request Body

Body Parameters
actionstringrequired
The action to be performed.
Values:ADD_COMMUNICATION
communicationobjectrequired
Communication details for the comment.
Show 5 child properties
textstringrequired
The message to be added to the case.
isRestrictedbooleanrequired
Indicates if the communication should be restricted. False by default.
webhookNotifybooleanoptional
Indicates if the comment webhook notification should be sent. True by default.
authorobjectrequired
Author details for the comment.
Show 3 child properties
emailstringrequired
The author's email address.
firstNamestringoptional
The author's first name.
lastNamestringoptional
The author's last name.
attachmentsarray of objectsoptional
Optional array of file attachments.
Show 4 child properties
isRestrictedbooleanoptional
Indicates if the attachment should be restricted.
isPHIbooleanoptional
Indicates if the attachment contains Protected Health Information.
fileNamestringrequired
The file name of the attachment (e.g., document.pdf).
contentstringrequired
The file content encoded as a Base64 string.

Request Examples

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"
}
]
}
}'

Responses

200SuccessCase comment created successfully.
{
"status": 200,
"success": true,
"message": "Case comment created successfully",
"data": {
"commentId": "e4f8d5a2-9b2f-4c5c-8d1f-8c6f1d9e2a3b",
"createdAt": "2024-09-04T12:00:00.000Z"
}
}
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"
}
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