v68

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

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.

put/users/{username}/copilot-spaces/{space_number}

Path parameters

usernamestring required

The handle for the GitHub user account.

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' | 'no_access'

The base role that determines default permissions for the space. Changing this field requires admin permissions.

  • no_access: No default access (default)
  • reader: Makes the space publicly readable Note: User spaces do not support writer or admin base roles.

Example request

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

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