Skip to content

Comment on a branch

POST
/api/orgs/{org}/projects/{project}/comments
curl --request POST \
--url https://api.wrktr.com/api/orgs/example/projects/example/comments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "example", "body": "example", "headSha": "example", "path": "example", "line": "Infinity", "parentId": "example", "authorKind": "human" }'

Start a thread on a line (path, line, and the headSha the line number refers to), or reply to one (parentId).

org
required
string
project
required
string
Media typeapplication/json
object
branch
required
string
body
required
string
>= 1 characters
headSha
Any of:
string
path
Any of:
string
line
Any of:
Any of:
number
parentId
Any of:
string
authorKind
Any of:
string
Allowed values: human agent

Comment

Media typeapplication/json
object
id
required
string
branch
required
string
path
required
string
line
required
Any of:
number
anchorSha
required
string
lineText
required
string
body
required
string
author
required
string
authorKind
required
string
Allowed values: human agent
parentId
required
Any of:
string
status
required
string
Allowed values: open resolved outdated
reviewId
required
Any of:
string
resolvedSha
required
Any of:
string
createdAt
required
Any of:
number
updatedAt
required
Any of:
number
severity
required
Any of:
string
Allowed values: blocker issue nit
Example
{
"line": "Infinity",
"authorKind": "human",
"status": "open",
"createdAt": "Infinity",
"updatedAt": "Infinity",
"severity": "blocker"
}

BadRequest

Media typeapplication/json
object
_tag
required
string
Allowed values: BadRequest
Example
{
"_tag": "BadRequest"
}

Unauthorized

Media typeapplication/json
object
_tag
required
string
Allowed values: Unauthorized
message
required
string
Example
{
"_tag": "Unauthorized"
}

ProjectNotFound | BranchNotFound | CommentNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: ProjectNotFound
project
required
string
Example
{
"_tag": "ProjectNotFound"
}

LineNotFound

Media typeapplication/json
object
_tag
required
string
Allowed values: LineNotFound
path
required
string
line
required
Any of:
number
Example
{
"_tag": "LineNotFound",
"line": "Infinity"
}