GitHub: Copilot spaces schemas
4 GitHub schemas with complete fields and constraints.
← Copilot spaces operations · All schemas
Add a collaborator to a Copilot Space for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A collaborator (user or team) of a Copilot Space |
$ (anyOf 1) | JSON | Alternative | |
$ (anyOf 1) (allOf 1) | Model | All variants apply | Expand List users — response body — item |
$ (anyOf 1) (allOf 2) | object | All variants apply | |
$ (anyOf 1) (allOf 2).actor_type | string | Required within parent | The collaborator actor type. Known values: User |
$ (anyOf 1) (allOf 2).role | string | Required within parent | The role granted to the collaborator Known values: reader, writer, admin |
$ (anyOf 2) | object | Alternative | |
$ (anyOf 2).actor_type | string | Required within parent | The collaborator actor type. Known values: Team |
$ (anyOf 2).description | JSON | Optional | |
$ (anyOf 2).description (anyOf 1) | string | Alternative | |
$ (anyOf 2).description (anyOf 2) | null | Alternative | |
$ (anyOf 2).html_url | string | Optional | Format: uri |
$ (anyOf 2).id | JSON | Required within parent | |
$ (anyOf 2).id (anyOf 1) | integer | Alternative | |
$ (anyOf 2).id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 2).members_url | string | Optional | |
$ (anyOf 2).name | string | Required within parent | |
$ (anyOf 2).node_id | string | Required within parent | |
$ (anyOf 2).notification_setting | string | Optional | |
$ (anyOf 2).organization_id | JSON | Optional | |
$ (anyOf 2).organization_id (anyOf 1) | integer | Alternative | |
$ (anyOf 2).organization_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
$ (anyOf 2).parent | JSON | Optional | |
$ (anyOf 2).parent (anyOf 1) | JSON | Alternative | |
$ (anyOf 2).parent (anyOf 2) | null | Alternative | |
$ (anyOf 2).privacy | string | Optional | |
$ (anyOf 2).repositories_url | string | Optional | Format: uri |
$ (anyOf 2).role | string | Required within parent | The role granted to the collaborator Known values: reader, writer, admin |
$ (anyOf 2).slug | string | Required within parent | |
$ (anyOf 2).type | string | Required within parent | Known values: Team |
$ (anyOf 2).url | string | Optional | Format: uri |
Referenced models: List users — response body — item
Get a Copilot Space for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A GitHub Copilot Space represents an interactive AI workspace where users can ask questions and get assistance. Additional keys: not allowed |
api_url | string | Required within parent | The API URL of the space. Format: uri |
base_role | string | Required within parent | The base role that determines default permissions. - `no_access`: No default access - `reader`: Default read permissions - `writer`: Default write permissions (organization spaces only) - `admin`: Default admin permissions (organization spaces only) Known values: reader, writer, admin, no_access |
created_at | string | Required within parent | The date and time the space was created. Format: date-time |
creator | Model | Required within parent | Expand List users — response body — item |
description | JSON | Optional | |
description (anyOf 1) | string | Alternative | A description of the space. |
description (anyOf 2) | null | Alternative | |
general_instructions | JSON | Optional | |
general_instructions (anyOf 1) | string | Alternative | General instructions for the Copilot Space. Maximum length: 4000 |
general_instructions (anyOf 2) | null | Alternative | |
html_url | string | Required within parent | The HTML URL of the space. Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | The unique identifier of the space. Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
name | string | Required within parent | The display name of the space. |
number | JSON | Required within parent | |
number (anyOf 1) | integer | Alternative | The number that identifies the space within its owner. |
number (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
owner | JSON | Required within parent | The user or organization that owns this space. |
owner (anyOf 1) | Model | Alternative | Expand List users — response body — item |
owner (anyOf 2) | Model | Alternative | Expand List organizations — response body — item |
resources_attributes | array | Optional | Resources attached to the space. |
resources_attributes[] | object | Each item | |
resources_attributes[].copilot_chat_attachment_id | JSON | Optional | |
resources_attributes[].copilot_chat_attachment_id (anyOf 1) | JSON | Alternative | |
resources_attributes[].copilot_chat_attachment_id (anyOf 1) (anyOf 1) | integer | Alternative | The unique identifier of the chat attachment for uploaded files or media content. Format: int64 |
resources_attributes[].copilot_chat_attachment_id (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].copilot_chat_attachment_id (anyOf 2) | null | Alternative | |
resources_attributes[].created_at | string | Optional | The date and time the resource was created. Format: date-time |
resources_attributes[].id | JSON | Optional | |
resources_attributes[].id (anyOf 1) | integer | Alternative | The unique identifier of the resource. Format: int64 |
resources_attributes[].id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].metadata | object | Optional | Metadata specific to the resource type. |
resources_attributes[].metadata.copilot_chat_attachment_id | JSON | Optional | |
resources_attributes[].metadata.copilot_chat_attachment_id (anyOf 1) | integer | Alternative | Chat attachment ID for uploaded files or media. |
resources_attributes[].metadata.copilot_chat_attachment_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].metadata.file_path | string | Optional | File path for file resources. |
resources_attributes[].metadata.height | JSON | Optional | |
resources_attributes[].metadata.height (anyOf 1) | integer | Alternative | Height for media content resources. |
resources_attributes[].metadata.height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].metadata.media_type | string | Optional | Media type for media content resources. |
resources_attributes[].metadata.name | string | Optional | Name for the resource. |
resources_attributes[].metadata.number | JSON | Optional | |
resources_attributes[].metadata.number (anyOf 1) | integer | Alternative | Issue or PR number. |
resources_attributes[].metadata.number (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].metadata.repository_id | JSON | Optional | |
resources_attributes[].metadata.repository_id (anyOf 1) | integer | Alternative | Repository ID for repository or file resources. |
resources_attributes[].metadata.repository_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].metadata.text | string | Optional | Text content for free text resources. |
resources_attributes[].metadata.url | string | Optional | URL for media content resources. |
resources_attributes[].metadata.width | JSON | Optional | |
resources_attributes[].metadata.width (anyOf 1) | integer | Alternative | Width for media content resources. |
resources_attributes[].metadata.width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
resources_attributes[].resource_type | string | Optional | The type of resource. Known values: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file |
resources_attributes[].updated_at | string | Optional | The date and time the resource was last updated. Format: date-time |
updated_at | string | Required within parent | The date and time the space was last updated. Format: date-time |
Referenced models: List organizations — response body — item, List users — response body — item
Get a resource for a Copilot Space for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A resource attached to a Copilot Space. |
copilot_chat_attachment_id | JSON | Optional | |
copilot_chat_attachment_id (anyOf 1) | JSON | Alternative | |
copilot_chat_attachment_id (anyOf 1) (anyOf 1) | integer | Alternative | The ID of the associated chat attachment, if any. |
copilot_chat_attachment_id (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
copilot_chat_attachment_id (anyOf 2) | null | Alternative | |
created_at | string | Required within parent | The date and time the resource was created. Format: date-time |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | The unique identifier of the resource. |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
metadata | object | Required within parent | Resource-specific metadata. The keys and values depend on the resource type. Additional keys: allowed |
resource_type | string | Required within parent | The type of the resource. Known values: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file |
updated_at | string | Required within parent | The date and time the resource was last updated. Format: date-time |
Set a Copilot Space for a user — request body — body resources attributes item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
metadata | object | Optional | Metadata specific to the resource type. |
metadata.file_path | string | Optional | File path for file resources. |
metadata.name | string | Optional | Name for the resource. |
metadata.number | integer | Optional | Issue or PR number. |
metadata.repository_id | integer | Optional | Repository ID for repository or file resources. |
metadata.text | string | Optional | Text content for free text resources. |
resource_type | string | Optional | The type of resource. One of: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file |