---
title: "Create an organization Copilot Space"
method: POST
path: "/orgs/{org}/copilot-spaces"
tags: ["copilot-spaces"]
---

# Create an organization Copilot Space

`POST /orgs/{org}/copilot-spaces`

Creates a new Copilot Space owned by an organization. The authenticated user must have permissions to create spaces in the organization.

Organization members with appropriate permissions can create Copilot Spaces to be shared within 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 the submitted resources.

## Path parameters

- `org` string, required

## Request body

- object
  - `name` string, required — The name of the Copilot Space.
  - `description` string — A description of the Copilot Space.
  - `general_instructions` string — General instructions for the Copilot Space.
  - `base_role` 'reader' | 'writer' | 'admin' | 'no_access' — The base role that determines default permissions for organization members. - `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
  - `resources_attributes` object[] — Resources to attach to the space.
    - `resource_type` 'repository' | 'github_file' | 'free_text' | 'github_issue' | 'github_pull_request' | 'media_content' | 'uploaded_text_file' — The type of resource.
    - `metadata` object — Metadata specific to the resource type.
      - `repository_id` integer — Repository ID for repository or file resources.
      - `file_path` string — File path for file resources.
      - `text` string — Text content for free text resources.
      - `name` string — Name for the resource.
      - `number` integer — Issue or PR number.

## Response `201`

Response

- CopilotSpace — A GitHub Copilot Space represents an interactive AI workspace where users can ask questions and get assistance.
  - `id` integer, required — The unique identifier of the space.
  - `number` integer, required — The number that identifies the space within its owner.
  - `name` string, required — The display name of the space.
  - `description` string, nullable — A description of the space.
  - `general_instructions` string, 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)
  - `owner` union, required — The user or organization that owns this space.
    - SimpleUser — A GitHub user.
      - `name` string, nullable
      - `email` string, nullable
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `avatar_url` string, uri, required
      - `gravatar_id` string, nullable, required
      - `url` string, uri, required
      - `html_url` string, uri, required
      - `followers_url` string, uri, required
      - `following_url` string, required
      - `gists_url` string, required
      - `starred_url` string, required
      - `subscriptions_url` string, uri, required
      - `organizations_url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, required
      - `received_events_url` string, uri, required
      - `type` string, required
      - `site_admin` boolean, required
      - `starred_at` string
      - `user_view_type` string
    - OrganizationSimple — A GitHub organization.
      - `login` string, required
      - `id` integer, required
      - `node_id` string, required
      - `url` string, uri, required
      - `repos_url` string, uri, required
      - `events_url` string, uri, required
      - `hooks_url` string, required
      - `issues_url` string, required
      - `members_url` string, required
      - `public_members_url` string, required
      - `avatar_url` string, required
      - `description` string, nullable, required
  - `creator` SimpleUser, required — A GitHub user.
    - `name` string, nullable
    - `email` string, nullable
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `avatar_url` string, uri, required
    - `gravatar_id` string, nullable, required
    - `url` string, uri, required
    - `html_url` string, uri, required
    - `followers_url` string, uri, required
    - `following_url` string, required
    - `gists_url` string, required
    - `starred_url` string, required
    - `subscriptions_url` string, uri, required
    - `organizations_url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, required
    - `received_events_url` string, uri, required
    - `type` string, required
    - `site_admin` boolean, required
    - `starred_at` string
    - `user_view_type` string
  - `created_at` string, date-time, required — The date and time the space was created.
  - `updated_at` string, date-time, required — The date and time the space was last updated.
  - `html_url` string, uri, required — The HTML URL of the space.
  - `api_url` string, uri, required — The API URL of the space.
  - `resources_attributes` object[] — Resources attached to the space.
    - `id` integer — The unique identifier of the resource.
    - `resource_type` 'repository' | 'github_file' | 'free_text' | 'github_issue' | 'github_pull_request' | 'media_content' | 'uploaded_text_file' — The type of resource.
    - `copilot_chat_attachment_id` integer, nullable — The unique identifier of the chat attachment for uploaded files or media content.
    - `created_at` string, date-time — The date and time the resource was created.
    - `updated_at` string, date-time — The date and time the resource was last updated.
    - `metadata` object — Metadata specific to the resource type.
      - `repository_id` integer — Repository ID for repository or file resources.
      - `file_path` string — File path for file resources.
      - `text` string — Text content for free text resources.
      - `name` string — Name for the resource.
      - `number` integer — Issue or PR number.
      - `copilot_chat_attachment_id` integer — Chat attachment ID for uploaded files or media.
      - `media_type` string — Media type for media content resources.
      - `url` string — URL for media content resources.
      - `height` integer — Height for media content resources.
      - `width` integer — Width for media content resources.

## Other responses

- `403` — Forbidden
- `404` — Resource not found
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-3.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-3/versions/dc0584ac4e13/schema)
