Change the workspace
const url = 'https://api.pealboard.com/v1/workspace';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","defaultRepositoryId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.pealboard.com/v1/workspace \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "defaultRepositoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Changes the workspace’s name and its default repository. Only the fields sent are changed. The slug is not editable: it is an identifier other things point at, and changing it would break links that are already in people’s mail.
defaultRepositoryId is where an issue goes when nobody chose a repository. POST /v1/issues uses it when repositoryId is omitted, and a portal’s request types fall back to it. It has to name a repository of this workspace that is enabled for sync — an issue created in a repository Pealboard does not mirror is written to GitHub and then never seen here again, which reads as the write having failed — and anything else is a 422. null clears it. GET /v1/github/default-repository/suggestion proposes one.
Access. Requires the admin role or above (admin, owner). Renaming the workspace changes what every member and every portal link shows. API-key scope: workspace:write.
Billing. Refused with 402 while the workspace’s billing has lapsed. Reads continue and nothing is deleted.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
A repository id from GET /v1/github/repositories, enabled for sync. Null clears the default.
Examplegenerated
{ "name": "example", "defaultRepositoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”The workspace.
object
A UUID this API issued.
Lowercase letters, digits and hyphens.
The calling person’s role in this workspace.
The state of this workspace’s GitHub connection.
object
Where an issue goes when nobody chose a repository. POST /v1/issues uses it when repositoryId is omitted, and a portal’s request types fall back to it. Null until an admin sets one; GET /v1/github/default-repository/suggestion proposes one.
object
A UUID this API issued.
Example
{ "slug": "acme", "role": "owner", "defaultRepository": { "fullName": "mersoft-corp/issues" }}No valid credentials.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The workspace’s billing has lapsed, so writes are refused.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Authenticated, but not permitted.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}No such resource, or it is not visible to you.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request conflicts with the current state.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}The request did not match the expected shape.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}Rate limited. Retry after the interval in the header.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}GitHub or another dependency refused or did not answer. Nothing in the workspace changed.
object
object
A stable identifier for the kind of failure. Safe to branch on.
What went wrong, written for a person.
Structured particulars, when there are any.
object
What to do about it, when there is something to do.
Quote this when asking about a specific failure.
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": { "additionalProperty": "example" }, "remedy": "example", "requestId": "example" }}