Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket API: Using the fields parameter to include email addresses in the response does not work

Mariano B
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 12, 2025

According to https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get I should be able to include user email addresses in the response by making use of the fields parameter.

 

It just doesn't work for me. Using the following api query:

 

https://api.bitbucket.org/2.0/workspaces/my-workspace/members?fields=values.user.account_id,values.user.email

gives me a list of users where the only attribute is account_id whereas I would expect the email address as well:

 


{
"values": [
{
"user": {
"account_id": "712020:b404d03e-000a-4c17-8d56-99f10528950c"
}
]
}

 

I tried using values.user.* in the fields value and all kind of attributes for each user is returned but not the email.

 

I also tried to include user emails querying other endpoints like pull requests and this query gives me only the account id for each user: 

https://api.bitbucket.org/2.0/repositories/my-workspace/repo-abc/pullrequests?fields=values.author.email,values.author.account_id

I tried authenticating with Oauth2 and App Password as well, being a Workspace owner. Same result either way.

Is this something that just doesn't work or am I experiencing some other kind of issue? Thanks so much!

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 13, 2025

Hi @Mariano B 

Unfortunately, the documentation is incorrect—we don't expose user email in our API endpoints, so it can't be used for filtering. I've just raised an internal documentation request to update this and remove this section, as it is confusing.

There is an existing feature request raised with our developers requesting that email be included in the API, please feel free to Watch it for future updates and Vote for it to improve its visibility with regard to customer demand:

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events