Manage users
Get users
List all the users present in an organization account on BrowserStack.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/user/user_detail"
-
role String
Limit results to users of certain role. Specify multiple roles as comma-separated values. Allowed values are
user,admin,owner. -
team_name String
Limit results to users who belong to the specified Team. Specify multiple teams as comma-separated values.
-
product_access String
Limit results to users having certain product access. Specify products as comma-separated values.
Possible Value Description live_testingList all the users having access to Live product for manual testing of your websites. app_live_testingList all the users having access to App Live product for manual testing of your mobile apps. app_automateList all the users having access to App Automate product for automated testing of your mobile apps. automateList all the users having access to Automate product for automated testing of your websites. percyList all the users having access to Percy. app_percyList all the users having access to App Percy. The default value is true. -
status String
Limit results to users of the specified status.
Possible Value Description pendingList all the users which have not accepted the invite yet (which was sent to them via email). disabledList all the users which have been disabled using the /user/disable_userendpoint.
Response attributes 200 application/json
Response
{
"count": 3,
"user_details": [
{
"id": 5205857,
"username": "andy_fez",
"full_name": "Andy",
"email": "andy.a@acme.com",
"role": "user",
"organization_name": "Acme Inc.",
"teams": [
"MobileSquad-US"
],
"additional-teams": [
"WebSquad-EU",
"DataAnalytics-APAC"
],
"product_access": {
"live_testing": true,
"automate": true,
"percy": true,
"app_percy": true,
"app_live_testing": false,
"app_automate": false
}
},
{
"id": 4568906,
"username": "joana_xps",
"full_name": "Joana",
"email": "joana.shaw@acme.com",
"role": "owner",
"organization_name": "Acme Inc.",
"product_access": {
"live_testing": true,
"automate": true,
"percy": false,
"app_percy": true,
"app_live_testing": false,
"app_automate": false
}
},
{
"id": 506608,
"username": "",
"full_name": "",
"email": "philip.joly@acme.com",
"role": "user",
"organization_name": "Acme Inc.",
"status": "pending",
"product_access": {
"live_testing": true,
"automate": true,
"percy": false,
"app_percy": true,
"app_live_testing": false,
"app_automate": false
}
}
]
}
-
count Integer
Total no of users in the organization account on BrowserStack.
-
user_details Object
â–¶ SHOW VALUESDetails of users
-
id String
Unique identifier of the user.
-
username String
Username of the user. In case the user
statusispending, the username will be empty. -
full_name String
Full name of the user. In case the user
statusispending, the full_name will be empty. -
email String
Email of the user.
-
role String
Role of the user.
-
organization_name String
Name of the organization account on BrowserStack.
-
teams Array[String]
List of all team to which the user belongs. Note: If the user is part of Organization (and not any Team within the Organization) then
teamskey is not returned. -
additional_teams Array[String]
List of additional teams to which the user is assigned. This parameter is available only to some customers. For more details, contact support.
-
product_access Object
â–¶ SHOW VALUESDetails of product access.
-
live_testing Boolean
Value is set to
trueif product-access to Live product is granted to the user. -
app_live_testing Boolean
Value is set to
trueif product-access to App Live product is granted to the user. -
automate Boolean
Value is set to
trueif product-access to Automate product is granted to the user. -
app_automate Boolean
Value is set to
trueif product-access to App Automate product is granted to the user. -
percy Boolean
Value is set to
trueif product-access to Percy product is granted to the user. -
app_percy Boolean
Value is set to
trueif product-access to App Percy product is granted to the user.
-
-
Get user details
Returns the details of the specified user. The email of the user is the valid unique identifier to fetch the user detail.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/user/user_detail?email=andy.a@acme.com"
-
email* String
Email address of the user.
Response attributes 200 application/json
Response
{
"id": 5205857,
"username": "andy_fez",
"full_name": "Andy",
"email": "andy.a@acme.com",
"role": "user",
"organization_name": "Acme Inc.",
"teams": [
"MobileTesting"
],
"additional-teams": [
"WebSquad-EU",
"DataAnalytics-APAC"
],
"product_access": {
"live_testing": true,
"automate": true,
"percy": true,
"app_percy": true,
"app_live_testing": false,
"app_automate": false
}
}
-
id String
Unique identifier of the user.
-
username String
Username of the user.
-
full_name String
Full name of the user.
-
email String
Email of the user.
-
role String
Role of the user.
- Show 4 more
-
organization_name String
Name of the organization account on BrowserStack.
-
teams Array[String]
List of all team to which the user belongs. Note - If the user is part of Organization (and not any Team within Organization) then
teamskey is not returned. -
additional_teams Array[String]
List of additional teams to which the user is assigned. This parameter is available only to some customers. For more details, contact support.
-
product_access Object
â–¶ SHOW VALUESDetails of product access
-
live_testing Boolean
Value is set to
trueif product-access to Live product is granted to the user. -
app_live_testing Boolean
Value is set to
trueif product-access to App Live product is granted to the user. -
automate Boolean
Value is set to
trueif product-access to Automate product is granted to the user. -
app_automate Boolean
Value is set to
trueif product-access to App Automate product is granted to the user. -
percy Boolean
Value is set to
trueif product-access to Percy product is granted to the user. -
app_percy Boolean
Value is set to
trueif product-access to App Percy product is granted to the user.
-
Create new user
Creates and adds a new user to your organization account on BrowserStack.
Note: The user will get directly added to your organization account on BrowserStack. No invite is sent to the user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/user/create_user?email=andrew@acme.com&full_name=Andrew"
-
email* String
Email of the user.
-
full_name* String
Full name of the user.
-
role String
Role of the user. Allowed values are
user,admin,owner. If no value is specified, the default value isuser. -
team String
Team name in which user is to be added.
-
additional_teams Array[String]
List of additional teams to which the user will be assigned. If you specify
additional_teams, thenteamparameter is mandatory. This parameter is available only to some customers. For more details, contact support.
Response attributes 200 application/json
Response
{
"message":"User has been created successfully."
}
-
message String
User has been created successfully.
Note: When a user is created, by default, no product-access is granted. You will have to provide product-access using product access API endpoint.
Add product access
Give specific product access to the user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/user/add_entitlement?email=andrew@acme.com&product_access=browser_testing"
-
email* String
Email of the user.
-
product_access* String
Product for which access is to be granted for the user.
Possible Value Description automateProvide product access to Automate product for automated testing of your websites. live_testingProvide product access to Live product for manual testing of your websites. app_live_testingProvide product access to App Live product for manual testing of your mobile apps. app_automateProvide product access to App Automate product for automated testing of your mobile apps. percyProvide product access to Percy product for visual testing of your websites. app_percyProvide product access to App Percy product for visual testing of your websites. browser_testingProvide product access to Live and Automate products. mobile_app_testingProvide product access to App Live and App Automate products for manual and automated testing of your mobile apps respectively.
Response attributes 200 application/json
Response
{
"success": true,
"message": "andrew@acme.com now has access to BrowserStack Browser Testing.",
"data": {
"live_testing": "updated",
"automate": "updated"
}
}
-
message String
andrew@acme.com now has access to BrowserStack Browser Testing.
-
data Object
â–¶ SHOW VALUESDetails of products for which access has been granted with the corresponding status.
-
live_testing String
Value is set to
updatedif product-access to Live product is successfully granted. -
automate String
Value is set to
updatedif product-access to Automate product is successfully granted. -
app_live_testing String
Value is set to
updatedif product-access to App Live product is successfully granted. -
app_automate String
Value is set to
updatedif product-access to App Automate product is successfully granted.
-
Warning: If you do not have sufficient licenses remaining, response code
422is returned with messageYour plan does not have sufficient licenses remaining. Please upgrade your plan to add more users.
Revoke product access
Revoke specific product access for a user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/user/revoke_entitlement?email=andrew@acme.com&product_access=automate"
-
email* String
Email of the user.
-
product_access* String
Product for which access is to be revoked for the user.
Possible Value Description automateProvide product access to Automate product for automated testing of your websites. live_testingProvide product access to Live product for manual testing of your websites. app_live_testingProvide product access to App Live product for manual testing of your mobile apps. app_automateProvide product access to App Automate product for automated testing of your mobile apps. percyProvide product access to Percy product for visual testing of your websites. app_percyProvide product access to App Percy product for visual testing of your websites. browser_testingProvide product access to Live and Automate products. mobile_app_testingProvide product access to App Live and App Automate products for manual and automated testing of your mobile apps respectively.
Response attributes 200 application/json
Response
{
"success": true,
"message": "andrew@acme.com no longer has access to BrowserStack Automate.",
"data": {
"automate": "updated"
}
}
-
message String
steve@acme.com no longer has access to BrowserStack mobile_app_testing
-
data Object
â–¶ SHOW VALUES-
live_testing String
Value is set to
updatedif product-access to Live product is revoked successfully. -
automate String
Value is set to
updatedif product-access to Automate product is revoked successfully. -
app_live_testing String
Value is set to
updatedif product-access to App Live product is revoked successfully. -
app_automate String
Value is set to
updatedif product-access to App Automate product is revoked successfully. -
percy String
Value is set to
updatedif product-access to Percy product is revoked successfully.
-
Update user email
Update the email address of a user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PUT "https://api.browserstack.com/user/update_email?old_email=andrew@acme.com&new_email=andrew.st@acme.com"
-
old_email* String
Current email of the user.
-
new_email* String
New email for the user.
Response attributes 200 application/json
Response
{
"message": "andrew@acme.com has been successfully updated to andrew.st@acme.com"
}
-
message String
steve@acme.com updated successfully.
Update user role
Update role of a user. Every user on BrowserStack has an associated role which provides access to different permissions.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PUT "https://api.browserstack.com/user/update_user_role?email=andrew.st@acme.com&role=admin"
-
email* String
Email of user (for whom role is to be updated).
-
role* String
Role of the user.
Possible Value Description ownerOwner can manage subscription, users and product-access privileges. adminAdmin can manage users and product-access privileges. userUser can use products for which access has been granted by Owner or Admin.
Response attributes 200 application/json
Response
{
"message": "Role for andrew.st@acme.com has been successfully updated."
}
-
message String
Role for andrew.st@acme.com has been successfully updated.
Update user team
Change team of user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PUT "https://api.browserstack.com/user/update_user_team?email=andrew.st@acme.com&team=WebTesting"
-
email* String
Email ID of user
-
team* String
Team name to which the user is to be added
-
additional_teams Array[String]
List of additional teams to which the user will be assigned. If you specify
additional_teams, thenteamparameter is mandatory. This parameter is available only to some customers. For more details, contact support.
Response attributes 200 application/json
Response
{
"message": "steve@acme.com successfully added to WebTesting team"
}
-
message String
steve@acme.com team has been updated successfully.
Disable user
Revoke all access for a user. All their product access will be revoked and their role will be changed to user. However, the user will still continue to be part of your account on BrowserStack.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/user/disable_user?email=andrew.st@acme.com"
-
email* String
Email of the user
Response attributes 200 application/json
Response
{
"message": "steve@acme.com has been successfully disabled."
}
-
message String
steve@acme.com has been successfully disabled.
Enable user
Revert the access (product_access and role) of a user to a state just before disable_user api endpoint was invoked for that user.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://api.browserstack.com/user/enable_user?email=andrew.st@acme.com"
-
email* String
Email of the user
Response attributes 200 application/json
Response
{
"message": "andrew.st@acme.com has been successfully enabled.",
"data": {
"live_testing": "andrew.st@acme.com now has access to BrowserStack Live.",
"automate": "andrew.st@acme.com now has access to BrowserStack Automate.",
"app_live_testing": "andrew.st@acme.com now has access to BrowserStack App Live.",
"app_automate": "andrew.st@acme.com now has access to BrowserStack App Automate."
}
}
-
message String
steve@acme.com has been successfully enabled.
Note: If you do not have sufficient licenses remaining for allocation, status code
422is returned with message The user could not be provisioned the previous entitlements due to insufficient licenses on your BrowserStack account. Please upgrade your plan to allocate entitlements.
Delete user
Revoke all access for a user and delete them from your account on BrowserStack.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X DELETE "https://api.browserstack.com/user/revoke_user?email=andrew.st@acme.com"
-
email* String
Email of the user
Response attributes 200 application/json
Response
{
"message": "steve@acme.com has been successfully deleted."
}
-
message String
steve@acme.com has been successfully enabled.
Delete team data
Before you delete a team using the Delete a Team endpoint, use this API to preview which users’ primary and additional team assignments will change. This endpoint is available only to some customers. For more details, contact support.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/user/delete_team_data"
-H "Content-Type: application/json" \
-d '{"team_name": "example_team"}'
-
team_name* String
Enter the name of the team you plan to delete. This endpoint returns information about how user team assignments will change if you delete this team.
Response attributes 200 application/json
Response
[
{
"email": "example1@company.com",
"resource_type": "user",
"comment": "User's primary team will be updated.",
"new_team": "Team3"
},
{
"email": "example2@company.com",
"resource_type": "user",
"comment": "User will be moved to the organization.",
"new_team": "DJOrg"
},
{
"email": "example3@company.com",
"resource_type": "user",
"comment": "User's primary team will be updated.",
"new_team": "Team3"
}
]
Get active team
Returns the currently active and non-active teams for the authenticated user. This endpoint is available only to some customers. For more details, contact support.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://api.browserstack.com/user/get_active_team"
-H "Content-Type: application/json" \
Response attributes 200 application/json
Response
teams_data = {
"active_team": "WebSquad-EU",
"non_active_team": "DevSquad-AU",
}
Switch active team
Switches the active team for the authenticated user. This endpoint is available only to some customers. For more details, contact support.
Request parameters
Request
curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X PATCH "https://api.browserstack.com/user/switch_active_team" \
-H "Content-Type: application/json" \
-d '{"active_team": "WebSquad-EU"}'
-
active_team* string
Name of the active team to switch to.
Response attributes 200 application/json
Response
{
"message": "Active team switched successfully.",
}
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.