Skip to content

Change the workspace

PATCH
/v1/workspace
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.

Media typeapplication/json
object
name
string
>= 1 characters <= 80 characters
defaultRepositoryId

A repository id from GET /v1/github/repositories, enabled for sync. Null clears the default.

string | null format: uuid
Examplegenerated
{
"name": "example",
"defaultRepositoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The workspace.

Media typeapplication/json
object
id
required

A UUID this API issued.

string format: uuid
name
required
string
slug
required

Lowercase letters, digits and hyphens.

string
>= 2 characters <= 40 characters /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/
createdAt
required
string format: date-time
role
required

The calling person’s role in this workspace.

string
Allowed values: owner admin member viewer
github
required

The state of this workspace’s GitHub connection.

object
connected
required
boolean
accountLogin
required
string | null
suspended
required
boolean
defaultRepository
required

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
id
required

A UUID this API issued.

string format: uuid
fullName
required
string
Example
{
"slug": "acme",
"role": "owner",
"defaultRepository": {
"fullName": "mersoft-corp/issues"
}
}

No valid credentials.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The workspace’s billing has lapsed, so writes are refused.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Authenticated, but not permitted.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

No such resource, or it is not visible to you.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request conflicts with the current state.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

The request did not match the expected shape.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}

Rate limited. Retry after the interval in the header.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
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.

Media typeapplication/json
object
error
required
object
code
required

A stable identifier for the kind of failure. Safe to branch on.

string
message
required

What went wrong, written for a person.

string
detail

Structured particulars, when there are any.

object
key
additional properties
remedy

What to do about it, when there is something to do.

string
requestId
required

Quote this when asking about a specific failure.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": {
"additionalProperty": "example"
},
"remedy": "example",
"requestId": "example"
}
}