Skip to content
Barynt v1.0.12

Workspaces

REST API: list, create, change and delete workspaces.

A workspace is the top level: it holds projects, members, labels and statuses. Every call needs the scope shown and a key (or token) that belongs to someone who may do this in the app. See Authentication and basics.

GET /api/v1/workspaces

Scope: workspaces:read

List the workspaces you belong to.

Example

Terminal window
curl "$BARYNT_URL/api/v1/workspaces" \
-H "Authorization: Bearer $BARYNT_API_KEY"

Response

{
"data": [
{
"id": "ws_1a2b3c",
"name": "Acme Inc",
"color": "#6e63e6",
"avatarUrl": null
}
]
}

POST /api/v1/workspaces

Scope: workspaces:write

Create a workspace. You become its owner. Unlike creating one in the app, this does not also create a first project — create one explicitly via the projects endpoint below.

Body

NameTypeRequiredDescription
namestringyes
slugstringyesLowercase letters, numbers, and hyphens. Appended with a number if already taken.
colorstringA hex color. Default “#6e63e6”.

Example

Terminal window
curl -X POST "$BARYNT_URL/api/v1/workspaces" \
-H "Authorization: Bearer $BARYNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Inc", "slug": "acme", "color": "#6e63e6" }'

Request

{
"name": "Acme Inc",
"slug": "acme",
"color": "#6e63e6"
}

Response

// 201 Created
{
"data": {
"id": "acme",
"name": "Acme Inc",
"color": "#6e63e6",
"avatarUrl": null
}
}

PATCH /api/v1/workspaces/{id}

Scope: workspaces:write

Update a workspace. Every field is optional — send only what changes.

Path parameters

NameTypeRequiredDescription
idstringyesThe workspace’s id.

Body

NameTypeRequiredDescription
namestring
colorstringA hex color.
descstringA one-sentence description.

Example

Terminal window
curl -X PATCH "$BARYNT_URL/api/v1/workspaces/$WORKSPACE_ID" \
-H "Authorization: Bearer $BARYNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Acme Corp", "color": "#3b7bd5", "desc": "Product and marketing, together." }'

Request

{
"name": "Acme Corp",
"color": "#3b7bd5",
"desc": "Product and marketing, together."
}

Response

{
"data": { "id": "acme" }
}

DELETE /api/v1/workspaces/{id}

Scope: workspaces:write

Delete a workspace, along with every project and issue in it. This cannot be undone.

Path parameters

NameTypeRequiredDescription
idstringyesThe workspace’s id.

Example

Terminal window
curl -X DELETE "$BARYNT_URL/api/v1/workspaces/$WORKSPACE_ID" \
-H "Authorization: Bearer $BARYNT_API_KEY"

Response

{
"data": { "id": "acme" }
}