Skip to content

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

FieldTypePresenceDescription and constraints
$objectRootA collaborator (user or team) of a Copilot Space
$ (anyOf 1)JSONAlternative
$ (anyOf 1) (allOf 1)ModelAll variants applyExpand List users — response body — item
$ (anyOf 1) (allOf 2)objectAll variants apply
$ (anyOf 1) (allOf 2).actor_typestringRequired within parentThe collaborator actor type.
Known values: User
$ (anyOf 1) (allOf 2).rolestringRequired within parentThe role granted to the collaborator
Known values: reader, writer, admin
$ (anyOf 2)objectAlternative
$ (anyOf 2).actor_typestringRequired within parentThe collaborator actor type.
Known values: Team
$ (anyOf 2).descriptionJSONOptional
$ (anyOf 2).description (anyOf 1)stringAlternative
$ (anyOf 2).description (anyOf 2)nullAlternative
$ (anyOf 2).html_urlstringOptionalFormat: uri
$ (anyOf 2).idJSONRequired within parent
$ (anyOf 2).id (anyOf 1)integerAlternative
$ (anyOf 2).id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2).members_urlstringOptional
$ (anyOf 2).namestringRequired within parent
$ (anyOf 2).node_idstringRequired within parent
$ (anyOf 2).notification_settingstringOptional
$ (anyOf 2).organization_idJSONOptional
$ (anyOf 2).organization_id (anyOf 1)integerAlternative
$ (anyOf 2).organization_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$ (anyOf 2).parentJSONOptional
$ (anyOf 2).parent (anyOf 1)JSONAlternative
$ (anyOf 2).parent (anyOf 2)nullAlternative
$ (anyOf 2).privacystringOptional
$ (anyOf 2).repositories_urlstringOptionalFormat: uri
$ (anyOf 2).rolestringRequired within parentThe role granted to the collaborator
Known values: reader, writer, admin
$ (anyOf 2).slugstringRequired within parent
$ (anyOf 2).typestringRequired within parentKnown values: Team
$ (anyOf 2).urlstringOptionalFormat: uri

Referenced models: List users — response body — item

Get a Copilot Space for a user — response body

FieldTypePresenceDescription and constraints
$objectRootA GitHub Copilot Space represents an interactive AI workspace where users can ask questions and get assistance.
Additional keys: not allowed
api_urlstringRequired within parentThe API URL of the space.
Format: uri
base_rolestringRequired within parentThe 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_atstringRequired within parentThe date and time the space was created.
Format: date-time
creatorModelRequired within parentExpand List users — response body — item
descriptionJSONOptional
description (anyOf 1)stringAlternativeA description of the space.
description (anyOf 2)nullAlternative
general_instructionsJSONOptional
general_instructions (anyOf 1)stringAlternativeGeneral instructions for the Copilot Space.
Maximum length: 4000
general_instructions (anyOf 2)nullAlternative
html_urlstringRequired within parentThe HTML URL of the space.
Format: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier of the space.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
namestringRequired within parentThe display name of the space.
numberJSONRequired within parent
number (anyOf 1)integerAlternativeThe number that identifies the space within its owner.
number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerJSONRequired within parentThe user or organization that owns this space.
owner (anyOf 1)ModelAlternativeExpand List users — response body — item
owner (anyOf 2)ModelAlternativeExpand List organizations — response body — item
resources_attributesarrayOptionalResources attached to the space.
resources_attributes[]objectEach item
resources_attributes[].copilot_chat_attachment_idJSONOptional
resources_attributes[].copilot_chat_attachment_id (anyOf 1)JSONAlternative
resources_attributes[].copilot_chat_attachment_id (anyOf 1) (anyOf 1)integerAlternativeThe unique identifier of the chat attachment for uploaded files or media content.
Format: int64
resources_attributes[].copilot_chat_attachment_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].copilot_chat_attachment_id (anyOf 2)nullAlternative
resources_attributes[].created_atstringOptionalThe date and time the resource was created.
Format: date-time
resources_attributes[].idJSONOptional
resources_attributes[].id (anyOf 1)integerAlternativeThe unique identifier of the resource.
Format: int64
resources_attributes[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].metadataobjectOptionalMetadata specific to the resource type.
resources_attributes[].metadata.copilot_chat_attachment_idJSONOptional
resources_attributes[].metadata.copilot_chat_attachment_id (anyOf 1)integerAlternativeChat attachment ID for uploaded files or media.
resources_attributes[].metadata.copilot_chat_attachment_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].metadata.file_pathstringOptionalFile path for file resources.
resources_attributes[].metadata.heightJSONOptional
resources_attributes[].metadata.height (anyOf 1)integerAlternativeHeight for media content resources.
resources_attributes[].metadata.height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].metadata.media_typestringOptionalMedia type for media content resources.
resources_attributes[].metadata.namestringOptionalName for the resource.
resources_attributes[].metadata.numberJSONOptional
resources_attributes[].metadata.number (anyOf 1)integerAlternativeIssue or PR number.
resources_attributes[].metadata.number (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].metadata.repository_idJSONOptional
resources_attributes[].metadata.repository_id (anyOf 1)integerAlternativeRepository ID for repository or file resources.
resources_attributes[].metadata.repository_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].metadata.textstringOptionalText content for free text resources.
resources_attributes[].metadata.urlstringOptionalURL for media content resources.
resources_attributes[].metadata.widthJSONOptional
resources_attributes[].metadata.width (anyOf 1)integerAlternativeWidth for media content resources.
resources_attributes[].metadata.width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
resources_attributes[].resource_typestringOptionalThe type of resource.
Known values: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file
resources_attributes[].updated_atstringOptionalThe date and time the resource was last updated.
Format: date-time
updated_atstringRequired within parentThe 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

FieldTypePresenceDescription and constraints
$objectRootA resource attached to a Copilot Space.
copilot_chat_attachment_idJSONOptional
copilot_chat_attachment_id (anyOf 1)JSONAlternative
copilot_chat_attachment_id (anyOf 1) (anyOf 1)integerAlternativeThe ID of the associated chat attachment, if any.
copilot_chat_attachment_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
copilot_chat_attachment_id (anyOf 2)nullAlternative
created_atstringRequired within parentThe date and time the resource was created.
Format: date-time
idJSONRequired within parent
id (anyOf 1)integerAlternativeThe unique identifier of the resource.
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
metadataobjectRequired within parentResource-specific metadata. The keys and values depend on the resource type.
Additional keys: allowed
resource_typestringRequired within parentThe type of the resource.
Known values: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file
updated_atstringRequired within parentThe date and time the resource was last updated.
Format: date-time

Set a Copilot Space for a user — request body — body resources attributes item

FieldTypePresenceDescription and constraints
$objectRoot
metadataobjectOptionalMetadata specific to the resource type.
metadata.file_pathstringOptionalFile path for file resources.
metadata.namestringOptionalName for the resource.
metadata.numberintegerOptionalIssue or PR number.
metadata.repository_idintegerOptionalRepository ID for repository or file resources.
metadata.textstringOptionalText content for free text resources.
resource_typestringOptionalThe type of resource.
One of: repository, github_file, free_text, github_issue, github_pull_request, media_content, uploaded_text_file

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.