Skip to main content
POST
/
repos
/
{repo_id}
/
reviews
/
{review_id}
/
comments
Add review comment
curl --request POST \
  --url https://api.diversion.dev/v0/repos/{repo_id}/reviews/{review_id}/comments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "thread_id": "<string>",
  "file_path": "<string>",
  "start_line": 123,
  "end_line": 123,
  "start_side": "left",
  "end_side": "left"
}
'
{
  "id": "<string>",
  "review_id": "<string>",
  "thread_id": "<string>",
  "author": {
    "id": "<string>",
    "image": "<string>",
    "email": "[email protected]",
    "full_name": "<string>",
    "name": "<string>",
    "tier": "EDUCATION"
  },
  "content": "<string>",
  "created_at": 123,
  "updated_at": 123,
  "file_path": "<string>",
  "start_line": 123,
  "end_line": 123,
  "start_side": "left",
  "end_side": "left"
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Required string length: 3 - 128
Example:

"example_id"

review_id
string
required

Review ID

Maximum string length: 128

Body

application/json

Payload for adding a comment to a review

content
string
required

Comment content

Maximum string length: 65536
thread_id
string

Thread ID for the comment (optional, will be generated if not provided)

Maximum string length: 128
file_path
string

File path for inline comments

Maximum string length: 4096
start_line
integer

Starting line number for inline comments

end_line
integer

Ending line number for inline comments

start_side
enum<string>

Side of a diff view (left = base/original, right = compare/modified)

Available options:
left,
right
end_side
enum<string>

Side of a diff view (left = base/original, right = compare/modified)

Available options:
left,
right

Response

Comment added successfully

Review comment details

id
string
required

Comment ID

review_id
string
required

Review ID this comment belongs to

thread_id
string
required

Thread ID this comment belongs to

author
object
required

User details

content
string
required

Comment content

created_at
integer
required

Unix timestamp when the comment was created

updated_at
integer
required

Unix timestamp when the comment was last updated

file_path
string

File path for inline comments

start_line
integer

Starting line number for inline comments

end_line
integer

Ending line number for inline comments

start_side
enum<string>

Side of a diff view (left = base/original, right = compare/modified)

Available options:
left,
right
end_side
enum<string>

Side of a diff view (left = base/original, right = compare/modified)

Available options:
left,
right