Skip to content

Link a Chelsea team to a GitHub team

PUT
/teams/{id}/github-team
Code sample: Shell / cURL
curl --request PUT \
--url https://example.com/api/v1/teams/example/github-team \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "defaultPermission": "pull", "slug": "example" }'

Links the team to a GitHub team of the organization, with what the team gets on a new repository. A project’s new repository then gives the team’s GitHub team access. Linking again replaces the link and keeps its sync state. Requires settings.manage, github.view and github.manage.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

Media typeapplication/json
object
defaultPermission

What the team gets on a new repository; push (Write) when omitted.

string
Allowed values: pull triage push maintain admin
slug
required

The slug of the GitHub team to link.

string
/^(?!\.{1,2}$)[A-Za-z0-9._-]{1,100}$/

The link.

Media typeapplication/json
object
data
required
object
defaultPermission
required
string
Allowed values: pull triage push maintain admin
githubTeamId
required
string
slug
required
string
sync

Where the membership sync of this link stands. Absent on an older server.

object
confirmedAt
required

When a person confirmed that Chelsea decides who is on the GitHub team; null before.

string | null
lastResult
required
Any of:
object
added
required

GitHub logins added to the team.

Array<string>
message
required

Why a failed run stopped, in a sentence.

string | null
pendingInvitations

Invited to the GitHub team and not yet in it. Information only: a sync never cancels an invitation.

Array<string>
refused
required

People GitHub or Chelsea refused to add or remove, with the reason.

Array<object>
object
login
required
string
reason
required
string
removed
required

GitHub logins taken out of the team; they stay in the organization.

Array<string>
status
required

synced when everything applied, partial when GitHub refused some, failed when none ran.

string
Allowed values: synced partial failed
throughChildTeams

On the team through a child team and not wanted by Chelsea. Information only: they stay, and a sync does not change them.

Array<string>
lastSyncedAt
required

When the last run finished; null before.

string | null
teamId
required
string

Example

{
"data": {
"defaultPermission": "pull",
"sync": {
"lastResult": {
"status": "synced"
}
}
}
}

Validation error. Parse failures include field paths and expectations.

Media typeapplication/json

Validation error with safe field paths and expected values; submitted values are never returned.

object
error
required
object
code
required

Stable machine-readable error code.

string
issues
Array<object>
object
expected
required
string
message
required
string
path
required
Array<string | number>
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Unauthorized.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Forbidden.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Not found.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Conflict.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Invalid input.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

GitHub failed (GITHUB_API_ERROR), or Chelsea’s GitHub App or the organization has not granted the access this needs (GITHUB_ACCESS_MISSING; the message names the step in Settings, Integrations, GitHub).

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}

Rate limit exceeded. Wait for Retry-After before retrying.

Media typeapplication/json

Standard error envelope.

object
error
required
object
code
required

Stable machine-readable error code.

string
message
required

Human-readable error message.

string
status
required

HTTP status code, mirrored in the body.

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"error": {
"code": "UNAUTHORIZED"
}
}
RateLimit-Limit
string
/^\d+$/

Maximum requests in the current quota window.

RateLimit-Policy
string

Quota policy in requests and window seconds, for example 60;w=60.

RateLimit-Remaining
string
/^\d+$/

Requests left in this quota window (zero when blocked).

RateLimit-Reset
string
/^\d+$/

Seconds until the current quota window resets, when available from the rate-limit store.

Retry-After
string
/^\d+$/

Seconds until another request may be attempted.