Comment - Create
Purpose
To insert a Comment attached to an Activity, Account, Project, or Credit which your API Credentials have access to.
Request
Endpoint
POST /comment
Authentication
Include your API Key within the x-api-key header as described here.
Request Body Parameters
NOTE: A Comment can NOT be updated (only created or deleted). Therefore, if a Comment originated from the Incentify system, then you will need to ingest that Comment from Incentify into your internal system and then set the new internal_comment_id back onto the Comment on Incentify for future mapping/reference. This is done via the Delta - Consumed & Mapped Endpoint. We recommend reading this guide to understand the logic/flow for doing this: Guide - Syncing Changed Resources.
The following table lists the parameters supported in the JSON POST payload.
*are required only on create.**are required every request (both create and update), but the value is only set upon creation (ie; can not be changed).***are required only on create and can never be updated.- Marked with NO asterisk are optional parameters. If you do not include them in an update request then the current value will be preserved.
| Parameter | Type | Definition |
|---|---|---|
| internal_account_id *** | string | The ID of the Account on your internal system. |
| internal_comment_id ** | string | The ID of the Comment on your internal system. |
| attached_to_type *** | ENUM("project","account","credit", "activity") | The object type this comment is attached to. |
| attached_to_internal_id *** | string | The ID of the Object this comment is attached to on your internal system. |
| text *** | string | The text format is markdown. |
| created_by.email *** | string | The email of the user on your internal system. |
| created_by.full_name *** | string | The full name of the user on your internal system, or within Incentify. |
| created_at | string | The date and time that the Comment was created. The value is specified in RFC 3339 Format (2022-05-03T17:13:44Z). |
| id | integer | The ID of the Comment on the Incentify system. |
Request Body Example
{
"internal_comment_id": "c23223",
"internal_account_id": "XXXXX3",
"attached_to_type": "activity",
"attached_to_internal_id": "a2354242",
"text": "When you get a chance, could you please upload your Q3 finacials with the additional information that we need?",
"created_by": {
"email": "[email protected]",
"full_name": "John Doe"
},
"created_at": "2022-05-03T17:13:44Z"
}
Successful Response
If successful, this method returns an http code of 200 and response body with the following structure:
Response Body
{
"code":200,
"success": true,
"data": {
Comment Resource here (See "Comment - Overview" page)
},
"errors": []
}
Error Response
If the request has invalid fields/values, this method returns an http code of 400 and response body with the following structure:
Error Response Body
{
"code":400,
"success":false,
"data": {},
"errors": [
"text describing error here"
]
}
Properties
The following table defines the properties that appear in this resource:
| Key | Type | Definition |
|---|---|---|
| code | integer | HTTP Status Code (ie; 200, 403, etc). |
| success | boolean | Either true (success) or false (fail). |
| data | object | Comment updated is returned. The data structure of the Comment is a Comment Resource. |
| errors | object | If the request fails, this will contain information about the error. |