v68

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,21696712.3 MB
copilot-spaces

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.

Fine-grained tokens and GitHub App user access tokens must have been granted access to the organization that owns the space. They must also have been granted access to every repository referenced by resources in the space, including any being added or updated.

put/orgs/{org}/copilot-spaces/{space_number}

Path parameters

orgstring required

The organization name. The name is not case sensitive.

space_numberinteger required

The unique identifier of the Copilot Space.

Request body

namestring

The name of the Copilot Space.

descriptionstring

A description of the Copilot Space.

general_instructionsstring

General instructions for the Copilot Space.

base_role'reader' | 'writer' | 'admin' | 'no_access'

The base role that determines default permissions for organization members. Changing this field requires admin permissions.

  • no_access: No default access (default)
  • reader: Organization members can read the space
  • writer: Organization members can read and edit the space
  • admin: Organization members have full admin access to the space

Example request

{
  "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"
}

Response

Response

idinteger required

The unique identifier of the space.

numberinteger required

The number that identifies the space within its owner.

namestring required

The display name of the space.

descriptionstring nullable

A description of the space.

general_instructionsstring nullable

General instructions for the Copilot Space.

base_role'reader' | 'writer' | 'admin' | 'no_access' required

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)
created_atstring date-time required

The date and time the space was created.

updated_atstring date-time required

The date and time the space was last updated.

html_urlstring uri required

The HTML URL of the space.

api_urlstring uri required

The API URL of the space.

Example response

{
  "id": 42,
  "number": 1,
  "name": "My Development Space",
  "description": "A space for discussing React development patterns",
  "general_instructions": "Help with React development patterns and best practices",
  "base_role": "no_access",
  "owner": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "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",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "creator": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "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",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "created_at": "2023-01-01T00:00:00Z",
  "updated_at": "2023-01-01T12:00:00Z",
  "html_url": "https://github.com/copilot/spaces/octo-org/5",
  "api_url": "https://api.github.com/organizations/1/copilot-spaces/5"
}