How to tag a user in a comment using pull request API in Bitbucket Cloud?

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

It is possible to tag a user in a commit using the API endpoint REST API - Create a comment on a pull request with the Account ID or Bitbucket UUID.

Solution

1 curl -v -u username:app_password -X POST 'https://api.bitbucket.org/2.0/repositories/WORKSPACEID/REPO/pullrequests/PULLREQUESTID/comments' --header 'Content-Type: application/json' --data '{"content": {"raw": "@{UUID/ACCOUNTID} Some comment"}}'

ℹ️ Replace with the username, app password, workspace ID, repository name, pull request number and UUID/Account ID (Don't remove the {} and enter the UUID/AccountID within the brackets)

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.