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 apps 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

curl -v -u <atlassian_account_email>:<api_token> -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 the placeholders with your Atlassian account email address, an API token that has at least a scope of read:pullrequest:bitbucket, workspace ID, repository slug, pull request number, and UUID/Account ID (Don't remove the {} around the UUID, enter the UUID/AccountID within the brackets)

Updated on September 25, 2025

Still need help?

The Atlassian Community is here for you.