Skip to content

Create Comment

POST
/api/canvas/{deal_id}/comments
curl --request POST \
--url https://example.com/api/canvas/example/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "section_key": "example", "content": "example", "comment_type": "inline", "anchor_text": "example" }'

Create a new comment on a deal’s document.

Phase 4: RequireCommenter — commenters, editors, and owners can post comments.

deal_id
required
Deal Id
string
Media type application/json
CreateCommentRequest
object
section_key
Any of:
string
content
required
Content
string
>= 1 characters <= 2000 characters
comment_type
CommentType
string
default: section
Allowed values: inline section suggestion
anchor_text
Any of:
string

Successful Response

Media type application/json
CommentResponse

Comment record returned by every comment endpoint that yields a single comment. Mirrors Comment.to_api_dict() from src/canvas/models/comment.py.

extra='allow' accommodates author-profile enrichment fields that the CommentEnrichmentService injects (author_profile, etc.) without requiring them to be enumerated here.

object
comment_id
required
Comment Id
string
deal_id
required
Deal Id
string
section_key
Any of:
string
comment_type
required
Comment Type
string
author_id
required
Author Id
string
content
required
Content
string
status
required
Status
string
created_at
required
Created At
string
updated_at
required
Updated At
string
resolved_by
Any of:
string
resolved_at
Any of:
string
anchor_text
Any of:
string
replies
Replies
Array<object>
ReplyEntry

Inner shape of a comment reply (one entry inside CommentResponse.replies).

object
reply_id
required
Reply Id
string
author_id
required
Author Id
string
content
required
Content
string
created_at
required
Created At
string
edited_at
Any of:
string
mentioned_user_ids
Mentioned User Ids
Array<string>
key
additional properties
any
mentioned_user_ids
Mentioned User Ids
Array<string>
reactions
Reactions
object
key
additional properties
Array<string>
suggestion_metadata
Any of:
object
key
additional properties
any
key
additional properties
any
Example generated
{
"comment_id": "example",
"deal_id": "example",
"section_key": "example",
"comment_type": "example",
"author_id": "example",
"content": "example",
"status": "example",
"created_at": "example",
"updated_at": "example",
"resolved_by": "example",
"resolved_at": "example",
"anchor_text": "example",
"replies": [
{
"reply_id": "example",
"author_id": "example",
"content": "example",
"created_at": "example",
"edited_at": "example",
"mentioned_user_ids": [
"example"
]
}
],
"mentioned_user_ids": [
"example"
],
"reactions": {
"additionalProperty": [
"example"
]
},
"suggestion_metadata": {}
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}