REST API endpoints for Copilot Spaces
Use the REST API to manage Copilot Spaces and related resources.
List organization Copilot Spaces
Lists Copilot Spaces owned by an organization. The authenticated user must have read access to the organization's Copilot Spaces.
Only Spaces that are readable by the authenticated user are returned. This includes public Spaces and internal Spaces if the user is a member of the organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
"List organization Copilot Spaces"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Copilot Spaces" organization permissions (read)
"List organization Copilot Spaces"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
| 이름, 유형, 설명 |
|---|
per_page integer The number of results per page (max 100). 기본값: |
before string A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. |
after string A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. |
"List organization Copilot Spaces"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
"List organization Copilot Spaces"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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-spacesExample response for listing organization copilot spaces
Status: 200{
"spaces": [
{
"id": 84,
"number": 3,
"name": "Team Planning Space",
"description": "Organization space for team planning and coordination",
"owner": {
"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",
"gravatar_id": "",
"name": "octo-org",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "octo-org",
"html_url": "https://github.com/octo-org",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"creator": {
"login": "defunkt",
"id": 2,
"node_id": "MDQ6VXNlcjI=",
"avatar_url": "https://github.com/images/error/defunkt_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/defunkt",
"html_url": "https://github.com/defunkt",
"followers_url": "https://api.github.com/users/defunkt/followers",
"following_url": "https://api.github.com/users/defunkt/following{/other_user}",
"gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/defunkt/subscriptions",
"organizations_url": "https://api.github.com/users/defunkt/orgs",
"repos_url": "https://api.github.com/users/defunkt/repos",
"events_url": "https://api.github.com/users/defunkt/events{/privacy}",
"received_events_url": "https://api.github.com/users/defunkt/received_events",
"type": "User",
"site_admin": true
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octo-org/3",
"api_url": "https://api.github.com/organizations/1/copilot-spaces/3"
},
{
"id": 85,
"number": 4,
"name": "Development Resources",
"description": "Shared development documentation and resources",
"owner": {
"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",
"gravatar_id": "",
"name": "octo-org",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "octo-org",
"html_url": "https://github.com/octo-org",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"creator": {
"login": "octocat",
"id": 3,
"node_id": "MDQ6VXNlcjM=",
"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",
"site_admin": false
},
"created_at": "2023-02-16T10:15:00Z",
"updated_at": "2023-02-16T16:30:00Z",
"html_url": "https://github.com/copilot/spaces/octo-org/4",
"api_url": "https://api.github.com/organizations/1/copilot-spaces/4"
}
]
}Create an organization Copilot Space
Creates a new Copilot Space owned by an organization. The authenticated user must have permissions to create spaces in the organization.
Organization members with appropriate permissions can create Copilot Spaces to be shared within their organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
"Create an organization Copilot Space"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Copilot Spaces" organization permissions (write)
"Create an organization Copilot Space"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
| 이름, 유형, 설명 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
name string 필수The name of the Copilot Space. | ||||||||||
description string A description of the Copilot Space. | ||||||||||
general_instructions string General instructions for the Copilot Space. | ||||||||||
base_role string The base role that determines default permissions for organization members.
기본값: 다음 중 하나일 수 있습니다.: | ||||||||||
resources_attributes array of objects Resources to attach to the space. | ||||||||||
Properties of |
| 이름, 유형, 설명 | ||||||
|---|---|---|---|---|---|---|
resource_type string The type of resource. 다음 중 하나일 수 있습니다.: | ||||||
metadata object Metadata specific to the resource type. | ||||||
Properties of |
| 이름, 유형, 설명 |
|---|
repository_id integer Repository ID for repository or file resources. |
file_path string File path for file resources. |
text string Text content for free text resources. |
name string Name for the resource. |
number integer Issue or PR number. |
"Create an organization Copilot Space"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
201 | Created |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Create an organization Copilot Space"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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 \
-d '{"name":"Team Planning Space","description":"Organization space for team planning and coordination","general_instructions":"Help the team with planning and coordination tasks","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":123456,"file_path":"docs/planning.md"}},{"resource_type":"free_text","metadata":{"name":"Team Guidelines","text":"Our team follows agile methodology and holds daily standups"}}]}'Example response for an organization copilot space
Status: 201{
"id": 84,
"number": 3,
"name": "Team Planning Space",
"description": "Organization space for team planning and coordination",
"general_instructions": "Help the team with agile planning, sprint coordination, and project management best practices",
"owner": {
"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",
"gravatar_id": "",
"name": "octo-org",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "octo-org",
"html_url": "https://github.com/octo-org",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"creator": {
"login": "defunkt",
"id": 2,
"node_id": "MDQ6VXNlcjI=",
"avatar_url": "https://github.com/images/error/defunkt_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/defunkt",
"html_url": "https://github.com/defunkt",
"followers_url": "https://api.github.com/users/defunkt/followers",
"following_url": "https://api.github.com/users/defunkt/following{/other_user}",
"gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/defunkt/subscriptions",
"organizations_url": "https://api.github.com/users/defunkt/orgs",
"repos_url": "https://api.github.com/users/defunkt/repos",
"events_url": "https://api.github.com/users/defunkt/events{/privacy}",
"received_events_url": "https://api.github.com/users/defunkt/received_events",
"type": "User",
"site_admin": true
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octo-org/3",
"api_url": "https://api.github.com/organizations/1/copilot-spaces/3",
"base_role": "no_access",
"resources_attributes": [
{
"id": 123,
"resource_type": "github_file",
"metadata": {
"repository_id": 456,
"file_path": "docs/planning.md"
}
},
{
"id": 124,
"resource_type": "free_text",
"metadata": {
"name": "Team Guidelines",
"text": "Our team follows agile methodology"
}
}
]
}Get an organization Copilot Space
Gets details about a specific Copilot Space owned by an organization. The authenticated user must have read access to the Space.
Internal Spaces require the authenticated user to be a member of the organization or have been granted read permissions.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
"Get an organization Copilot Space"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Copilot Spaces" organization permissions (read)
"Get an organization Copilot Space"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
space_number integer 필수The unique identifier of the Copilot Space. |
"Get an organization Copilot Space"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
"Get an organization Copilot Space"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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_NUMBERExample response for an organization copilot space
Status: 200{
"id": 84,
"number": 3,
"name": "Team Planning Space",
"description": "Organization space for team planning and coordination",
"general_instructions": "Help the team with agile planning, sprint coordination, and project management best practices",
"owner": {
"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",
"gravatar_id": "",
"name": "octo-org",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "octo-org",
"html_url": "https://github.com/octo-org",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"creator": {
"login": "defunkt",
"id": 2,
"node_id": "MDQ6VXNlcjI=",
"avatar_url": "https://github.com/images/error/defunkt_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/defunkt",
"html_url": "https://github.com/defunkt",
"followers_url": "https://api.github.com/users/defunkt/followers",
"following_url": "https://api.github.com/users/defunkt/following{/other_user}",
"gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/defunkt/subscriptions",
"organizations_url": "https://api.github.com/users/defunkt/orgs",
"repos_url": "https://api.github.com/users/defunkt/repos",
"events_url": "https://api.github.com/users/defunkt/events{/privacy}",
"received_events_url": "https://api.github.com/users/defunkt/received_events",
"type": "User",
"site_admin": true
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octo-org/3",
"api_url": "https://api.github.com/organizations/1/copilot-spaces/3",
"base_role": "no_access",
"resources_attributes": [
{
"id": 123,
"resource_type": "github_file",
"metadata": {
"repository_id": 456,
"file_path": "docs/planning.md"
}
},
{
"id": 124,
"resource_type": "free_text",
"metadata": {
"name": "Team Guidelines",
"text": "Our team follows agile methodology"
}
}
]
}Set an organization Copilot Space
Updates a Copilot Space owned by an organization. The authenticated user must have permissions to update spaces in the organization.
Organization members with appropriate permissions can update Copilot Spaces owned by their organization.
OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
"Set an organization Copilot Space"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Copilot Spaces" organization permissions (write)
"Set an organization Copilot Space"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
space_number integer 필수The unique identifier of the Copilot Space. |
| 이름, 유형, 설명 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
name string The name of the Copilot Space. | ||||||||||
description string A description of the Copilot Space. | ||||||||||
general_instructions string General instructions for the Copilot Space. | ||||||||||
base_role string The base role that determines default permissions for organization members. Changing this field requires admin permissions.
다음 중 하나일 수 있습니다.: | ||||||||||
resources_attributes array of objects Resources to attach to the space. | ||||||||||
Properties of |
| 이름, 유형, 설명 | ||||||
|---|---|---|---|---|---|---|
resource_type string The type of resource. 다음 중 하나일 수 있습니다.: | ||||||
metadata object Metadata specific to the resource type. | ||||||
Properties of |
| 이름, 유형, 설명 |
|---|
repository_id integer Repository ID for repository or file resources. |
file_path string File path for file resources. |
text string Text content for free text resources. |
name string Name for the resource. |
number integer Issue or PR number. |
"Set an organization Copilot Space"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Set an organization Copilot Space"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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 \
-d '{"name":"Updated Team Planning Space","description":"Updated organization space for team planning and coordination","general_instructions":"Updated instructions to help the team with planning and coordination tasks","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":123456,"file_path":"docs/updated-planning.md"}},{"id":789,"_destroy":true},{"id":456,"resource_type":"free_text","metadata":{"name":"Updated Team Guidelines","text":"Our updated team follows agile methodology and holds daily standups"}}]}'Example response for an organization copilot space
Status: 200{
"id": 84,
"number": 3,
"name": "Team Planning Space",
"description": "Organization space for team planning and coordination",
"general_instructions": "Help the team with agile planning, sprint coordination, and project management best practices",
"owner": {
"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",
"gravatar_id": "",
"name": "octo-org",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "octo-org",
"html_url": "https://github.com/octo-org",
"created_at": "2008-01-14T04:33:35Z",
"updated_at": "2017-08-17T12:37:15Z",
"type": "Organization"
},
"creator": {
"login": "defunkt",
"id": 2,
"node_id": "MDQ6VXNlcjI=",
"avatar_url": "https://github.com/images/error/defunkt_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/defunkt",
"html_url": "https://github.com/defunkt",
"followers_url": "https://api.github.com/users/defunkt/followers",
"following_url": "https://api.github.com/users/defunkt/following{/other_user}",
"gists_url": "https://api.github.com/users/defunkt/gists{/gist_id}",
"starred_url": "https://api.github.com/users/defunkt/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/defunkt/subscriptions",
"organizations_url": "https://api.github.com/users/defunkt/orgs",
"repos_url": "https://api.github.com/users/defunkt/repos",
"events_url": "https://api.github.com/users/defunkt/events{/privacy}",
"received_events_url": "https://api.github.com/users/defunkt/received_events",
"type": "User",
"site_admin": true
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octo-org/3",
"api_url": "https://api.github.com/organizations/1/copilot-spaces/3",
"base_role": "no_access",
"resources_attributes": [
{
"id": 123,
"resource_type": "github_file",
"metadata": {
"repository_id": 456,
"file_path": "docs/planning.md"
}
},
{
"id": 124,
"resource_type": "free_text",
"metadata": {
"name": "Team Guidelines",
"text": "Our team follows agile methodology"
}
}
]
}Delete an organization Copilot Space
Deletes a Copilot Space owned by an organization. The authenticated user must have permissions to delete spaces in the organization.
Warning: This action is permanent and cannot be undone. Deleting a Copilot Space will remove all associated resources and configurations.
Organization members with appropriate permissions can delete Copilot Spaces owned by their organization.
OAuth app tokens and personal access tokens (classic) need both the read:org and repo scopes to use this endpoint.
"Delete an organization Copilot Space"에 대한 세분화된 액세스 토큰
이 엔드포인트는 다음 세분화된 토큰 형식에서 작동합니다.:
세분화된 토큰은 필수 권한 집합을 포함해야 합니다.:
- "Copilot Spaces" organization permissions (write)
"Delete an organization Copilot Space"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
org string 필수The organization name. The name is not case sensitive. |
space_number integer 필수The unique identifier of the Copilot Space. |
"Delete an organization Copilot Space"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
204 | The Copilot Space has been successfully deleted. |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Delete an organization Copilot Space"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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_NUMBERThe Copilot Space has been successfully deleted.
Status: 204List Copilot Spaces for a user
Lists Copilot Spaces owned by a user. The authenticated user must have read access to the user's Copilot Spaces.
Only Spaces that are readable by the authenticated user are returned. This includes the user's own spaces, and public user spaces when accessing another user's spaces.
OAuth app tokens and personal access tokens (classic) need the read:user scope to use this endpoint.
"List Copilot Spaces for a user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"List Copilot Spaces for a user"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
username string 필수The handle for the GitHub user account. |
| 이름, 유형, 설명 |
|---|
per_page integer The number of results per page (max 100). 기본값: |
before string A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. |
after string A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. |
"List Copilot Spaces for a user"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
"List Copilot Spaces for a user"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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-spacesExample response for listing user copilot spaces
Status: 200{
"spaces": [
{
"id": 42,
"number": 1,
"name": "Personal Research Space",
"description": "My personal space for research and development",
"owner": {
"login": "octocat",
"id": 3,
"node_id": "MDQ6VXNlcjM=",
"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",
"site_admin": false
},
"creator": {
"login": "octocat",
"id": 3,
"node_id": "MDQ6VXNlcjM=",
"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",
"site_admin": false
},
"created_at": "2023-02-16T10:15:00Z",
"updated_at": "2023-02-16T16:30:00Z",
"html_url": "https://github.com/copilot/spaces/octocat/1",
"api_url": "https://api.github.com/user/1/copilot-spaces/1"
},
{
"id": 43,
"number": 2,
"name": "Learning Space",
"description": "Space for learning new technologies",
"owner": {
"login": "octocat",
"id": 3,
"node_id": "MDQ6VXNlcjM=",
"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",
"site_admin": false
},
"creator": {
"login": "octocat",
"id": 3,
"node_id": "MDQ6VXNlcjM=",
"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",
"site_admin": false
},
"created_at": "2023-02-17T08:20:00Z",
"updated_at": "2023-02-17T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octocat/2",
"api_url": "https://api.github.com/user/1/copilot-spaces/2"
}
]
}Create a Copilot Space for a user
Creates a new Copilot Space owned by a user. Only the authenticated user can create spaces for their own account.
Users can create personal Copilot Spaces for their individual use.
OAuth app tokens and personal access tokens (classic) need the read:user scope to use this endpoint.
"Create a Copilot Space for a user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Create a Copilot Space for a user"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
username string 필수The handle for the GitHub user account. |
| 이름, 유형, 설명 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
name string 필수The name of the Copilot Space. | ||||||||||
description string A description of the Copilot Space. | ||||||||||
general_instructions string General instructions for the Copilot Space. | ||||||||||
base_role string The base role that determines default permissions for the space.
기본값: 다음 중 하나일 수 있습니다.: | ||||||||||
resources_attributes array of objects Resources to attach to the space. | ||||||||||
Properties of |
| 이름, 유형, 설명 | ||||||
|---|---|---|---|---|---|---|
resource_type string The type of resource. 다음 중 하나일 수 있습니다.: | ||||||
metadata object Metadata specific to the resource type. | ||||||
Properties of |
| 이름, 유형, 설명 |
|---|
repository_id integer Repository ID for repository or file resources. |
file_path string File path for file resources. |
text string Text content for free text resources. |
name string Name for the resource. |
number integer Issue or PR number. |
"Create a Copilot Space for a user"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
201 | Created |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Create a Copilot Space for a user"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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 \
-d '{"name":"My Development Space","description":"Personal space for development assistance","general_instructions":"Help me with React development patterns and best practices","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":789012,"file_path":"src/components/App.js"}},{"resource_type":"free_text","metadata":{"name":"Development Notes","text":"Focus on clean code principles and modern React patterns"}}]}'Example response for a user copilot space
Status: 201{
"id": 42,
"number": 5,
"name": "My Development Space",
"description": "Personal space for React development patterns",
"general_instructions": "Focus on React functional components, hooks, and modern development patterns",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octocat/5",
"api_url": "https://api.github.com/user/1/copilot-spaces/5",
"base_role": "no_access",
"resources_attributes": [
{
"id": 789,
"resource_type": "github_file",
"metadata": {
"repository_id": 1234,
"file_path": "src/components/App.tsx"
}
},
{
"id": 790,
"resource_type": "free_text",
"metadata": {
"name": "React Best Practices",
"text": "Use functional components with hooks"
}
}
]
}Get a Copilot Space for a user
Gets details about a specific Copilot Space owned by a user. The authenticated user must have read access to the Space.
Private user spaces require the authenticated user to be the owner of the space. Public user spaces are accessible to any authenticated user.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
"Get a Copilot Space for a user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Get a Copilot Space for a user"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
username string 필수The handle for the GitHub user account. |
space_number integer 필수The unique identifier of the Copilot Space. |
"Get a Copilot Space for a user"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
"Get a Copilot Space for a user"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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_NUMBERExample response for a user copilot space
Status: 200{
"id": 42,
"number": 5,
"name": "My Development Space",
"description": "Personal space for React development patterns",
"general_instructions": "Focus on React functional components, hooks, and modern development patterns",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octocat/5",
"api_url": "https://api.github.com/user/1/copilot-spaces/5",
"base_role": "no_access",
"resources_attributes": [
{
"id": 789,
"resource_type": "github_file",
"metadata": {
"repository_id": 1234,
"file_path": "src/components/App.tsx"
}
},
{
"id": 790,
"resource_type": "free_text",
"metadata": {
"name": "React Best Practices",
"text": "Use functional components with hooks"
}
}
]
}Set a Copilot Space for a user
Updates a Copilot Space owned by a user. Only the authenticated user can update spaces for their own account.
Users can update their personal Copilot Spaces.
OAuth app tokens and personal access tokens (classic) need the read:user scope to use this endpoint.
"Set a Copilot Space for a user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Set a Copilot Space for a user"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
username string 필수The handle for the GitHub user account. |
space_number integer 필수The unique identifier of the Copilot Space. |
| 이름, 유형, 설명 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
name string The name of the Copilot Space. | ||||||||||
description string A description of the Copilot Space. | ||||||||||
general_instructions string General instructions for the Copilot Space. | ||||||||||
base_role string The base role that determines default permissions for the space. Changing this field requires admin permissions.
다음 중 하나일 수 있습니다.: | ||||||||||
resources_attributes array of objects Resources to attach to the space. | ||||||||||
Properties of |
| 이름, 유형, 설명 | ||||||
|---|---|---|---|---|---|---|
resource_type string The type of resource. 다음 중 하나일 수 있습니다.: | ||||||
metadata object Metadata specific to the resource type. | ||||||
Properties of |
| 이름, 유형, 설명 |
|---|
repository_id integer Repository ID for repository or file resources. |
file_path string File path for file resources. |
text string Text content for free text resources. |
name string Name for the resource. |
number integer Issue or PR number. |
"Set a Copilot Space for a user"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
200 | OK |
403 | Forbidden |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Set a Copilot Space for a user"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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 \
-d '{"name":"Updated Development Space","description":"Updated personal space for development assistance","general_instructions":"Updated instructions to help me with React development patterns and best practices","resources_attributes":[{"resource_type":"github_file","metadata":{"repository_id":789012,"file_path":"src/components/UpdatedApp.js"}},{"id":123,"_destroy":true},{"id":456,"resource_type":"free_text","metadata":{"name":"Updated Development Notes","text":"Updated focus on clean code principles and modern React patterns"}}]}'Example response for a user copilot space
Status: 200{
"id": 42,
"number": 5,
"name": "My Development Space",
"description": "Personal space for React development patterns",
"general_instructions": "Focus on React functional components, hooks, and modern development patterns",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"creator": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"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",
"site_admin": false
},
"created_at": "2023-02-15T08:30:00Z",
"updated_at": "2023-02-15T14:45:00Z",
"html_url": "https://github.com/copilot/spaces/octocat/5",
"api_url": "https://api.github.com/user/1/copilot-spaces/5",
"base_role": "no_access",
"resources_attributes": [
{
"id": 789,
"resource_type": "github_file",
"metadata": {
"repository_id": 1234,
"file_path": "src/components/App.tsx"
}
},
{
"id": 790,
"resource_type": "free_text",
"metadata": {
"name": "React Best Practices",
"text": "Use functional components with hooks"
}
}
]
}Delete a Copilot Space for a user
Deletes a Copilot Space owned by a user. The authenticated user must be the owner of the space.
Warning: This action is permanent and cannot be undone. Deleting a space will remove all associated resources and configurations.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.
"Delete a Copilot Space for a user"에 대한 세분화된 액세스 토큰
이 엔드포인트는 GitHub 앱 사용자 액세스 토큰, GitHub 앱 설치 액세스 토큰 또는 세분화된 개인용 액세스 토큰에서 작동하지 않습니다.
"Delete a Copilot Space for a user"에 대한 매개 변수
| 이름, 유형, 설명 |
|---|
accept string Setting to |
| 이름, 유형, 설명 |
|---|
username string 필수The handle for the GitHub user account. |
space_number integer 필수The unique identifier of the Copilot Space. |
"Delete a Copilot Space for a user"에 대한 HTTP 응답 상태 코드
| 상태 코드 | 설명 |
|---|---|
204 | The Copilot Space has been successfully deleted. |
404 | Resource not found |
422 | Validation failed, or the endpoint has been spammed. |
"Delete a Copilot Space for a user"에 대한 코드 샘플
GitHub에 GHE.com으로 액세스하는 경우, api.github.com를 api.SUBDOMAIN.ghe.com에 해당하는 귀하의 엔터프라이즈 전용 하위 도메인으로 교체하십시오.
요청 예제
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_NUMBERThe Copilot Space has been successfully deleted.
Status: 204