Skip to main content
Table of Contents

Manage users

Get users

List all the users present in an organization account on BrowserStack.

GET /user/user_detail

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_testing List all the users having access to Live product for manual testing of your websites.
    app_live_testing List all the users having access to App Live product for manual testing of your mobile apps.
    app_automate List all the users having access to App Automate product for automated testing of your mobile apps.
    automate List all the users having access to Automate product for automated testing of your websites.
    percy List all the users having access to Percy.
  • status String

    Limit results to users of the specified status.

    Possible Value Description
    pending List all the users which have not accepted the invite yet (which was sent to them via email).
    disabled List all the users which have been disabled using the /user/disable_user endpoint.

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"
            ],
            "product_access": {
                "live_testing": true,
                "automate": true,
                "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_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_live_testing": false,
                "app_automate": false
            }
        }
    ]
}
  • count Integer

    Total no of users in the organization account on BrowserStack.

  • user_details Object

    Details of users

    SHOW VALUES
    • id String

      Unique identifier of the user.

    • username String

      Username of the user. In case the user status is pending, the username will be empty.

    • full_name String

      Full name of the user. In case the user status is pending, 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 teams key is not returned.

    • product_access Object

      Details of product access.

      SHOW VALUES
      • live_testing Boolean

        Value is set to true if product-access to Live product is granted to the user.

      • app_live_testing Boolean

        Value is set to true if product-access to App Live product is granted to the user.

      • automate Boolean

        Value is set to true if product-access to Automate product is granted to the user.

      • app_automate Boolean

        Value is set to true if product-access to App Automate product is granted to the user.

      • percy Boolean

        Value is set to true if product-access to 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.

GET /user/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"
    ],
    "product_access": {
        "live_testing": true,
        "automate": true,
        "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.

  • 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 teams key is not returned.

  • product_access Object

    Details of product access

    SHOW VALUES
    • live_testing Boolean

      Value is set to true if product-access to Live product is granted to the user.

    • app_live_testing Boolean

      Value is set to true if product-access to App Live product is granted to the user.

    • automate Boolean

      Value is set to true if product-access to Automate product is granted to the user.

    • app_automate Boolean

      Value is set to true if product-access to App Automate product is granted to the user.

    • percy Boolean

      Value is set to true if product-access to 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.

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.
    percy Provide product access to Percy product for visual testing of your websites.
    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.
    percy Provide product access to Percy product for visual testing of your websites.
    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
    • live_testing String

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

    • automate String

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

    • app_live_testing String

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

    • app_automate String

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

    • percy String

      Value is set to updated if product-access to Percy product is revoked successfully.

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