Skip to content

See who a sync would add to and remove from the GitHub team

GET
/teams/{id}/github-team/sync
Code sample: Shell / cURL
curl --request GET \
--url https://example.com/api/v1/teams/example/github-team/sync \
--header 'Authorization: Bearer <token>'

The plan of the membership sync: who would join the linked GitHub team, who would leave it, and who cannot be added because they have no GitHub account connected. Only direct members of the team are read, so people who belong through a child team are never planned for removal; those not wanted by Chelsea are listed in throughChildTeams for information, since they stay through the child team. Invitations still waiting are listed in pendingInvitations for information and are never cancelled. Carries the confirmationKey that names this plan. Changes nothing. Reads the GitHub team live. Show it to the person before calling the confirm operation. Requires settings.manage and github.manage.

id
required

Resource identifier (CUID2).

string
>= 1 characters

Resource identifier (CUID2).

The plan.

Media typeapplication/json
object
data
required
object
confirmationKey
required

Names this plan. Send it with the confirmation; a confirmation for another plan is refused with a conflict.

string
githubTeamSlug
required
string
isConfirmed
required

Whether a person already confirmed that Chelsea decides who is on the GitHub team.

boolean
linkedTeams
required

The Chelsea teams linked to this GitHub team; their people together are who it should hold.

Array<object>
object
name
required
string
teamId
required
string
notConnected
required

People on a linked team with no GitHub account connected; they cannot be added.

Array<object>
object
memberId
required
string
name
required
string
pendingInvitations
required

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

Array<string>
teamId
required
string
throughChildTeams
required

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>
toAdd
required
Array<object>
object
login
required
string
memberId
required
string
name
required
string
toRemove
required

memberName is set when Chelsea knows the person but they are on no linked team.

Array<object>
object
login
required
string
memberName
required
string | null
unchangedCount
required
integer
>= -9007199254740991 <= 9007199254740991

Example generated

{
"data": {
"confirmationKey": "example",
"githubTeamSlug": "example",
"isConfirmed": true,
"linkedTeams": [
{
"name": "example",
"teamId": "example"
}
],
"notConnected": [
{
"memberId": "example",
"name": "example"
}
],
"pendingInvitations": [
"example"
],
"teamId": "example",
"throughChildTeams": [
"example"
],
"toAdd": [
{
"login": "example",
"memberId": "example",
"name": "example"
}
],
"toRemove": [
{
"login": "example",
"memberName": "example"
}
],
"unchangedCount": 1
}
}

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.