Project Management REST API
Create and manage BrowserStack projects, project access, and ownership using the Project Management REST API.
Base URL
https://api.browserstack.com/v1/projects
You can use the Project Management REST API to:
- Create, update, and delete projects
- Archive and unarchive projects
- Transfer project ownership or move a project to another team
- Grant, update, and revoke project access for users, teams, and service accounts
The API follows the general conventions of REST. All endpoints accept and return JSON.
Prerequisites
- Role-based access control (RBAC) enabled for your organization. For more information, see Project RBAC.
- A role that permits the action you want to perform. For example, to delete a project, you need a role with permission to delete projects.
Team scope
The following rules determine which team a project belongs to and which projects you can see:
- When you create a project, BrowserStack adds it to your active team.
- The list endpoint returns the projects you can view, based on your organization’s data access level.
- If cross-team access is enabled for you, the list endpoint returns projects from all your teams.
- On projects outside your active team, you have the Viewer role. You can view those projects, but you can’t modify them.
Response format
Pagination
{
"data": [],
"pagination": {
"page": 1,
"page_size": 30,
"total": 42,
"next": 2,
"prev": null
},
"request_id": "3f6d2c1e-8a9b-4c7d-9e0f-1a2b3c4d5e6f"
}
A successful request returns the resource. List endpoints return a data array and a pagination object.
Every response, including error responses, contains a top-level request_id. Pass your own request_id as a query parameter to correlate requests with your logs. If you omit it, BrowserStack generates one.
Note: The bulk access endpoints return
200even when some accessors fail. Check thestatusof each item indataand thesummaryobject to see which accessors succeeded.
Errors
Error response
{
"error": {
"code": "PROJECT_INVALID_STATE",
"message": "Project is in a state that does not allow this operation",
"target": "archived",
"context": {
"current_state": "archived"
}
},
"request_id": "3f6d2c1e-8a9b-4c7d-9e0f-1a2b3c4d5e6f"
}
A failed request returns an HTTP status code and an error object. Use the HTTP status to decide how to handle the error, because new error.code values might be added.
The error object always contains code and message. The target, details, and context fields are optional, and not every endpoint returns them.
| Field | Description |
|---|---|
code |
A machine-readable error code. |
message |
A human-readable description of the error. |
target |
Optional. The request field that caused the error. |
details |
Optional. A list of field-level errors, when several are reported together. |
context |
Optional. Additional information, such as current_state for PROJECT_INVALID_STATE. |
HTTP status codes
The API uses the following HTTP status codes:
| Status | Meaning | Example error.code
|
|---|---|---|
400 |
The request is malformed or exceeds a size limit. |
INVALID_JSON, ACCESSES_REQUIRED, TOO_MANY_ACCESSORS
|
401 |
The credentials are missing or invalid. | AUTHORIZATION_FAILED |
403 |
You don’t have permission to view or modify the project. |
PROJECT_ACCESS_DENIED_SHOW, PROJECT_UPDATE_PERMISSION_DENIED, PROJECT_CREATE_PERMISSION_DENIED
|
404 |
The project, user, or team doesn’t exist, or the project is deleted. |
PROJECT_NOT_FOUND, USER_NOT_FOUND, TEAM_NOT_FOUND
|
409 |
The request conflicts with the current state of the project. |
PROJECT_NAME_EXISTS, PROJECT_INVALID_STATE, ALREADY_PROJECT_OWNER
|
413 |
The request body is larger than 50 MB. | PAYLOAD_TOO_LARGE |
422 |
A parameter value is invalid. |
INVALID_PRODUCT, INVALID_ACCESS, INVALID_PAGE_SIZE
|
500 |
An unexpected error occurred. Retry the request later. | UNEXPECTED_ERROR |
Note: If you need help with the initial setup, contact support.
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.