Set the base permission
Set what every member of a workspace gets on each of its repositories: none, read, write (the default) or admin.
/workspaces/{workspace}Owners always have Admin, and a role given on a repository directly still counts where it is higher. With none, members see only the private repositories they are given a role on. Owners only, signed in as a person.
base_permission is none, read, write (the default) or admin. Owners keep Admin, and a role given on a repository directly still counts where it is higher. Refused with 403 for anyone but an owner signed in as a person. See Access and roles.
- Authentication: Required. Send an access token as
Authorization: Bearer. - MCP tool:
set_base_permission, with the same inputs
Path parameters
Section titled “Path parameters”| Name | Type | Required | Description |
|---|---|---|---|
workspace |
string | Yes | The workspace’s slug, e.g. “flagon-io”. |
Body parameters
Section titled “Body parameters”Send a JSON object. Names are snake_case, as in responses; the camelCase spelling is accepted too.
| Name | Type | Required | Description |
|---|---|---|---|
base_permission |
string | Yes | What every member gets on each repository: none, read, write or admin. One of none, read, write, admin. |
Example request
Section titled “Example request”curl -X PATCH https://api.g1t.sh/workspaces/flagon-io \ -H "Authorization: Bearer $G1T_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "base_permission": "read" }'Example response
Section titled “Example response”A successful request answers 200 with:
{ "workspace": "flagon-io", "base_permission": "read"}Errors
Section titled “Errors”A failed request answers with one of these statuses and a body like {"error": {"code": "not_found", "message": "Repository not found."}}. See errors.
| Status | Code | When |
|---|---|---|
| 401 | unauthenticated |
A token is required, or the one sent is not valid. |
| 403 | forbidden |
The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | not_found |
It does not exist, or you cannot see it. |
| 409 | conflict |
The request conflicts with the current state. |
| 422 | invalid |
The input is not valid. message says which field and why. |