Table of Contents
User Management API

Manage users

Create new user

POST /user/create_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 is user.

  • team String

    Team name in which user is to be added.

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.

POST /user/add_entitlement

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
    automate Provide product access to Automate product for automated testing of your websites.
    live_testing Provide product access to Live product for manual testing of your websites.
    app_live_testing Provide product access to App Live product for manual testing of your mobile apps.
    app_automate Provide product access to App Automate product for automated testing of your mobile apps.
    browser_testing Provide product access to Live and Automate products.
    mobile_app_testing Provide 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

    Details of products for which access has been granted with the corresponding status.

    SHOW VALUES
    • live_testing String

      Value is set to updated if product-access to Live product is successfully granted.

    • automate String

      Value is set to updated if product-access to Automate product is successfully granted.

    • app_live_testing String

      Value is set to updated if product-access to App Live product is successfully granted.

    • app_automate String

      Value is set to updated if product-access to App Automate product is successfully granted.

Warning: If you do not have sufficient licenses remaining, response code 422 is returned with message Your 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.

POST /user/revoke_entitlement

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
    automate Provide product access to Automate product for automated testing of your websites.
    live_testing Provide product access to Live product for manual testing of your websites.
    app_live_testing Provide product access to App Live product for manual testing of your mobile apps.
    app_automate Provide product access to App Automate product for automated testing of your mobile apps.
    browser_testing Provide product access to Live and Automate products.
    mobile_app_testing Provide 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

Update user email

Update the email address of a user.

PUT /user/update_email

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.

PUT /user/update_user_role

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
    owner Owner can manage subscription, users and product-access privileges.
    admin Admin can manage users and product-access privileges.
    user User 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.

PUT /user/update_user_team

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

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.

POST /user/disable_user

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.

POST /user/enable_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 422 is 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.

DELETE /user/revoke_user

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.

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.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback