Commits

Create comment for a commit

Changed on

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
  • URL
    https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/comments
  • 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

    • breaking

      the ///// request property format changed from no format to int64

    • warning

      removed the request property ///////

    • warning

      removed the request property ///////////

    • warning

      removed the request property ////////

    • info

      added the new optional request property //////

    • info

      added the new optional request property //////

    • info

      added the new optional request property ///////