Commits

Create comment for a commit

Creates new comment on the specified commit.

To post a reply to an existing comment, include the parent.id field:

$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/commit/db9ba1e031d07a02603eae0e559a7adc010257fc/comments/ \
  -X POST -u evzijst \
  -H 'Content-Type: application/json' \
  -d '{"content": {"raw": "One more thing!"},
       "parent": {"id": 5728901}}'
post/repositories/{workspace}/{repo_slug}/commit/{commit}/comments

Request

  • Base URL
    https://api.bitbucket.org/2.0
  • Auth
    • OAuth 2
      Authorization code: https://bitbucket.org/site/oauth2/authorize
      Token URL: https://bitbucket.org/site/oauth2/access_token scopes: repository
    • or HTTP basic
    • or API key in header Authorization

Request body

typestring required
idinteger
created_onstring date-time
updated_onstring date-time
deletedboolean

Response

The newly created comment.

Changes

No recorded changes to this operation across all 23 revisions of this API.