Skip to main content
이제 REST API의 버전이 지정되었습니다. 자세한 내용은 "API 버전 관리 정보"를 참조하세요.

Copilot Spaces collaborators

Use the REST API to manage collaborators for Copilot Spaces.

List collaborators for an organization Copilot Space

Lists all collaborators for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to view collaborators.

Each collaborator entry specifies which user or team has access to the space and at what level (reader, writer, or admin). The space owner (organization) is excluded from this list.

Note: Team collaborators listed here are teams that are defined in the organization.

OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

"List collaborators for an organization Copilot Space"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "GitHub Copilot Business" organization permissions (read)

"List collaborators for an organization Copilot Space"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

space_number integer 필수

The unique identifier of the Copilot Space.

"List collaborators for an organization Copilot Space"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

403

Forbidden

404

Resource not found

"List collaborators for an organization Copilot Space"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

get/orgs/{org}/copilot-spaces/{space_number}/collaborators
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators

Response

Status: 200
{ "collaborators": [ { "actor_type": "User", "role": "writer", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }, { "actor_type": "Team", "role": "reader", "id": 67890, "node_id": "MDQ6VGVhbTY3ODkw", "url": "https://api.github.com/teams/67890", "html_url": "https://github.com/orgs/octo-org/teams/developers", "name": "Developers", "slug": "developers", "description": "Team of developers", "privacy": "closed", "notification_setting": "notifications_enabled", "members_url": "https://api.github.com/teams/67890/members{/member}", "repositories_url": "https://api.github.com/teams/67890/repos", "parent": null, "created_at": "2017-07-14T16:53:42Z", "updated_at": "2017-08-17T12:37:15Z", "organization": { "login": "octo-org", "id": 1, "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=", "url": "https://api.github.com/orgs/octo-org", "repos_url": "https://api.github.com/orgs/octo-org/repos", "events_url": "https://api.github.com/orgs/octo-org/events", "hooks_url": "https://api.github.com/orgs/octo-org/hooks", "issues_url": "https://api.github.com/orgs/octo-org/issues", "members_url": "https://api.github.com/orgs/octo-org/members{/member}", "public_members_url": "https://api.github.com/orgs/octo-org/public_members{/member}", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "description": "A great organization" } } ] }

Add a collaborator to an organization Copilot Space

Adds a collaborator (user or team) to a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

Note: When adding users as collaborators, they must already be members of the organization. When adding teams as collaborators, they must be defined in the organization.

OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

"Add a collaborator to an organization Copilot Space"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)

"Add a collaborator to an organization Copilot Space"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

space_number integer 필수

The unique identifier of the Copilot Space.

본문 매개 변수
이름, 유형, 설명
actor_type string 필수

The type of actor (user or team).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

role string 필수

The role to grant to the collaborator.

다음 중 하나일 수 있습니다.: reader, writer, admin

"Add a collaborator to an organization Copilot Space"에 대한 HTTP 응답 상태 코드

상태 코드설명
201

Created

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

"Add a collaborator to an organization Copilot Space"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

post/orgs/{org}/copilot-spaces/{space_number}/collaborators
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators \ -d '{"actor_type":"User","actor_identifier":"octocat","role":"writer"}'

Response

Status: 201
{ "actor_type": "User", "role": "writer", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }

Set a collaborator role for an organization Copilot Space

Updates the role of a collaborator for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

"Set a collaborator role for an organization Copilot Space"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)

"Set a collaborator role for an organization Copilot Space"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

space_number integer 필수

The unique identifier of the Copilot Space.

actor_type string 필수

The type of actor (user or team).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

본문 매개 변수
이름, 유형, 설명
role string 필수

The new role to grant to the collaborator. Use no_access to remove the collaborator.

다음 중 하나일 수 있습니다.: reader, writer, admin, no_access

"Set a collaborator role for an organization Copilot Space"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

204

Response when role is no_access and the collaborator was removed.

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

"Set a collaborator role for an organization Copilot Space"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

put/orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER \ -d '{"role":"admin"}'

Response

Status: 200
{ "actor_type": "User", "role": "admin", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }

Remove a collaborator from an organization Copilot Space

Removes a collaborator from a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

OAuth app tokens and personal access tokens (classic) need the write:org scope to use this endpoint.

"Remove a collaborator from an organization Copilot Space"에 대한 세분화된 액세스 토큰

이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:

세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:

  • "GitHub Copilot Business" organization permissions (write)

"Remove a collaborator from an organization Copilot Space"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
org string 필수

The organization name. The name is not case sensitive.

space_number integer 필수

The unique identifier of the Copilot Space.

actor_type string 필수

The type of actor (user or team).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.

"Remove a collaborator from an organization Copilot Space"에 대한 HTTP 응답 상태 코드

상태 코드설명
204

No Content

403

Forbidden

404

Resource not found

"Remove a collaborator from an organization Copilot Space"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

delete/orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/orgs/ORG/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER

Response

Status: 204

List collaborators for a Copilot Space for a user

Lists all collaborators for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Each collaborator entry specifies which user has access to the space and at what level (reader, writer, or admin). The space owner is excluded from this list.

Team collaborators are not supported for user-owned Copilot Spaces.

OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

"List collaborators for a Copilot Space for a user"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

"List collaborators for a Copilot Space for a user"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
username string 필수

The handle for the GitHub user account.

space_number integer 필수

The unique identifier of the Copilot Space.

"List collaborators for a Copilot Space for a user"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

403

Forbidden

404

Resource not found

"List collaborators for a Copilot Space for a user"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

get/users/{username}/copilot-spaces/{space_number}/collaborators
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators

Response

Status: 200
{ "collaborators": [ { "actor_type": "User", "role": "writer", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }, { "actor_type": "User", "role": "reader", "login": "github-user", "id": 67890, "node_id": "MDQ6VXNlcjY3ODkw", "avatar_url": "https://github.com/images/error/other_user.gif", "gravatar_id": "", "url": "https://api.github.com/users/github-user", "html_url": "https://github.com/github-user", "followers_url": "https://api.github.com/users/github-user/followers", "following_url": "https://api.github.com/users/github-user/following{/other_user}", "gists_url": "https://api.github.com/users/github-user/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-user/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-user/subscriptions", "organizations_url": "https://api.github.com/users/github-user/orgs", "repos_url": "https://api.github.com/users/github-user/repos", "events_url": "https://api.github.com/users/github-user/events{/privacy}", "received_events_url": "https://api.github.com/users/github-user/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "GitHub User", "company": null, "blog": "", "location": null, "email": null, "hireable": null, "bio": null, "twitter_username": null, "public_repos": 5, "public_gists": 0, "followers": 10, "following": 5, "created_at": "2010-01-14T04:33:35Z", "updated_at": "2010-01-14T04:33:35Z" } ] }

Add a collaborator to a Copilot Space for a user

Adds a collaborator to a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

Team collaborators are not supported for user-owned Copilot Spaces.

OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

"Add a collaborator to a Copilot Space for a user"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

"Add a collaborator to a Copilot Space for a user"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
username string 필수

The handle for the GitHub user account.

space_number integer 필수

The unique identifier of the Copilot Space.

본문 매개 변수
이름, 유형, 설명
actor_type string 필수

The type of actor (must be User for user-owned spaces; Team will be rejected).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username of the collaborator. The numeric user ID is also accepted.

role string 필수

The role to grant to the collaborator.

다음 중 하나일 수 있습니다.: reader, writer, admin

"Add a collaborator to a Copilot Space for a user"에 대한 HTTP 응답 상태 코드

상태 코드설명
201

Created

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

"Add a collaborator to a Copilot Space for a user"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

post/users/{username}/copilot-spaces/{space_number}/collaborators
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators \ -d '{"actor_type":"User","actor_identifier":"octocat","role":"writer"}'

Response

Status: 201
{ "actor_type": "User", "role": "writer", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }

Set a collaborator role for a Copilot Space for a user

Updates the role of a collaborator for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

"Set a collaborator role for a Copilot Space for a user"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

"Set a collaborator role for a Copilot Space for a user"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
username string 필수

The handle for the GitHub user account.

space_number integer 필수

The unique identifier of the Copilot Space.

actor_type string 필수

The type of actor (must be User for user-owned spaces; Team will be rejected).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username of the collaborator. The numeric user ID is also accepted.

본문 매개 변수
이름, 유형, 설명
role string 필수

The new role to grant to the collaborator. Use no_access to remove the collaborator.

다음 중 하나일 수 있습니다.: reader, writer, admin, no_access

"Set a collaborator role for a Copilot Space for a user"에 대한 HTTP 응답 상태 코드

상태 코드설명
200

OK

204

Response when role is no_access and the collaborator was removed.

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

"Set a collaborator role for a Copilot Space for a user"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

put/users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
curl -L \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER \ -d '{"role":"admin"}'

Response

Status: 200
{ "actor_type": "User", "role": "admin", "login": "octocat", "id": 12345, "node_id": "MDQ6VXNlcjEyMzQ1", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "user_view_type": "public", "site_admin": false, "name": "The Octocat", "company": "GitHub", "blog": "https://github.com/blog", "location": "San Francisco", "email": "octocat@github.com", "hireable": false, "bio": "There once was...", "twitter_username": "octocat", "public_repos": 2, "public_gists": 1, "followers": 20, "following": 0, "created_at": "2008-01-14T04:33:35Z", "updated_at": "2008-01-14T04:33:35Z" }

Remove a collaborator from a Copilot Space for a user

Removes a collaborator from a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

"Remove a collaborator from a Copilot Space for a user"에 대한 세분화된 액세스 토큰

이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.

"Remove a collaborator from a Copilot Space for a user"에 대한 매개 변수

머리글
이름, 유형, 설명
accept string

Setting to application/vnd.github+json is recommended.

경로 매개 변수
이름, 유형, 설명
username string 필수

The handle for the GitHub user account.

space_number integer 필수

The unique identifier of the Copilot Space.

actor_type string 필수

The type of actor (must be User for user-owned spaces; Team will be rejected).

다음 중 하나일 수 있습니다.: User, Team

actor_identifier string 필수

The username of the collaborator. The numeric user ID is also accepted.

"Remove a collaborator from a Copilot Space for a user"에 대한 HTTP 응답 상태 코드

상태 코드설명
204

No Content

403

Forbidden

404

Resource not found

"Remove a collaborator from a Copilot Space for a user"에 대한 코드 샘플

GitHub에 GHE.com으로 액세스하는 경우, api.github.comapi.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.

요청 예제

delete/users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
curl -L \ -X DELETE \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/users/USERNAME/copilot-spaces/SPACE_NUMBER/collaborators/ACTOR_TYPE/ACTOR_IDENTIFIER

Response

Status: 204