Create

Description

⚠️ Note
This API endpoint has been deprecated, please update to the latest version.

Add a comment to a case.

Request

HTTP Method: POST

Parameter Description
value The value of the comment to be added to the case. Supports markdown and mentioning users. To mention a user, use the notation <@user-2435>, replacing '2435' with the user ID.
author_email Optional The email of the user commenting on the case.
Path Parameter Description
case_id ID of the case

Sample request

curl -X POST \
  https://<<META.tenant.domain>>/api/v1/cases/<<case_id>>/comments \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
        "value": "This is a comment on a case"
      }'

Response

A successful request will return a JSON object describing the updated case

Field description

Parameter Description
case_id The case ID.
id The ID of the record with the comment attached to the case.
action The action taken on the case - commented in this instance.
value The comment being added.
user Details of the user who created the comment - id, first & last name, email & avatar url.
reactions An array of objects describing the reactions and their reactants on the comment.

Sample response

{
  "case_id": 42,
  "id": 7508,
  "action": "COMMENTED",
  "value": "This is a comment",
  "user": {
    "user_id": 1,
    "first_name": "Jane",
    "last_name": "Doe",
    "email": "jane@tines.io",
    "avatar_url": "example.com/avatar"
  },
  "reactions": [
    {
      "emoji": ":heart:",
      "reactants": [
        {
          "user_id": 1,
          "user_name": "John Smith",
          "reacted_at": "2024-03-12T10:06:38+00:00"
        }
      ]
    }
  ]
}
Was this helpful?