Skip to content
Barynt v1.0.12

Projects

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

Projects hold the issues. They belong to one workspace. 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/{id}/projects

Scope: projects:read

List the projects in a workspace that you can see.

Path parameters

NameTypeRequiredDescription
idstringyesThe workspace’s id.

Example

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

Response

{
"data": [
{
"id": "proj_9f8e7d",
"name": "Website Relaunch",
"slug": "website-relaunch",
"prefix": "WEB",
"color": "#3b7bd5"
}
]
}

POST /api/v1/workspaces/{id}/projects

Scope: projects:write

Create a project in a workspace.

Path parameters

NameTypeRequiredDescription
idstringyesThe workspace’s id.

Body

NameTypeRequiredDescription
namestringyes
descstringA one-sentence description.
prefixstringUp to 4 letters, used in issue refs (e.g. “WEB”). Derived from the name if omitted, appended with a number if already taken.
colorstringyesA hex color.
visibility"public" | "private"A public project enrolls every workspace member. Default “public”.

Example

Terminal window
curl -X POST "$BARYNT_URL/api/v1/workspaces/$WORKSPACE_ID/projects" \
-H "Authorization: Bearer $BARYNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Website Relaunch", "desc": "Marketing site rebuild for Q2.", "prefix": "WEB", "color": "#3b7bd5", "visibility": "public" }'

Request

{
"name": "Website Relaunch",
"desc": "Marketing site rebuild for Q2.",
"prefix": "WEB",
"color": "#3b7bd5",
"visibility": "public"
}

Response

// 201 Created
{
"data": {
"id": "proj_9f8e7d",
"name": "Website Relaunch",
"slug": "website-relaunch",
"prefix": "WEB",
"color": "#3b7bd5"
}
}

PATCH /api/v1/projects/{id}

Scope: projects:write

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

Path parameters

NameTypeRequiredDescription
idstringyesThe project’s id.

Body

NameTypeRequiredDescription
namestring
descstring
prefixstringUp to 4 letters.
colorstringA hex color.
visibility"public" | "private"

Example

Terminal window
curl -X PATCH "$BARYNT_URL/api/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $BARYNT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Website Relaunch 2.0", "desc": "Now with a checkout redesign.", "prefix": "WEB2", "color": "#3b7bd5", "visibility": "private" }'

Request

{
"name": "Website Relaunch 2.0",
"desc": "Now with a checkout redesign.",
"prefix": "WEB2",
"color": "#3b7bd5",
"visibility": "private"
}

Response

{
"data": { "id": "proj_9f8e7d" }
}

DELETE /api/v1/projects/{id}

Scope: projects:write

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

Path parameters

NameTypeRequiredDescription
idstringyesThe project’s id.

Example

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

Response

{
"data": { "id": "proj_9f8e7d" }
}