• Addon
  • Branch restrictions
  • Branching model
  • Commit statuses
  • Commits
  • Deployments
  • Downloads
  • GPG
  • Issue tracker
  • Pipelines
  • Projects
  • Pullrequests
  • Refs
  • Reports
  • Repositories
  • SSH
  • Snippets
  • Source
  • Users
  • Webhooks
  • Workspaces
  • Other operations
Cloud
Bitbucket Cloud / Reference / REST APIs

Users

Postman Collection
OpenAPI

The users resource allows you to access public information associated with a user account. Most resources in the users endpoint have been deprecated in favor of workspaces.

GET

Get current user

Returns the currently logged in user.

account

Request

This request has no parameters.

Responses

The current user.

application/json

allOf [object, Account]

object

Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.

Account

An account object.

GET/user
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/user' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 { "type": "<string>", "links": { "avatar": {} }, "created_on": "<string>", "display_name": "<string>", "uuid": "<string>" }
GET

List email addresses for current user

Returns all the authenticated user's email addresses. Both confirmed and unconfirmed.

email

Request

This request has no parameters.

Responses

Unexpected error.

application/json

Error

Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.

GET/user/emails
1 2 3 curl --request GET \ --url 'https://api.bitbucket.org/2.0/user/emails' \ --header 'Authorization: Bearer <access_token>'
defaultResponse
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
GET

Get an email address for current user

Returns details about a specific one of the authenticated user's email addresses. Details describe whether the address has been confirmed by the user and whether it is the user's primary address or not.

email

Request

Path parameters

email

string

Required

Responses

Unexpected error.

application/json

Error

Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.

GET/user/emails/{email}
1 2 3 curl --request GET \ --url 'https://api.bitbucket.org/2.0/user/emails/{email}' \ --header 'Authorization: Bearer <access_token>'
defaultResponse
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
GET

Get a user

Gets the public information associated with a user account.

If the user's profile is private, location, website and created_on elements are omitted.

Note that the user object returned by this operation is changing significantly, due to privacy changes. See the announcement for details.

Request

Path parameters

selected_user

string

Required

Responses

The user object

application/json

allOf [object, Account]

object

Base type for most resource objects. It defines the common type element that identifies an object's type. It also identifies the element as Swagger's discriminator.

Account

An account object.

GET/users/{selected_user}
1 2 3 4 curl --request GET \ --url 'https://api.bitbucket.org/2.0/users/{selected_user}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
1 2 3 4 5 6 7 8 9 { "type": "<string>", "links": { "avatar": {} }, "created_on": "<string>", "display_name": "<string>", "uuid": "<string>" }

Rate this page: