v56

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

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.

post/users/{username}/copilot-spaces

Path parameters

usernamestring required

The handle for the GitHub user account.

Request body

namestring required

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.

  • 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": "My Development Space",
  "description": "Personal space for development assistance",
  "general_instructions": "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"
}