# endpoints

operation_id: orgs/check-blocked-user
path: /orgs/{org}/blocks/{username}
method: GET
summary: Check if a user is blocked by an organization
auth_scheme_ref: GitHubBearerToken
description:
  Returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"If the user is blocked"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"If the user is not blocked"}}


operation_id: orgs/block-user
path: /orgs/{org}/blocks/{username}
method: PUT
summary: Block a user from an organization
output_schema: {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}
auth_scheme_ref: GitHubBearerToken
description:
  Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"}],"requestBody":null}


operation_id: campaigns/list-org-campaigns
path: /orgs/{org}/campaigns
method: GET
summary: List campaigns for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists campaigns in an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"description":"If specified, only campaigns with this state will be returned.","in":"query","name":"state","schema":{"$ref":"#/components/schemas/campaign-state"},"style":"form"},{"description":"The property by which to sort the results.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","ends_at","published"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/campaign-org-items"}},"schema":{"items":{"$ref":"#/components/schemas/campaign-summary"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: campaigns/create-campaign
path: /orgs/{org}/campaigns
method: POST
summary: Create a campaign for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Create a campaign for an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

  Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories included
  in the campaign.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"code_scanning_alerts":[{"alert_numbers":[1,2],"repository_id":1296269}],"description":"Address critical alerts before they are exploited to prevent breaches, protect sensitive data, and mitigate financial and reputational damage.","ends_at":"2024-03-14T00:00:00Z","managers":["octocat"],"name":"Critical CodeQL alerts"}}},"schema":{"additionalProperties":false,"oneOf":[{"required":["code_scanning_alerts"]},{"required":["secret_scanning_alerts"]}],"properties":{"code_scanning_alerts":{"description":"The code scanning alerts to include in this campaign","items":{"additionalProperties":false,"properties":{"alert_numbers":{"description":"The alert numbers","items":{"type":"integer"},"minItems":1,"type":"array"},"repository_id":{"description":"The repository id","type":"integer"}},"required":["repository_id","alert_numbers"],"type":"object"},"minItems":1,"nullable":true,"type":"array"},"contact_link":{"description":"The contact link of the campaign. Must be a URI.","format":"uri","nullable":true,"type":"string"},"description":{"description":"A description for the campaign","maxLength":255,"minLength":1,"type":"string"},"ends_at":{"description":"The end date and time of the campaign. The date must be in the future.","format":"date-time","type":"string"},"generate_issues":{"default":false,"description":"If true, will automatically generate issues for the campaign. The default is false.","type":"boolean"},"managers":{"description":"The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied.","items":{"description":"The login of each manager","type":"string"},"maxItems":10,"type":"array"},"name":{"description":"The name of the campaign","maxLength":50,"minLength":1,"type":"string"},"team_managers":{"description":"The slugs of the teams to set as the campaign managers.","items":{"description":"The slug of each team","type":"string"},"maxItems":10,"type":"array"}},"required":["name","description","ends_at"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/campaign-summary"}},"schema":{"$ref":"#/components/schemas/campaign-summary"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Bad Request"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Unprocessable Entity"},"429":{"description":"Too Many Requests"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: campaigns/get-campaign-summary
path: /orgs/{org}/campaigns/{campaign_number}
method: GET
summary: Get a campaign for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a campaign for an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The campaign number.","in":"path","name":"campaign_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/campaign-summary"}},"schema":{"$ref":"#/components/schemas/campaign-summary"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Unprocessable Entity"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: campaigns/delete-campaign
path: /orgs/{org}/campaigns/{campaign_number}
method: DELETE
summary: Delete a campaign for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a campaign in an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The campaign number.","in":"path","name":"campaign_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Deletion successful"},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: campaigns/update-campaign
path: /orgs/{org}/campaigns/{campaign_number}
method: PATCH
summary: Update a campaign
auth_scheme_ref: GitHubBearerToken
description:
  Updates a campaign in an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The campaign number.","in":"path","name":"campaign_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"Critical CodeQL alerts"}}},"schema":{"additionalProperties":false,"properties":{"contact_link":{"description":"The contact link of the campaign. Must be a URI.","format":"uri","nullable":true,"type":"string"},"description":{"description":"A description for the campaign","maxLength":255,"minLength":1,"type":"string"},"ends_at":{"description":"The end date and time of the campaign, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.","format":"date-time","type":"string"},"managers":{"description":"The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied.","items":{"type":"string"},"maxItems":10,"type":"array"},"name":{"description":"The name of the campaign","maxLength":50,"minLength":1,"type":"string"},"state":{"$ref":"#/components/schemas/campaign-state"},"team_managers":{"description":"The slugs of the teams to set as the campaign managers.","items":{"description":"The slug of each team","type":"string"},"maxItems":10,"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/campaign-summary"}},"schema":{"$ref":"#/components/schemas/campaign-summary"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Bad Request"},"404":{"$ref":"#/components/responses/not_found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Unprocessable Entity"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-scanning/list-alerts-for-org
path: /orgs/{org}/code-scanning/alerts
method: GET
summary: List code scanning alerts for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` or `repo`s cope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/tool-name"},{"$ref":"#/components/parameters/tool-guid"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"description":"If specified, only code scanning alerts with this state will be returned.","in":"query","name":"state","schema":{"$ref":"#/components/schemas/code-scanning-alert-state-query"},"style":"form"},{"description":"The property by which to sort the results.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated"],"type":"string"},"style":"form"},{"description":"If specified, only code scanning alerts with this severity will be returned.","in":"query","name":"severity","schema":{"$ref":"#/components/schemas/code-scanning-alert-severity"},"style":"form"},{"description":"Filter alerts by assignees. Provide a comma-separated list of user handles (e.g., `octocat` or `octocat,hubot`).\nUse `*` to list alerts with at least one assignee or `none` to list alerts with no assignees.\n","in":"query","name":"assignees","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-scanning-organization-alert-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-scanning-organization-alert-items"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: code-security/get-configurations-for-org
path: /orgs/{org}/code-security/configurations
method: GET
summary: Get code security configurations for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all code security configurations available in an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The target type of the code security configuration","in":"query","name":"target_type","schema":{"default":"all","enum":["global","all"],"type":"string"},"style":"form"},{"description":"The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":30,"type":"integer"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-configuration-list"}},"schema":{"items":{"$ref":"#/components/schemas/code-security-configuration"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: code-security/create-configuration
path: /orgs/{org}/code-security/configurations
method: POST
summary: Create a code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Creates a code security configuration in an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example for a code security configuration","value":{"advanced_security":"enabled","dependabot_alerts":"enabled","dependabot_security_updates":"not_set","description":"This is a code security configuration for octo-org","name":"octo-org recommended settings","secret_scanning":"enabled"}}},"schema":{"additionalProperties":false,"properties":{"advanced_security":{"default":"disabled","description":"The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.\n\n> [!WARNING]\n> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features.\n","enum":["enabled","disabled","code_security","secret_protection"],"type":"string"},"code_scanning_default_setup":{"default":"disabled","description":"The enablement status of code scanning default setup","enum":["enabled","disabled","not_set"],"type":"string"},"code_scanning_default_setup_options":{"$ref":"#/components/schemas/code-scanning-default-setup-options"},"code_scanning_delegated_alert_dismissal":{"default":"not_set","description":"The enablement status of code scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"code_scanning_options":{"$ref":"#/components/schemas/code-scanning-options"},"code_security":{"description":"The enablement status of GitHub Code Security features.","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_alerts":{"default":"disabled","description":"The enablement status of Dependabot alerts","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_delegated_alert_dismissal":{"default":"disabled","description":"The enablement status of Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_security_updates":{"default":"disabled","description":"The enablement status of Dependabot security updates","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph":{"default":"enabled","description":"The enablement status of Dependency Graph","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph_autosubmit_action":{"default":"disabled","description":"The enablement status of Automatic dependency submission","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph_autosubmit_action_options":{"description":"Feature options for Automatic dependency submission","properties":{"labeled_runners":{"default":false,"description":"Whether to use runners labeled with 'dependency-submission' or standard GitHub runners.","type":"boolean"}},"type":"object"},"description":{"description":"A description of the code security configuration","maxLength":255,"type":"string"},"enforcement":{"default":"enforced","description":"The enforcement status for a security configuration","enum":["enforced","unenforced"],"type":"string"},"name":{"description":"The name of the code security configuration. Must be unique within the organization.","type":"string"},"private_vulnerability_reporting":{"default":"disabled","description":"The enablement status of private vulnerability reporting","enum":["enabled","disabled","not_set"],"type":"string"},"secret_protection":{"description":"The enablement status of GitHub Secret Protection features.","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning":{"default":"disabled","description":"The enablement status of secret scanning","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_alert_dismissal":{"description":"The enablement status of secret scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_bypass":{"default":"disabled","description":"The enablement status of secret scanning delegated bypass","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_bypass_options":{"description":"Feature options for secret scanning delegated bypass","properties":{"reviewers":{"description":"The bypass reviewers for secret scanning delegated bypass","items":{"properties":{"mode":{"default":"ALWAYS","description":"The bypass mode for the reviewer","enum":["ALWAYS","EXEMPT"],"type":"string"},"reviewer_id":{"description":"The ID of the team or role selected as a bypass reviewer","type":"integer"},"reviewer_type":{"description":"The type of the bypass reviewer","enum":["TEAM","ROLE"],"type":"string"}},"required":["reviewer_id","reviewer_type"],"type":"object"},"type":"array"}},"type":"object"},"secret_scanning_extended_metadata":{"description":"The enablement status of secret scanning extended metadata","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_generic_secrets":{"default":"disabled","description":"The enablement status of Copilot secret scanning","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_non_provider_patterns":{"default":"disabled","description":"The enablement status of secret scanning non provider patterns","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_push_protection":{"default":"disabled","description":"The enablement status of secret scanning push protection","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_validity_checks":{"default":"disabled","description":"The enablement status of secret scanning validity checks","enum":["enabled","disabled","not_set"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-configuration"}},"schema":{"$ref":"#/components/schemas/code-security-configuration"}}},"description":"Successfully created code security configuration"}}


operation_id: code-security/get-default-configurations
path: /orgs/{org}/code-security/configurations/defaults
method: GET
summary: Get default code security configurations
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the default code security configurations for an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-default-configurations"}},"schema":{"$ref":"#/components/schemas/code-security-default-configurations"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: code-security/detach-configuration
path: /orgs/{org}/code-security/configurations/detach
method: DELETE
summary: Detach configurations from repositories
auth_scheme_ref: GitHubBearerToken
description:
  Detach code security configuration(s) from a set of repositories.
  Repositories will retain their settings but will no longer be associated with the configuration.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example for detaching repositories from configurations.","value":{"selected_repository_ids":[32,91]}}},"schema":{"additionalProperties":false,"properties":{"selected_repository_ids":{"description":"An array of repository IDs to detach from configurations. Up to 250 IDs can be provided.","items":{"description":"Unique identifier of the repository.","type":"integer"},"maxItems":250,"minItems":1,"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: code-security/get-configuration
path: /orgs/{org}/code-security/configurations/{configuration_id}
method: GET
summary: Get a code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Gets a code security configuration available in an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-configuration"}},"schema":{"$ref":"#/components/schemas/code-security-configuration"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: code-security/delete-configuration
path: /orgs/{org}/code-security/configurations/{configuration_id}
method: DELETE
summary: Delete a code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Deletes the desired code security configuration from an organization.
  Repositories attached to the configuration will retain their settings but will no longer be associated with
  the configuration.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":null}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: code-security/update-configuration
path: /orgs/{org}/code-security/configurations/{configuration_id}
method: PATCH
summary: Update a code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Updates a code security configuration in an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example for updating a code security configuration","value":{"code_scanning_default_setup":"enabled","name":"octo-org recommended settings v2","secret_scanning":"disabled"}}},"schema":{"additionalProperties":false,"properties":{"advanced_security":{"description":"The enablement status of GitHub Advanced Security features. `enabled` will enable both Code Security and Secret Protection features.\n\n> [!WARNING]\n> `code_security` and `secret_protection` are deprecated values for this field. Prefer the individual `code_security` and `secret_protection` fields to set the status of these features.\n","enum":["enabled","disabled","code_security","secret_protection"],"type":"string"},"code_scanning_default_setup":{"description":"The enablement status of code scanning default setup","enum":["enabled","disabled","not_set"],"type":"string"},"code_scanning_default_setup_options":{"$ref":"#/components/schemas/code-scanning-default-setup-options"},"code_scanning_delegated_alert_dismissal":{"default":"disabled","description":"The enablement status of code scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"code_scanning_options":{"$ref":"#/components/schemas/code-scanning-options"},"code_security":{"description":"The enablement status of GitHub Code Security features.","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_alerts":{"description":"The enablement status of Dependabot alerts","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_delegated_alert_dismissal":{"description":"The enablement status of Dependabot delegated alert dismissal. Requires Dependabot alerts to be enabled.","enum":["enabled","disabled","not_set"],"type":"string"},"dependabot_security_updates":{"description":"The enablement status of Dependabot security updates","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph":{"description":"The enablement status of Dependency Graph","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph_autosubmit_action":{"description":"The enablement status of Automatic dependency submission","enum":["enabled","disabled","not_set"],"type":"string"},"dependency_graph_autosubmit_action_options":{"description":"Feature options for Automatic dependency submission","properties":{"labeled_runners":{"description":"Whether to use runners labeled with 'dependency-submission' or standard GitHub runners.","type":"boolean"}},"type":"object"},"description":{"description":"A description of the code security configuration","maxLength":255,"type":"string"},"enforcement":{"description":"The enforcement status for a security configuration","enum":["enforced","unenforced"],"type":"string"},"name":{"description":"The name of the code security configuration. Must be unique within the organization.","type":"string"},"private_vulnerability_reporting":{"description":"The enablement status of private vulnerability reporting","enum":["enabled","disabled","not_set"],"type":"string"},"secret_protection":{"description":"The enablement status of GitHub Secret Protection features.","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning":{"description":"The enablement status of secret scanning","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_alert_dismissal":{"description":"The enablement status of secret scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_bypass":{"description":"The enablement status of secret scanning delegated bypass","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_delegated_bypass_options":{"description":"Feature options for secret scanning delegated bypass","properties":{"reviewers":{"description":"The bypass reviewers for secret scanning delegated bypass","items":{"properties":{"mode":{"default":"ALWAYS","description":"The bypass mode for the reviewer","enum":["ALWAYS","EXEMPT"],"type":"string"},"reviewer_id":{"description":"The ID of the team or role selected as a bypass reviewer","type":"integer"},"reviewer_type":{"description":"The type of the bypass reviewer","enum":["TEAM","ROLE"],"type":"string"}},"required":["reviewer_id","reviewer_type"],"type":"object"},"type":"array"}},"type":"object"},"secret_scanning_extended_metadata":{"description":"The enablement status of secret scanning extended metadata","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_generic_secrets":{"description":"The enablement status of Copilot secret scanning","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_non_provider_patterns":{"description":"The enablement status of secret scanning non-provider patterns","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_push_protection":{"description":"The enablement status of secret scanning push protection","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_validity_checks":{"description":"The enablement status of secret scanning validity checks","enum":["enabled","disabled","not_set"],"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-security-configuration-updated"}},"schema":{"$ref":"#/components/schemas/code-security-configuration"}}},"description":"Response when a configuration is updated"},"204":{"description":"Response when no new updates are made"}}


operation_id: code-security/attach-configuration
path: /orgs/{org}/code-security/configurations/{configuration_id}/attach
method: POST
summary: Attach a configuration to repositories
output_schema: {"202":{"$ref":"#/components/responses/accepted"}}
auth_scheme_ref: GitHubBearerToken
description:
  Attach a code security configuration to a set of repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.

  If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example for attaching a configuration to some repositories","value":{"scope":"selected","selected_repository_ids":[32,91]}}},"schema":{"additionalProperties":false,"properties":{"scope":{"description":"The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids`","enum":["all","all_without_configurations","public","private_or_internal","selected"],"type":"string"},"selected_repository_ids":{"description":"An array of repository IDs to attach the configuration to. You can only provide a list of repository ids when the `scope` is set to `selected`.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"}},"required":["scope"],"type":"object"}}},"required":true}}


operation_id: code-security/set-configuration-as-default
path: /orgs/{org}/code-security/configurations/{configuration_id}/defaults
method: PUT
summary: Set a code security configuration as a default for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets a code security configuration as a default to be applied to new repositories in your organization.

  This configuration will be applied to the matching repository type (all, none, public, private and internal) by default when they are created.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Set this configuration to be enabled by default on all new repositories.","value":{"default_for_new_repos":"all"}}},"schema":{"properties":{"default_for_new_repos":{"description":"Specify which types of repository this security configuration should be applied to by default.","enum":["all","none","private_and_internal","public"],"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"configuration":{"$ref":"#/components/examples/code-security-configuration"},"default_for_new_repos":"all"}}},"schema":{"properties":{"configuration":{"$ref":"#/components/schemas/code-security-configuration"},"default_for_new_repos":{"description":"Specifies which types of repository this security configuration is applied to by default.","enum":["all","none","private_and_internal","public"],"type":"string"}},"type":"object"}}},"description":"Default successfully changed."},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: code-security/get-repositories-for-configuration
path: /orgs/{org}/code-security/configurations/{configuration_id}/repositories
method: GET
summary: Get repositories associated with a code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repositories associated with a code security configuration in an organization.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/configuration-id"},{"description":"The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":30,"type":"integer"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.\n\nCan be: `all`, `attached`, `attaching`, `detached`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise`","in":"query","name":"status","schema":{"default":"all","type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"summary":"Example of code security configuration repositories","value":[{"repository":{"$ref":"#/components/examples/simple-repository"},"status":"attached"}]}},"schema":{"items":{"$ref":"#/components/schemas/code-security-configuration-repositories"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: codespaces/list-in-organization
path: /orgs/{org}/codespaces
method: GET
summary: List codespaces for the organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists the codespaces associated to a specified organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-list"}},"schema":{"properties":{"codespaces":{"items":{"$ref":"#/components/schemas/codespace"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","codespaces"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/set-codespaces-access
path: /orgs/{org}/codespaces/access
method: PUT
summary: Manage access control for organization codespaces
auth_scheme_ref: GitHubBearerToken
description:
  Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.
  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_usernames":["johnDoe","atomIO"],"visibility":"selected_members"}}},"schema":{"properties":{"selected_usernames":{"description":"The usernames of the organization members who should have access to codespaces in the organization. Required when `visibility` is `selected_members`. The provided list of usernames will replace any existing value.","items":{"type":"string"},"maxItems":100,"type":"array"},"visibility":{"description":"Which users can access codespaces in the organization. `disabled` means that no users can access codespaces in the organization.","enum":["disabled","selected_members","all_members","all_members_and_outside_collaborators"],"type":"string"}},"required":["visibility"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response when successfully modifying permissions."},"304":{"$ref":"#/components/responses/not_modified"},"400":{"description":"Users are neither members nor collaborators of this organization."},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/set-codespaces-access-users
path: /orgs/{org}/codespaces/access/selected_users
method: POST
summary: Add users to Codespaces access for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Codespaces for the specified users will be billed to the organization.

  To use this endpoint, the access settings for the organization must be set to `selected_members`.
  For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_usernames":["johnDoe","atomIO"]}}},"schema":{"properties":{"selected_usernames":{"description":"The usernames of the organization members and outside collaborators whose codespaces should be billed to the organization.","items":{"type":"string"},"maxItems":100,"type":"array"}},"required":["selected_usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response when successfully modifying permissions."},"304":{"$ref":"#/components/responses/not_modified"},"400":{"description":"Users are neither members nor collaborators of this organization."},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/delete-codespaces-access-users
path: /orgs/{org}/codespaces/access/selected_users
method: DELETE
summary: Remove users from Codespaces access for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Codespaces for the specified users will no longer be billed to the organization.

  To use this endpoint, the access settings for the organization must be set to `selected_members`.
  For information on how to change this setting, see "[Manage access control for organization codespaces](https://docs.github.com/rest/codespaces/organizations#manage-access-control-for-organization-codespaces)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_usernames":["johnDoe","atomIO"]}}},"schema":{"properties":{"selected_usernames":{"description":"The usernames of the organization members and outside collaborators whose codespaces should not be billed to the organization.","items":{"type":"string"},"maxItems":100,"type":"array"}},"required":["selected_usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response when successfully modifying permissions."},"304":{"$ref":"#/components/responses/not_modified"},"400":{"description":"Users are neither members nor collaborators of this organization."},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/list-org-secrets
path: /orgs/{org}/codespaces/secrets
method: GET
summary: List organization secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all Codespaces development environment secrets available at the organization-level without revealing their encrypted
  values.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-codespaces-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/codespaces-org-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: codespaces/get-org-public-key
path: /orgs/{org}/codespaces/secrets/public-key
method: GET
summary: Get an organization public key
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets a public key for an organization, which is required in order to encrypt secrets. You need to encrypt the value of a secret before you can create or update secrets.
  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-public-key"}},"schema":{"$ref":"#/components/schemas/codespaces-public-key"}}},"description":"Response"}}


operation_id: codespaces/get-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}
method: GET
summary: Get an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Gets an organization development environment secret without revealing its encrypted value.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repo-codespaces-secret"}},"schema":{"$ref":"#/components/schemas/codespaces-org-secret"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: codespaces/create-or-update-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}
method: PUT
summary: Create or update an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Creates or updates an organization development environment secret with an encrypted value. Encrypt your secret using
  [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","selected_repository_ids":[1296269,1296280],"visibility":"selected"}}},"schema":{"properties":{"encrypted_value":{"description":"The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/codespaces/organization-secrets#get-an-organization-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"The ID of the key you used to encrypt the secret.","type":"string"},"selected_repository_ids":{"description":"An array of repository IDs that can access the organization secret. You can only provide a list of repository IDs when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"},"visibility":{"description":"Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.","enum":["all","private","selected"],"type":"string"}},"required":["visibility"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response when creating a secret"},"204":{"description":"Response when updating a secret"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: codespaces/delete-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}
method: DELETE
summary: Delete an organization secret
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an organization development environment secret using the secret name.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]


operation_id: codespaces/list-selected-repos-for-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}/repositories
method: GET
summary: List selected repositories for an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Lists all repositories that have been selected when the `visibility`
  for repository access to a secret is set to `selected`.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/public-repository-paginated"}},"schema":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","repositories"],"type":"object"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: codespaces/set-selected-repos-for-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}/repositories
method: PUT
summary: Set selected repositories for an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Replaces all repositories for an organization development environment secret when the `visibility`
  for repository access is set to `selected`. The visibility is set when you [Create
  or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[64780797]}}},"schema":{"properties":{"selected_repository_ids":{"description":"An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"409":{"description":"Conflict when visibility type not set to selected"}}


operation_id: codespaces/add-selected-repo-to-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
method: PUT
summary: Add selected repository to an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to an organization development environment secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).
  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 219 characters]

output_schema:
  {"204":{"description":"No Content when repository was added to the selected list"},"404":{"$ref":"#/components/responses/not_found"},"409":{"description":"Conflict when visibility type is not set to selected"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: codespaces/remove-selected-repo-from-org-secret
path: /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}
method: DELETE
summary: Remove selected repository from an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from an organization development environment secret when the `visibility`
  for repository access is set to `selected`. The visibility is set when you [Create
  or update an organization secret](https://docs.github.com/rest/codespaces/organization-secrets#create-or-update-an-organization-secret).

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 219 characters]

output_schema:
  {"204":{"description":"Response when repository was removed from the selected list"},"404":{"$ref":"#/components/responses/not_found"},"409":{"description":"Conflict when visibility type not set to selected"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/list-for-org
path: /orgs/{org}/copilot-spaces
method: GET
summary: List organization Copilot Spaces
auth_scheme_ref: GitHubBearerToken
description:
  Lists Copilot Spaces owned by an organization. The authenticated user must have read access to the organization's Copilot Spaces.

  Only Spaces that are readable by the authenticated user are returned. This includes public Spaces and internal Spaces if the user is a member of the 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 a space; spaces with inaccessible resources are omitted from the response.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The number of results per page (max 100).","in":"query","name":"per_page","schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},{"description":"A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor.","in":"query","name":"before","schema":{"type":"string"},"style":"form"},{"description":"A cursor, as given in the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor.","in":"query","name":"after","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-spaces-organization-list"}},"schema":{"properties":{"spaces":{"description":"The list of Copilot Spaces on this page of results.","items":{"$ref":"#/components/schemas/copilot-space"},"type":"array"}},"required":["spaces"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/create-for-org
path: /orgs/{org}/copilot-spaces
method: POST
summary: Create an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Organization space for team planning and coordination","general_instructions":"Help the team with planning and coordination tasks","name":"Team Planning Space","resources_attributes":[{"metadata":{"file_path":"docs/planning.md","repository_id":123456},"resource_type":"github_file"},{"metadata":{"name":"Team Guidelines","text":"Our team follows agile methodology and holds daily standups"},"resource_type":"free_text"}]}}},"schema":{"properties":{"base_role":{"default":"no_access","description":"The base role that determines default permissions for organization members.\n- `no_access`: No default access (default)\n- `reader`: Organization members can read the space\n- `writer`: Organization members can read and edit the space\n- `admin`: Organization members have full admin access to the space","enum":["reader","writer","admin","no_access"],"type":"string"},"description":{"description":"A description of the Copilot Space.","example":"Organization space for team planning and coordination","type":"string"},"general_instructions":{"description":"General instructions for the Copilot Space.","example":"Help the team with planning and coordination tasks","maxLength":4000,"type":"string"},"name":{"description":"The name of the Copilot Space.","example":"Team Planning Space","type":"string"},"resources_attributes":{"description":"Resources to attach to the space.","items":{"properties":{"metadata":{"description":"Metadata specific to the resource type.","properties":{"file_path":{"description":"File path for file resources.","type":"string"},"name":{"description":"Name for the resource.","type":"string"},"number":{"description":"Issue or PR number.","type":"integer"},"repository_id":{"description":"Repository ID for repository or file resources.","type":"integer"},"text":{"description":"Text content for free text resources.","type":"string"}},"type":"object"},"resource_type":{"description":"The type of resource.","enum":["repository","github_file","free_text","github_issue","github_pull_request","media_content","uploaded_text_file"],"type":"string"}},"type":"object"},"type":"array"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-space-organization"}},"schema":{"$ref":"#/components/schemas/copilot-space"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/get-for-org
path: /orgs/{org}/copilot-spaces/{space_number}
method: GET
summary: Get an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Gets details about a specific Copilot Space owned by an organization. The authenticated user must have read access to the Space.

  Internal Spaces require the authenticated user to be a member of the organization or have been granted read permissions.

  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-space-organization"}},"schema":{"$ref":"#/components/schemas/copilot-space"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/update-for-org
path: /orgs/{org}/copilot-spaces/{space_number}
method: PUT
summary: Set an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Updated organization space for team planning and coordination","general_instructions":"Updated instructions to help the team with planning and coordination tasks","name":"Updated Team Planning Space","resources_attributes":[{"metadata":{"file_path":"docs/updated-planning.md","repository_id":123456},"resource_type":"github_file"},{"_destroy":true,"id":789},{"id":456,"metadata":{"name":"Updated Team Guidelines","text":"Our updated team follows agile methodology and holds daily standups"},"resource_type":"free_text"}]}}},"schema":{"properties":{"base_role":{"description":"The base role that determines default permissions for organization members. Changing this field requires admin permissions.\n- `no_access`: No default access (default)\n- `reader`: Organization members can read the space\n- `writer`: Organization members can read and edit the space\n- `admin`: Organization members have full admin access to the space","enum":["reader","writer","admin","no_access"],"type":"string"},"description":{"description":"A description of the Copilot Space.","example":"Updated organization space for team planning and coordination","type":"string"},"general_instructions":{"description":"General instructions for the Copilot Space.","example":"Updated instructions to help the team with planning and coordination tasks","maxLength":4000,"type":"string"},"name":{"description":"The name of the Copilot Space.","example":"Updated Team Planning Space","type":"string"},"resources_attributes":{"description":"Resources to attach to the space.","items":{"properties":{"metadata":{"description":"Metadata specific to the resource type.","properties":{"file_path":{"description":"File path for file resources.","type":"string"},"name":{"description":"Name for the resource.","type":"string"},"number":{"description":"Issue or PR number.","type":"integer"},"repository_id":{"description":"Repository ID for repository or file resources.","type":"integer"},"text":{"description":"Text content for free text resources.","type":"string"}},"type":"object"},"resource_type":{"description":"The type of resource.","enum":["repository","github_file","free_text","github_issue","github_pull_request","media_content","uploaded_text_file"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-space-organization"}},"schema":{"$ref":"#/components/schemas/copilot-space"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/delete-for-org
path: /orgs/{org}/copilot-spaces/{space_number}
method: DELETE
summary: Delete an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a Copilot Space owned by an organization. The authenticated user must have permissions to delete spaces in the organization.

  **Warning:** This action is permanent and cannot be undone. Deleting a Copilot Space will remove all associated resources and configurations.

  Organization members with appropriate permissions can delete Copilot Spaces owned by their organization.

  OAuth app tokens and personal access tokens (classic) need both the `read:org` and `repo` scopes 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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"The Copilot Space has been successfully deleted."},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/list-collaborators-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/collaborators
method: GET
summary: List collaborators for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Lists all collaborators for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to view collaborators.

  Each collaborator entry specifies which user or team has access to the space and at what level (reader, writer, or admin). The space owner (organization) is excluded from this list.

  **Note:** Team collaborators listed here are teams that are defined in the 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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"collaborators":[{"actor_type":"User","avatar_url":"https://github.com/images/error/octocat_happy.gif","bio":"There once was...","blog":"https://github.com/blog","company":"GitHub","created_at":"2008-01-14T04:33:35Z","email":"octocat@github.com","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers":20,"followers_url":"https://api.github.com/users/octocat/followers","following":0,"following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"","hireable":false,"html_url":"https://github.com/octocat","id":12345,"location":"San Francisco","login":"octocat","name":"The Octocat","node_id":"MDQ6VXNlcjEyMzQ1","organizations_url":"https://api.github.com/users/octocat/orgs","public_gists":1,"public_repos":2,"received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","role":"writer","site_admin":false,"starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","twitter_username":"octocat","type":"User","updated_at":"2008-01-14T04:33:35Z","url":"https://api.github.com/users/octocat","user_view_type":"public"},{"actor_type":"Team","created_at":"2017-07-14T16:53:42Z","description":"Team of developers","html_url":"https://github.com/orgs/octo-org/teams/developers","id":67890,"members_url":"https://api.github.com/teams/67890/members{/member}","name":"Developers","node_id":"MDQ6VGVhbTY3ODkw","notification_setting":"notifications_enabled","organization":{"avatar_url":"https://github.com/images/error/octocat_happy.gif","description":"A great organization","events_url":"https://api.github.com/orgs/octo-org/events","hooks_url":"https://api.github.com/orgs/octo-org/hooks","id":1,"issues_url":"https://api.github.com/orgs/octo-org/issues","login":"octo-org","members_url":"https://api.github.com/orgs/octo-org/members{/member}","node_id":"MDEyOk9yZ2FuaXphdGlvbjE=","public_members_url":"https://api.github.com/orgs/octo-org/public_members{/member}","repos_url":"https://api.github.com/orgs/octo-org/repos","url":"https://api.github.com/orgs/octo-org"},"parent":null,"privacy":"closed","repositories_url":"https://api.github.com/teams/67890/repos","role":"reader","slug":"developers","updated_at":"2017-08-17T12:37:15Z","url":"https://api.github.com/teams/67890"}]}}},"schema":{"properties":{"collaborators":{"description":"The list of collaborators for this Copilot Space.","items":{"$ref":"#/components/schemas/copilot-space-collaborator"},"type":"array"}},"required":["collaborators"],"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/add-collaborator-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/collaborators
method: POST
summary: Add a collaborator to an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Adds a collaborator (user or team) to a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

  **Note:** When adding users as collaborators, they must already be members of the organization.
  When adding teams as collaborators, they must be defined in the organization.

  OAuth app tokens and personal access tokens (classic) need the `write: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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"team":{"value":{"actor_identifier":"developers","actor_type":"Team","role":"reader"}},"user":{"value":{"actor_identifier":"octocat","actor_type":"User","role":"writer"}}},"schema":{"properties":{"actor_identifier":{"description":"The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.","type":"string"},"actor_type":{"description":"The type of actor (user or team).","enum":["User","Team"],"type":"string"},"role":{"description":"The role to grant to the collaborator.","enum":["reader","writer","admin"],"type":"string"}},"required":["actor_type","actor_identifier","role"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"team":{"value":{"actor_type":"Team","description":"Team of developers","html_url":"https://github.com/orgs/octo-org/teams/developers","id":67890,"members_url":"https://api.github.com/teams/67890/members{/member}","name":"Developers","node_id":"MDQ6VGVhbTY3ODkw","notification_setting":"notifications_enabled","organization_id":1,"parent":null,"privacy":"closed","repositories_url":"https://api.github.com/teams/67890/repos","role":"reader","slug":"developers","type":"Team","url":"https://api.github.com/teams/67890"}},"user":{"value":{"actor_type":"User","avatar_url":"https://github.com/images/error/octocat_happy.gif","bio":"There once was...","blog":"https://github.com/blog","company":"GitHub","created_at":"2008-01-14T04:33:35Z","email":"octocat@github.com","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers":20,"followers_url":"https://api.github.com/users/octocat/followers","following":0,"following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"","hireable":false,"html_url":"https://github.com/octocat","id":12345,"location":"San Francisco","login":"octocat","name":"The Octocat","node_id":"MDQ6VXNlcjEyMzQ1","organizations_url":"https://api.github.com/users/octocat/orgs","public_gists":1,"public_repos":2,"received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","role":"writer","site_admin":false,"starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","twitter_username":"octocat","type":"User","updated_at":"2008-01-14T04:33:35Z","url":"https://api.github.com/users/octocat","user_view_type":"public"}}},"schema":{"$ref":"#/components/schemas/copilot-space-collaborator"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/update-collaborator-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
method: PUT
summary: Set a collaborator role for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Updates the role of a collaborator for a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

  OAuth app tokens and personal access tokens (classic) need the `write: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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The type of actor (user or team).","in":"path","name":"actor_type","required":true,"schema":{"enum":["User","Team"],"type":"string"},"style":"simple"},{"description":"The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.","in":"path","name":"actor_identifier","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"role":"admin"}}},"schema":{"properties":{"role":{"description":"The new role to grant to the collaborator. Use `no_access` to remove the collaborator.","enum":["reader","writer","admin","no_access"],"type":"string"}},"required":["role"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"team":{"value":{"actor_type":"Team","description":"Team of developers","html_url":"https://github.com/orgs/octo-org/teams/developers","id":67890,"members_url":"https://api.github.com/teams/67890/members{/member}","name":"Developers","node_id":"MDQ6VGVhbTY3ODkw","notification_setting":"notifications_enabled","organization_id":1,"parent":null,"privacy":"closed","repositories_url":"https://api.github.com/teams/67890/repos","role":"admin","slug":"developers","type":"Team","url":"https://api.github.com/teams/67890"}},"user":{"value":{"actor_type":"User","avatar_url":"https://github.com/images/error/octocat_happy.gif","bio":"There once was...","blog":"https://github.com/blog","company":"GitHub","created_at":"2008-01-14T04:33:35Z","email":"octocat@github.com","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers":20,"followers_url":"https://api.github.com/users/octocat/followers","following":0,"following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"","hireable":false,"html_url":"https://github.com/octocat","id":12345,"location":"San Francisco","login":"octocat","name":"The Octocat","node_id":"MDQ6VXNlcjEyMzQ1","organizations_url":"https://api.github.com/users/octocat/orgs","public_gists":1,"public_repos":2,"received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","role":"admin","site_admin":false,"starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","twitter_username":"octocat","type":"User","updated_at":"2008-01-14T04:33:35Z","url":"https://api.github.com/users/octocat","user_view_type":"public"}}},"schema":{"$ref":"#/components/schemas/copilot-space-collaborator"}}},"description":"Response"},"204":{"description":"Response when `role` is `no_access` and the collaborator was removed."},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/remove-collaborator-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
method: DELETE
summary: Remove a collaborator from an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Removes a collaborator from a specific Copilot Space owned by an organization. The authenticated user must have appropriate permissions to manage collaborators.

  OAuth app tokens and personal access tokens (classic) need the `write: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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The type of actor (user or team).","in":"path","name":"actor_type","required":true,"schema":{"enum":["User","Team"],"type":"string"},"style":"simple"},{"description":"The username (for users) or team slug (for teams). The numeric ID of a user or team is also accepted.","in":"path","name":"actor_identifier","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/list-resources-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/resources
method: GET
summary: List resources for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Lists all resources attached to a specific Copilot Space owned by an organization.
  The authenticated user must have appropriate permissions to view the space.

  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.

input_schema:
[cell repeats an earlier one in this file: 231 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"resources":[{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":1,"metadata":{"repository_id":42},"resource_type":"repository","updated_at":"2025-01-01T00:00:00Z"},{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":2,"metadata":{"name":"notes.txt","text":"Some helpful notes"},"resource_type":"free_text","updated_at":"2025-01-01T00:00:00Z"}]}}},"schema":{"properties":{"resources":{"description":"The list of resources attached to this Copilot Space.","items":{"$ref":"#/components/schemas/copilot-space-resource"},"type":"array"}},"required":["resources"],"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/create-resource-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/resources
method: POST
summary: Create a resource for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new resource in a specific Copilot Space owned by an organization.
  The authenticated user must have write permissions on the space.

  The following resource types are supported: `repository`, `github_file`, `free_text`, `github_issue`, `github_pull_request`.
  The `uploaded_text_file` and `media_content` types are not supported via this endpoint.

  For `github_file` resources, if a resource with the same repository, file path, and SHA already exists, the existing resource is returned with a `200` status.

  OAuth app tokens and personal access tokens (classic) need the `write: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 the resource being created.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"free_text":{"value":{"metadata":{"name":"notes.txt","text":"Some helpful notes"},"resource_type":"free_text"}},"github_file":{"value":{"metadata":{"file_path":"README.md","repository_id":42,"sha":"abc123"},"resource_type":"github_file"}},"repository":{"value":{"metadata":{"repository_id":42},"resource_type":"repository"}}},"schema":{"properties":{"metadata":{"additionalProperties":true,"description":"Resource-specific metadata.","type":"object"},"resource_type":{"description":"The type of resource to create.","enum":["repository","github_file","free_text","github_issue","github_pull_request"],"type":"string"}},"required":["resource_type","metadata"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":1,"metadata":{"file_path":"README.md","repository_id":42,"sha":"abc123"},"resource_type":"github_file","updated_at":"2025-01-01T00:00:00Z"}}},"schema":{"$ref":"#/components/schemas/copilot-space-resource"}}},"description":"Duplicate github_file resource already exists"},"201":{"content":{"application/json":{"examples":{"default":{"value":{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":1,"metadata":{"name":"notes.txt","text":"Some helpful notes"},"resource_type":"free_text","updated_at":"2025-01-01T00:00:00Z"}}},"schema":{"$ref":"#/components/schemas/copilot-space-resource"}}},"description":"Resource created"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/get-resource-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}
method: GET
summary: Get a resource for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific resource attached to a Copilot Space owned by an organization.
  The authenticated user must have appropriate permissions to view the space.

  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The unique identifier of the resource.","in":"path","name":"space_resource_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":1,"metadata":{"name":"notes.txt","text":"Some helpful notes"},"resource_type":"free_text","updated_at":"2025-01-01T00:00:00Z"}}},"schema":{"$ref":"#/components/schemas/copilot-space-resource"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/update-resource-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}
method: PUT
summary: Set a resource for an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Updates the metadata of a resource in a specific Copilot Space owned by an organization.
  The authenticated user must have write permissions on the space.

  OAuth app tokens and personal access tokens (classic) need the `write: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 the resource being updated.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The unique identifier of the resource.","in":"path","name":"space_resource_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"metadata":{"name":"updated-notes.txt","text":"Updated content"}}}},"schema":{"properties":{"metadata":{"additionalProperties":true,"description":"Updated resource-specific metadata.","type":"object"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"copilot_chat_attachment_id":null,"created_at":"2025-01-01T00:00:00Z","id":1,"metadata":{"name":"updated-notes.txt","text":"Updated content"},"resource_type":"free_text","updated_at":"2025-01-01T12:00:00Z"}}},"schema":{"$ref":"#/components/schemas/copilot-space-resource"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: copilot-spaces/delete-resource-for-org
path: /orgs/{org}/copilot-spaces/{space_number}/resources/{space_resource_id}
method: DELETE
summary: Delete a resource from an organization Copilot Space
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a resource from a specific Copilot Space owned by an organization.
  The authenticated user must have write permissions on the space.

  OAuth app tokens and personal access tokens (classic) need the `write: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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The unique identifier of the resource.","in":"path","name":"space_resource_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 134 characters]


operation_id: copilot/get-copilot-organization-details
path: /orgs/{org}/copilot/billing
method: GET
summary: Get Copilot seat information and settings for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets information about an organization's Copilot subscription, including seat breakdown
  and feature policies. To configure these settings, go to your organization's settings on GitHub.com.
  For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)."

  Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-organization-details"}},"schema":{"$ref":"#/components/schemas/copilot-organization-details"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"There is a problem with your account's associated payment method."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/list-copilot-seats
path: /orgs/{org}/copilot/billing/seats
method: GET
summary: List all Copilot seat assignments for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.
  Only organization owners can view assigned seats.

  Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.
  For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/page"},{"description":"The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":50,"type":"integer"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-seats-list"}},"schema":{"properties":{"seats":{"items":{"$ref":"#/components/schemas/copilot-seat-details"},"type":"array"},"total_seats":{"description":"Total number of Copilot seats for the organization currently being billed.","type":"integer"}},"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/add-copilot-seats-for-teams
path: /orgs/{org}/copilot/billing/selected_teams
method: POST
summary: Add teams to the Copilot subscription for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Purchases a GitHub Copilot seat for all users within each specified team.
  The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."

  Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.
  For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."
  For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."

  The response contains the total number of new seats that were created and existing seats that were refreshed.

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_teams":["engteam1","engteam2","engteam3"]}}},"schema":{"properties":{"selected_teams":{"description":"List of team names within the organization to which to grant access to GitHub Copilot.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["selected_teams"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"value":{"seats_created":5}}},"schema":{"description":"The total number of seats created for members of the specified team(s).","properties":{"seats_created":{"type":"integer"}},"required":["seats_created"],"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/cancel-copilot-seat-assignment-for-teams
path: /orgs/{org}/copilot/billing/selected_teams
method: DELETE
summary: Remove teams from the Copilot subscription for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Sets seats for all members of each team specified to "pending cancellation".
  This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.
  For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."

  Only organization owners can cancel Copilot seats for their organization members.

  The response contains the total number of seats set to "pending cancellation".

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_teams":["engteam1","engteam2","engteam3"]}}},"schema":{"properties":{"selected_teams":{"description":"The names of teams from which to revoke access to GitHub Copilot.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["selected_teams"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"seats_cancelled":5}}},"schema":{"description":"The total number of seats set to \"pending cancellation\" for members of the specified team(s).","properties":{"seats_cancelled":{"type":"integer"}},"required":["seats_cancelled"],"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/add-copilot-seats-for-users
path: /orgs/{org}/copilot/billing/selected_users
method: POST
summary: Add users to the Copilot subscription for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Purchases a GitHub Copilot seat for each user specified.
  The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."

  Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.
  For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."
  For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."

  The response contains the total number of new seats that were created and existing seats that were refreshed.

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_usernames":["cooluser1","hacker2","octocat"]}}},"schema":{"properties":{"selected_usernames":{"description":"The usernames of the organization members to be granted access to GitHub Copilot.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["selected_usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"value":{"seats_created":5}}},"schema":{"description":"The total number of seats created for the specified user(s).","properties":{"seats_created":{"type":"integer"}},"required":["seats_created"],"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, or the organization's Copilot access setting is set to enable Copilot for all users or is unconfigured."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/cancel-copilot-seat-assignment-for-users
path: /orgs/{org}/copilot/billing/selected_users
method: DELETE
summary: Remove users from the Copilot subscription for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Sets seats for all users specified to "pending cancellation".
  This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.
  For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."

  Only organization owners can cancel Copilot seats for their organization members.

  The response contains the total number of seats set to "pending cancellation".

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_usernames":["cooluser1","hacker2","octocat"]}}},"schema":{"properties":{"selected_usernames":{"description":"The usernames of the organization members for which to revoke access to GitHub Copilot.","items":{"type":"string"},"minItems":1,"type":"array"}},"required":["selected_usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"seats_cancelled":5}}},"schema":{"description":"The total number of seats set to \"pending cancellation\" for the specified users.","properties":{"seats_cancelled":{"type":"integer"}},"required":["seats_cancelled"],"type":"object"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Copilot Business or Enterprise is not enabled for this organization, billing has not been set up for this organization, a public code suggestions policy has not been set for this organization, the seat management setting is set to enable Copilot for all users or is unconfigured, or a user's seat cannot be cancelled because it was assigned to them via a team."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/get-copilot-coding-agent-permissions-organization
path: /orgs/{org}/copilot/coding-agent/permissions
method: GET
summary: Get Copilot cloud agent permissions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets information about which repositories in an organization have been enabled
  or disabled for the Copilot cloud agent.

  Organization owners can configure whether Copilot cloud agent is enabled for
  all repositories, selected repositories, or no repositories owned by organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"all_enabled":{"summary":"All repositories enabled","value":{"enabled_repositories":"all"}},"none_enabled":{"summary":"No repositories enabled","value":{"enabled_repositories":"none"}},"selected_enabled":{"summary":"Selected repositories enabled","value":{"enabled_repositories":"selected","selected_repositories_url":"https://api.github.com/orgs/my-org/copilot/coding-agent/permissions/repositories"}}},"schema":{"properties":{"enabled_repositories":{"description":"The policy for which repositories can use Copilot cloud agent. Can be one of `all`, `selected`, or `none`.","enum":["all","selected","none"],"type":"string"},"selected_repositories_url":{"description":"The URL for the selected repositories endpoint. Only present when `enabled_repositories` is `selected`.","type":"string"}},"required":["enabled_repositories"],"type":"object"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/set-copilot-coding-agent-permissions-organization
path: /orgs/{org}/copilot/coding-agent/permissions
method: PUT
summary: Set Copilot cloud agent permissions for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Sets the policy for which repositories in an organization can use Copilot cloud agent.

  Organization owners can configure whether Copilot cloud agent is enabled for
  all repositories, selected repositories, or no repositories owned by the organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"enabled_repositories":"selected"}}},"schema":{"properties":{"enabled_repositories":{"description":"The policy for which repositories can use Copilot cloud agent. Can be one of `all`, `selected`, or `none`.","enum":["all","selected","none"],"type":"string"}},"required":["enabled_repositories"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/list-copilot-coding-agent-selected-repositories-for-organization
path: /orgs/{org}/copilot/coding-agent/permissions/repositories
method: GET
summary: List repositories enabled for Copilot cloud agent in an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Lists the selected repositories that are enabled for Copilot cloud agent in an organization.

  Organization owners can use this endpoint when the coding agent repository policy
  is set to `selected` to see which repositories have been enabled.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-paginated"}},"schema":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","repositories"],"type":"object"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/set-copilot-coding-agent-selected-repositories-for-organization
path: /orgs/{org}/copilot/coding-agent/permissions/repositories
method: PUT
summary: Set selected repositories for Copilot cloud agent in an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Replaces the list of selected repositories that are enabled for Copilot cloud
  agent in an organization. This method can only be called when the cloud agent
  repository policy is set to `selected`.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[32,42]}}},"schema":{"properties":{"selected_repository_ids":{"description":"List of repository IDs to enable for Copilot cloud agent.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/enable-copilot-coding-agent-for-repository-in-organization
path: /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
method: PUT
summary: Enable a repository for Copilot cloud agent in an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Adds a repository to the list of selected repositories enabled for Copilot
  cloud agent in an organization. This method can only be called when the
  cloud agent repository policy is set to `selected`.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 123 characters]

output_schema:
  {"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/disable-copilot-coding-agent-for-repository-in-organization
path: /orgs/{org}/copilot/coding-agent/permissions/repositories/{repository_id}
method: DELETE
summary: Disable a repository for Copilot cloud agent in an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Removes a repository from the list of selected repositories enabled for Copilot
  cloud agent in an organization. This method can only be called when the
  cloud agent repository policy is set to `selected`.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scopes to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 123 characters]

output_schema:
  {"204":{"description":"No Content"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-content-exclusion-for-organization
path: /orgs/{org}/copilot/content_exclusion
method: GET
summary: Get Copilot content exclusion rules for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets information about an organization's Copilot content exclusion path rules.
  To configure these settings, go to the organization's settings on GitHub.
  For more information, see "[Excluding content from GitHub Copilot](https://docs.github.com/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot#configuring-content-exclusions-for-your-organization)."

  Organization owners can view details about Copilot content exclusion rules for the organization.

  OAuth app tokens and personal access tokens (classic) need either the `copilot` or `read:org` scopes to use this endpoint.

  > [!CAUTION]
  > * At this time, the API does not support comments. This endpoint will not return any comments in the existing rules.
  > * At this time, the API does not support duplicate keys. If your content exclusion configuration contains duplicate keys, the API will return only the last occurrence of that key. For example, if duplicate entries are present, only the final value will be included in the response.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-organization-content-exclusion-details"}},"schema":{"$ref":"#/components/schemas/copilot-organization-content-exclusion-details"}}},"description":"OK"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/set-copilot-content-exclusion-for-organization
path: /orgs/{org}/copilot/content_exclusion
method: PUT
summary: Set Copilot content exclusion rules for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Sets Copilot content exclusion path rules for an organization.
  To configure these settings, go to the organization's settings on GitHub.
  For more information, see "[Excluding content from GitHub Copilot](https://docs.github.com/copilot/managing-copilot/configuring-and-auditing-content-exclusion/excluding-content-from-github-copilot#configuring-content-exclusions-for-your-organization)."

  Organization owners can set Copilot content exclusion rules for the organization.

  OAuth app tokens and personal access tokens (classic) need the `copilot` scope to use this endpoint.

  > [!CAUTION]
  > * At this time, the API does not support comments. When using this endpoint, any existing comments in your rules will be deleted.
  > * At this time, the API does not support duplicate keys. If you submit content exclusions through the API with duplicate keys, only the last occurrence will be saved. Earlier entries with the same key will be overwritten.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example of content exclusion paths","value":{"octo-repo":["/src/some-dir/kernel.rs"]}}},"schema":{"additionalProperties":{"items":{"anyOf":[{"description":"The path to the file that will be excluded.","type":"string"},{"additionalProperties":false,"properties":{"ifAnyMatch":{"items":{"type":"string"},"type":"array"}},"required":["ifAnyMatch"],"type":"object"},{"additionalProperties":false,"properties":{"ifNoneMatch":{"items":{"type":"string"},"type":"array"}},"required":["ifNoneMatch"],"type":"object"}]},"type":"array"},"type":"object"}}},"description":"The content exclusion rules to set","required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"message":"Content exclusion rules updated successfully."}}},"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"Success"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"413":{"$ref":"#/components/responses/too_large"},"422":{"$ref":"#/components/responses/validation_failed_simple"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-organization-one-day-usage-metrics
path: /orgs/{org}/copilot/metrics/reports/organization-1-day
method: GET
summary: Get Copilot organization usage metrics for a specific day
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the Copilot organization usage metrics report for a specific day. The report provides comprehensive usage data for Copilot features across the organization.

  The report contains aggregated metrics for the specified day, including usage statistics for various Copilot features, user engagement data, and feature adoption metrics. Reports are generated daily and made available for download through signed URLs with a limited expiration time.

  The response includes download links to the report files, along with the specific date of the report. The report covers a complete day for which data has been processed.

  Organization owners and authorized users with fine-grained "View Organization Copilot Metrics" permission can retrieve Copilot metrics reports for the organization. OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

  For more information about organization metrics attribution, see [How are metrics attributed across organizations](https://docs.github.com/copilot/concepts/copilot-metrics#how-are-metrics-attributed-across-organizations).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/day"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-usage-metrics-1-day-report"}},"schema":{"$ref":"#/components/schemas/copilot-usage-metrics-1-day-report"}}},"description":"Response"},"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-organization-usage-metrics
path: /orgs/{org}/copilot/metrics/reports/organization-28-day/latest
method: GET
summary: Get Copilot organization usage metrics
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the latest 28-day organization Copilot usage metrics report. The report provides comprehensive usage data for Copilot features across the organization.

  The report contains aggregated metrics for the previous 28 days, including usage statistics for various Copilot features, user engagement data, and feature adoption metrics. Reports are generated daily and made available for download through signed URLs with a limited expiration time.

  The response includes download links to the report files, along with the specific date range covered by the report. The report covers a complete 28-day period ending on the most recent day for which data has been processed.

  Organization owners and authorized users with fine-grained "View Organization Copilot Metrics" permission can retrieve Copilot metrics reports for the organization. OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

  For more information about organization metrics attribution, see [How are metrics attributed across organizations](https://docs.github.com/copilot/concepts/copilot-metrics#how-are-metrics-attributed-across-organizations).

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-usage-metrics-28-day-report"}},"schema":{"$ref":"#/components/schemas/copilot-usage-metrics-28-day-report"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-organization-user-teams-one-day-report
path: /orgs/{org}/copilot/metrics/reports/user-teams-1-day
method: GET
summary: Get Copilot organization user-teams report for a specific day
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the Copilot organization user-teams report for a specific day. The report provides user-team join data for Copilot across the organization, with one entry per user-team pair.

  The report contains user-team membership data for the specified day, enabling consumers to join with the existing organization user reports to compute team-level usage metrics. Reports are generated daily and made available for download through signed URLs with a limited expiration time.

  The response includes download links to the report files, along with the specific date of the report. The report covers a complete day for which data has been processed.

  Organization owners and authorized users with fine-grained "View Organization Copilot Metrics" permission can retrieve Copilot metrics reports for the organization. OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

  For more information about organization metrics attribution, see [How are metrics attributed across organizations](https://docs.github.com/copilot/concepts/copilot-metrics#how-are-metrics-attributed-across-organizations).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/day"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-usage-metrics-1-day-report"}},"schema":{"$ref":"#/components/schemas/copilot-usage-metrics-1-day-report"}}},"description":"Response"},"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-organization-users-one-day-usage-metrics
path: /orgs/{org}/copilot/metrics/reports/users-1-day
method: GET
summary: Get Copilot organization users usage metrics for a specific day
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the Copilot organization user usage metrics report for a specific day. The report provides detailed user-level usage data and engagement metrics for Copilot features across the organization.

  The report contains user-specific metrics for the specified day, including individual user engagement statistics, feature usage patterns, and adoption metrics broken down by user. This report allows authorized users to analyze Copilot usage at the user level to understand adoption patterns and identify opportunities for increased engagement.

  Reports are generated daily and made available for download through signed URLs with a limited expiration time. The response includes download links to the report files, along with the specific date of the report. The report covers a complete day for which data has been processed.

  Organization owners and authorized users with fine-grained "View Organization Copilot Metrics" permission can retrieve Copilot metrics reports for the organization. OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

  For more information about organization metrics attribution, see [How are metrics attributed across organizations](https://docs.github.com/copilot/concepts/copilot-metrics#how-are-metrics-attributed-across-organizations).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/day"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-usage-metrics-1-day-report"}},"schema":{"$ref":"#/components/schemas/copilot-usage-metrics-1-day-report"}}},"description":"Response"},"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/copilot-organization-users-usage-metrics
path: /orgs/{org}/copilot/metrics/reports/users-28-day/latest
method: GET
summary: Get Copilot organization users usage metrics
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the latest 28-day organization users Copilot usage metrics report. The report provides detailed user-level usage data and engagement metrics for Copilot features across the organization.

  The report contains user-specific metrics for the previous 28 days, including individual user engagement statistics, feature usage patterns, and adoption metrics broken down by user. This report allows authorized users to analyze Copilot usage at the user level to understand adoption patterns and identify opportunities for increased engagement.

  Reports are generated daily and made available for download through signed URLs with a limited expiration time. The response includes download links to the report files, along with the specific date range covered by the report. The report covers a complete 28-day period ending on the most recent day for which data has been processed.

  Organization owners and authorized users with fine-grained "View Organization Copilot Metrics" permission can retrieve Copilot metrics reports for the organization. OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint.

  For more information about organization metrics attribution, see [How are metrics attributed across organizations](https://docs.github.com/copilot/concepts/copilot-metrics#how-are-metrics-attributed-across-organizations).

output_schema:
[cell repeats an earlier one in this file: 391 characters]


operation_id: dependabot/list-alerts-for-org
path: /orgs/{org}/dependabot/alerts
method: GET
summary: List Dependabot alerts for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists Dependabot alerts for an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-classifications"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-states"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-severities"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-ecosystems"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-packages"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-epss"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-artifact-registry-urls"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-artifact-registry"},{"$ref":"#/components/parameters/dependabot-alert-org-scope-comma-separated-has"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-assignees"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-runtime-risk"},{"$ref":"#/components/parameters/dependabot-alert-scope"},{"$ref":"#/components/parameters/dependabot-alert-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-alerts-for-organization"}},"schema":{"items":{"$ref":"#/components/schemas/dependabot-alert-with-repository"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: dependabot/repository-access-for-org
path: /orgs/{org}/dependabot/repository-access
method: GET
summary: Lists the repositories Dependabot can access in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories that organization admins have allowed Dependabot to access when updating dependencies.
  > [!NOTE]
  >    This operation supports both server-to-server and user-to-server access.
  Unauthorized users will not see the existence of this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The page number of results to fetch.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"},"style":"form"},{"description":"Number of results per page.","in":"query","name":"per_page","schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-repository-access-details"}},"schema":{"$ref":"#/components/schemas/dependabot-repository-access-details"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependabot/update-repository-access-for-org
path: /orgs/{org}/dependabot/repository-access
method: PATCH
summary: Updates Dependabot's repository access list for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates repositories according to the list of repositories that organization admins have given Dependabot access to when they've updated dependencies.

  > [!NOTE]
  >    This operation supports both server-to-server and user-to-server access.
  Unauthorized users will not see the existence of this endpoint.

  **Example request body:**
  ```json
  {
    "repository_ids_to_add": [123, 456],
    "repository_ids_to_remove": [789]
  }
  ```

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example with a 'succeeded' status."},"add-example":{"summary":"Add repositories","value":{"repository_ids_to_add":[123,456]}},"remove-example":{"summary":"Remove repositories","value":{"repository_ids_to_remove":[789]}}},"schema":{"example":{"repository_ids_to_add":[123,456],"repository_ids_to_remove":[789]},"properties":{"repository_ids_to_add":{"description":"List of repository IDs to add.","items":{"type":"integer"},"type":"array"},"repository_ids_to_remove":{"description":"List of repository IDs to remove.","items":{"type":"integer"},"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 134 characters]


operation_id: dependabot/set-repository-access-default-level
path: /orgs/{org}/dependabot/repository-access/default-level
method: PUT
summary: Set the default repository access level for Dependabot
auth_scheme_ref: GitHubBearerToken
description:
  Sets the default level of repository access Dependabot will have while performing an update.  Available values are:
  - 'public' - Dependabot will only have access to public repositories, unless access is explicitly granted to non-public repositories.
  - 'internal' - Dependabot will only have access to public and internal repositories, unless access is explicitly granted to private repositories.

  Unauthorized users will not see the existence of this endpoint.

  This operation supports both server-to-server and user-to-server access.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example with a 'succeeded' status.","value":{"default_level":"public"}}},"schema":{"properties":{"default_level":{"description":"The default repository access level for Dependabot updates.","enum":["public","internal"],"example":"internal","type":"string"}},"required":["default_level"],"type":"object"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 134 characters]


operation_id: dependabot/list-org-secrets
path: /orgs/{org}/dependabot/secrets
method: GET
summary: List organization secrets
auth_scheme_ref: GitHubBearerToken
description:
  Lists all secrets available in an organization without revealing their
  encrypted values.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-dependabot-secret-paginated"}},"schema":{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/organization-dependabot-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: dependabot/get-org-public-key
path: /orgs/{org}/dependabot/secrets/public-key
method: GET
summary: Get an organization public key
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets your public key, which you need to encrypt secrets. You need to
  encrypt a secret before you can create or update secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/dependabot-public-key"}},"schema":{"$ref":"#/components/schemas/dependabot-public-key"}}},"description":"Response"}}


operation_id: dependabot/get-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}
method: GET
summary: Get an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Gets a single organization secret without revealing its encrypted value.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-dependabot-secret"}},"schema":{"$ref":"#/components/schemas/organization-dependabot-secret"}}},"description":"Response"}}


operation_id: dependabot/create-or-update-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}
method: PUT
summary: Create or update an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Creates or updates an organization secret with an encrypted value. Encrypt your secret using
  [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","selected_repository_ids":[1296269,1296280],"visibility":"selected"}}},"schema":{"properties":{"encrypted_value":{"description":"Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/dependabot/secrets#get-an-organization-public-key) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"key_id":{"description":"ID of the key you used to encrypt the secret.","type":"string"},"selected_repository_ids":{"description":"An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"},"visibility":{"description":"Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret.","enum":["all","private","selected"],"type":"string"}},"required":["visibility"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response when creating a secret"},"204":{"description":"Response when updating a secret"}}


operation_id: dependabot/delete-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}
method: DELETE
summary: Delete an organization secret
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a secret in an organization using the secret name.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]


operation_id: dependabot/set-selected-repos-for-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}/repositories
method: PUT
summary: Set selected repositories for an organization secret
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Replaces all repositories for an organization secret when the `visibility`
  for repository access is set to `selected`. The visibility is set when you [Create
  or update an organization secret](https://docs.github.com/rest/dependabot/secrets#create-or-update-an-organization-secret).

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[64780797]}}},"schema":{"properties":{"selected_repository_ids":{"description":"An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/dependabot/secrets#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/dependabot/secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: dependabot/add-selected-repo-to-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}
method: PUT
summary: Add selected repository to an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to an organization secret when the `visibility` for
  repository access is set to `selected`. The visibility is set when you [Create or
  update an organization secret](https://docs.github.com/rest/dependabot/secrets#create-or-update-an-organization-secret).

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 219 characters]

output_schema:
  {"204":{"description":"No Content when repository was added to the selected list"},"409":{"description":"Conflict when visibility type is not set to selected"}}


operation_id: dependabot/remove-selected-repo-from-org-secret
path: /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}
method: DELETE
summary: Remove selected repository from an organization secret
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from an organization secret when the `visibility`
  for repository access is set to `selected`. The visibility is set when you [Create
  or update an organization secret](https://docs.github.com/rest/dependabot/secrets#create-or-update-an-organization-secret).

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 219 characters]

output_schema:
  {"204":{"description":"Response when repository was removed from the selected list"},"409":{"description":"Conflict when visibility type not set to selected"}}


operation_id: packages/list-docker-migration-conflicting-packages-for-organization
path: /orgs/{org}/docker/conflicts
method: GET
summary: Get list of conflicting packages during Docker migration for organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all packages that are in a specific organization, are readable by the requesting user, and that encountered a conflict during a Docker migration.

  OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/packages-for-org"}},"schema":{"items":{"$ref":"#/components/schemas/package"},"type":"array"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: activity/list-public-org-events
path: /orgs/{org}/events
method: GET
summary: List public organization events
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"200-response":{"$ref":"#/components/examples/public-org-events-items"}},"schema":{"items":{"$ref":"#/components/schemas/event"},"type":"array"}}},"description":"Response"}}


operation_id: orgs/list-failed-invitations
path: /orgs/{org}/failed_invitations
method: GET
summary: List failed organization invitations
auth_scheme_ref: GitHubBearerToken
description:
  The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-invitation-items"}},"schema":{"items":{"$ref":"#/components/schemas/organization-invitation"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-webhooks
path: /orgs/{org}/hooks
method: GET
summary: List organization webhooks
auth_scheme_ref: GitHubBearerToken
description:
  List webhooks for an organization.

  The authenticated user must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-hook-items"}},"schema":{"items":{"$ref":"#/components/schemas/org-hook"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/create-webhook
path: /orgs/{org}/hooks
method: POST
summary: Create an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Create a hook that posts payloads in JSON format.

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or
  edit webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"active":true,"config":{"content_type":"json","url":"http://example.com/webhook"},"events":["push","pull_request"],"name":"web"}}},"schema":{"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"config":{"description":"Key/value pairs to provide settings for this webhook.","properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"password":{"example":"\"password\"","type":"string"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"},"username":{"example":"\"kdaigle\"","type":"string"}},"required":["url"],"type":"object"},"events":{"default":["push"],"description":"Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. Set to `[\"*\"]` to receive all possible events.","items":{"type":"string"},"type":"array"},"name":{"description":"Must be passed as \"web\".","type":"string"}},"required":["name","config"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-hook"}},"schema":{"$ref":"#/components/schemas/org-hook"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/orgs/octocat/hooks/1","schema":{"type":"string"},"style":"simple"}}},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/get-webhook
path: /orgs/{org}/hooks/{hook_id}
method: GET
summary: Get an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Returns a webhook configured in an organization. To get only the webhook
  `config` properties, see "[Get a webhook configuration for an organization](/rest/orgs/webhooks#get-a-webhook-configuration-for-an-organization).

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-hook"}},"schema":{"$ref":"#/components/schemas/org-hook"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/delete-webhook
path: /orgs/{org}/hooks/{hook_id}
method: DELETE
summary: Delete an organization webhook
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Delete a webhook for an organization.

  The authenticated user must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":null}


operation_id: orgs/update-webhook
path: /orgs/{org}/hooks/{hook_id}
method: PATCH
summary: Update an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Updates a webhook configured in an organization. When you update a webhook,
  the `secret` will be overwritten. If you previously had a `secret` set, you must
  provide the same `secret` or set a new `secret` or the secret will be removed. If
  you are only updating individual webhook `config` properties, use "[Update a webhook
  configuration for an organization](/rest/orgs/webhooks#update-a-webhook-configuration-for-an-organization)".

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"active":true,"events":["pull_request"]}}},"schema":{"properties":{"active":{"default":true,"description":"Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications.","type":"boolean"},"config":{"description":"Key/value pairs to provide settings for this webhook.","properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"required":["url"],"type":"object"},"events":{"default":["push"],"description":"Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for.","items":{"type":"string"},"type":"array"},"name":{"example":"\"web\"","type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-hook-2"}},"schema":{"$ref":"#/components/schemas/org-hook"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/get-webhook-config-for-org
path: /orgs/{org}/hooks/{hook_id}/config
method: GET
summary: Get a webhook configuration for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Returns the webhook configuration for an organization. To get more information about the webhook, including the `active` state and `events`, use "[Get an organization webhook ](/rest/orgs/webhooks#get-an-organization-webhook)."

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/webhook-config"}},"schema":{"$ref":"#/components/schemas/webhook-config"}}},"description":"Response"}}


operation_id: orgs/update-webhook-config-for-org
path: /orgs/{org}/hooks/{hook_id}/config
method: PATCH
summary: Update a webhook configuration for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates the webhook configuration for an organization. To update more information about the webhook, including the `active` state and `events`, use "[Update an organization webhook ](/rest/orgs/webhooks#update-an-organization-webhook)."

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Update an existing webhook","value":{"content_type":"json","insecure_ssl":"0","secret":"********","url":"http://example.com/webhook"}}},"schema":{"properties":{"content_type":{"$ref":"#/components/schemas/webhook-config-content-type"},"insecure_ssl":{"$ref":"#/components/schemas/webhook-config-insecure-ssl"},"secret":{"$ref":"#/components/schemas/webhook-config-secret"},"url":{"$ref":"#/components/schemas/webhook-config-url"}},"type":"object"}}}}}

output_schema:
[cell repeats an earlier one in this file: 194 characters]


operation_id: orgs/list-webhook-deliveries
path: /orgs/{org}/hooks/{hook_id}/deliveries
method: GET
summary: List deliveries for an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Returns a list of webhook deliveries for a webhook configured in an organization.

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/cursor"},{"$ref":"#/components/parameters/webhook-delivery-status"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/hook-delivery-items"}},"schema":{"items":{"$ref":"#/components/schemas/hook-delivery-item"},"type":"array"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/get-webhook-delivery
path: /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}
method: GET
summary: Get a webhook delivery for an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Returns a delivery for a webhook configured in an organization.

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"},{"$ref":"#/components/parameters/delivery-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/hook-delivery"}},"schema":{"$ref":"#/components/schemas/hook-delivery"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/redeliver-webhook-delivery
path: /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts
method: POST
summary: Redeliver a delivery for an organization webhook
auth_scheme_ref: GitHubBearerToken
description:
  Redeliver a delivery for a webhook configured in an organization.

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hook-id"},{"$ref":"#/components/parameters/delivery-id"}],"requestBody":null}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/ping-webhook
path: /orgs/{org}/hooks/{hook_id}/pings
method: POST
summary: Ping an organization webhook
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event)
  to be sent to the hook.

  You must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need `admin:org_hook` scope. OAuth apps cannot list, view, or edit
  webhooks that they did not create and users cannot list, view, or edit webhooks that were created by OAuth apps.

input_schema:
[cell repeats an earlier one in this file: 117 characters]


operation_id: api-insights/get-route-stats-by-actor
path: /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
method: GET
summary: Get route stats by actor
description: Get API request count statistics for an actor broken down by route within a specified time frame.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-actor-type"},{"$ref":"#/components/parameters/api-insights-actor-id"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/api-insights-route-stats-sort"},{"$ref":"#/components/parameters/api-insights-api-route-substring"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-route-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-route-stats"}}},"description":"Response"}}


operation_id: api-insights/get-subject-stats
path: /orgs/{org}/insights/api/subject-stats
method: GET
summary: Get subject stats
auth_scheme_ref: GitHubBearerToken
description:
  Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/api-insights-sort"},{"$ref":"#/components/parameters/api-insights-subject-name-substring"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-subject-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-subject-stats"}}},"description":"Response"}}


operation_id: api-insights/get-summary-stats
path: /orgs/{org}/insights/api/summary-stats
method: GET
summary: Get summary stats
auth_scheme_ref: GitHubBearerToken
description:
  Get overall statistics of API requests made within an organization by all users and apps within a specified time frame.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-summary-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-summary-stats"}}},"description":"Response"}}


operation_id: api-insights/get-summary-stats-by-user
path: /orgs/{org}/insights/api/summary-stats/users/{user_id}
method: GET
summary: Get summary stats by user
description: Get overall statistics of API requests within the organization for a user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-user-id"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-summary-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-summary-stats"}}},"description":"Response"}}


operation_id: api-insights/get-summary-stats-by-actor
path: /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}
method: GET
summary: Get summary stats by actor
auth_scheme_ref: GitHubBearerToken
description:
  Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/api-insights-actor-type"},{"$ref":"#/components/parameters/api-insights-actor-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-summary-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-summary-stats"}}},"description":"Response"}}


operation_id: api-insights/get-time-stats
path: /orgs/{org}/insights/api/time-stats
method: GET
summary: Get time stats
auth_scheme_ref: GitHubBearerToken
description:
  Get the number of API requests and rate-limited requests made within an organization over a specified time period.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/api-insights-timestamp-increment"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-time-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-time-stats"}}},"description":"Response"}}


operation_id: api-insights/get-time-stats-by-user
path: /orgs/{org}/insights/api/time-stats/users/{user_id}
method: GET
summary: Get time stats by user
auth_scheme_ref: GitHubBearerToken
description:
  Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-user-id"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/api-insights-timestamp-increment"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-time-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-time-stats"}}},"description":"Response"}}


operation_id: api-insights/get-time-stats-by-actor
path: /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}
method: GET
summary: Get time stats by actor
auth_scheme_ref: GitHubBearerToken
description:
  Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-actor-type"},{"$ref":"#/components/parameters/api-insights-actor-id"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/api-insights-timestamp-increment"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-time-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-time-stats"}}},"description":"Response"}}


operation_id: api-insights/get-user-stats
path: /orgs/{org}/insights/api/user-stats/{user_id}
method: GET
summary: Get user stats
description: Get API usage statistics within an organization for a user broken down by the type of access.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/api-insights-user-id"},{"$ref":"#/components/parameters/api-insights-min-timestamp"},{"$ref":"#/components/parameters/api-insights-max-timestamp"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/api-insights-sort"},{"$ref":"#/components/parameters/api-insights-actor-name-substring"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-insights-user-stats"}},"schema":{"$ref":"#/components/schemas/api-insights-user-stats"}}},"description":"Response"}}


operation_id: apps/get-org-installation
path: /orgs/{org}/installation
method: GET
summary: Get an organization installation for the authenticated app
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Enables an authenticated GitHub App to find the organization's installation information.

  You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/installation"}},"schema":{"$ref":"#/components/schemas/installation"}}},"description":"Response"}}


operation_id: orgs/list-app-installations
path: /orgs/{org}/installations
method: GET
summary: List app installations for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all GitHub Apps in an organization. The installation count includes
  all GitHub Apps installed on repositories in the organization.

  The authenticated user must be an organization owner to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:read` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/installation-paginated"}},"schema":{"properties":{"installations":{"items":{"$ref":"#/components/schemas/installation"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","installations"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: interactions/get-restrictions-for-org
path: /orgs/{org}/interaction-limits
method: GET
summary: Get interaction restrictions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/interaction-limit-response"}},"schema":{"anyOf":[{"$ref":"#/components/schemas/interaction-limit-response"},{"additionalProperties":false,"type":"object"}]}}},"description":"Response"}}


operation_id: interactions/set-restrictions-for-org
path: /orgs/{org}/interaction-limits
method: PUT
summary: Set interaction restrictions for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"expiry":"one_month","limit":"collaborators_only"}}},"schema":{"$ref":"#/components/schemas/interaction-limit"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/interaction-limit-response"}},"schema":{"$ref":"#/components/schemas/interaction-limit-response"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: interactions/remove-restrictions-for-org
path: /orgs/{org}/interaction-limits
method: DELETE
summary: Remove interaction restrictions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions.


operation_id: orgs/list-pending-invitations
path: /orgs/{org}/invitations
method: GET
summary: List pending organization invitations
auth_scheme_ref: GitHubBearerToken
description:
  The return hash contains a `role` field which refers to the Organization
  Invitation role and will be one of the following values: `direct_member`, `admin`,
  `billing_manager`, or `hiring_manager`. If the invitee is not a GitHub
  member, the `login` field in the return hash will be `null`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"Filter invitations by their member role.","in":"query","name":"role","schema":{"default":"all","enum":["all","admin","direct_member","billing_manager","hiring_manager"],"type":"string"},"style":"form"},{"description":"Filter invitations by their invitation source.","in":"query","name":"invitation_source","schema":{"default":"all","enum":["all","member","scim"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-invitation-items"}},"schema":{"items":{"$ref":"#/components/schemas/organization-invitation"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/create-invitation
path: /orgs/{org}/invitations
method: POST
summary: Create an organization invitation
auth_scheme_ref: GitHubBearerToken
description:
  Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.

  This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"
  and "[Best practices for using the REST API](https://docs.github.com/rest/guides/best-practices-for-using-the-rest-api)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"email":"octocat@github.com","role":"direct_member","team_ids":[12,26]}}},"schema":{"properties":{"email":{"description":"**Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user.","type":"string"},"invitee_id":{"description":"**Required unless you provide `email`**. GitHub user ID for the person you are inviting.","type":"integer"},"role":{"default":"direct_member","description":"The role for the new member. \n * `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams.  \n * `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation.  \n * `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. \n * `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization.","enum":["admin","direct_member","billing_manager","reinstate"],"type":"string"},"team_ids":{"description":"Specify IDs for the teams you want to invite new members to.","items":{"type":"integer"},"type":"array"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-invitation"}},"schema":{"$ref":"#/components/schemas/organization-invitation"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/cancel-invitation
path: /orgs/{org}/invitations/{invitation_id}
method: DELETE
summary: Cancel an organization invitation
auth_scheme_ref: GitHubBearerToken
description:
  Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.

  This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/invitation-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/list-invitation-teams
path: /orgs/{org}/invitations/{invitation_id}/teams
method: GET
summary: List organization invitation teams
auth_scheme_ref: GitHubBearerToken
description:
  List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/invitation-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-issue-fields
path: /orgs/{org}/issue-fields
method: GET
summary: List issue fields for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field-items"}},"schema":{"items":{"$ref":"#/components/schemas/issue-field"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/create-issue-field
path: /orgs/{org}/issue-fields
method: POST
summary: Create issue field for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new issue field for an organization.

  You can find out more about issue fields in [Managing issue fields in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/using-issues/managing-issue-fields-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"data_type":"single_select","description":"Level of importance for the issue","name":"Priority","options":[{"color":"red","description":"High priority","name":"High"},{"color":"yellow","description":"Medium priority","name":"Medium"},{"color":"green","description":"Low priority","name":"Low"}]}}},"schema":{"$ref":"#/components/schemas/organization-create-issue-field"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field"}},"schema":{"$ref":"#/components/schemas/issue-field"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: orgs/delete-issue-field
path: /orgs/{org}/issue-fields/{issue_field_id}
method: DELETE
summary: Delete issue field for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an issue field for an organization.

  You can find out more about issue fields in [Managing issue fields in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/using-issues/managing-issue-fields-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/issue-field-id"}],"requestBody":null}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: orgs/update-issue-field
path: /orgs/{org}/issue-fields/{issue_field_id}
method: PATCH
summary: Update issue field for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates an issue field for an organization.

  You can find out more about issue fields in [Managing issue fields in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/using-issues/managing-issue-fields-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/issue-field-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"description":"Update the name and description of an issue field","summary":"Update name and description","value":{"description":"Level of importance for the issue","name":"Priority"}},"update-name-only":{"description":"Update only the name of an issue field","summary":"Update name only","value":{"name":"Updated Field Name"}},"update-single-select-options":{"description":"Update the options for a single select issue field","summary":"Update single select options","value":{"description":"Current status of the issue","name":"Status","options":[{"color":"gray","description":"Items waiting to be prioritized","name":"Backlog","priority":1},{"color":"blue","description":"Currently being worked on","name":"In Progress","priority":2},{"color":"green","description":"Completed work","name":"Done","priority":3}]}}},"schema":{"$ref":"#/components/schemas/organization-update-issue-field"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-field"}},"schema":{"$ref":"#/components/schemas/issue-field"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: orgs/list-issue-types
path: /orgs/{org}/issue-types
method: GET
summary: List issue types for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-type-items"}},"schema":{"items":{"$ref":"#/components/schemas/issue-type"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/create-issue-type
path: /orgs/{org}/issue-types
method: POST
summary: Create issue type for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Create a new issue type for an organization.

  You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"color":"green","description":"An issue type for a multi-week tracking of work","is_enabled":true,"name":"Epic"}}},"schema":{"$ref":"#/components/schemas/organization-create-issue-type"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-type"}},"schema":{"$ref":"#/components/schemas/issue-type"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: orgs/update-issue-type
path: /orgs/{org}/issue-types/{issue_type_id}
method: PUT
summary: Update issue type for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates an issue type for an organization.

  You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/issue-type-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"color":"green","description":"An issue type for a multi-week tracking of work","is_enabled":true,"name":"Epic"}}},"schema":{"$ref":"#/components/schemas/organization-update-issue-type"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-type"}},"schema":{"$ref":"#/components/schemas/issue-type"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: orgs/delete-issue-type
path: /orgs/{org}/issue-types/{issue_type_id}
method: DELETE
summary: Delete issue type for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an issue type for an organization.

  You can find out more about issue types in [Managing issue types in an organization](https://docs.github.com/issues/tracking-your-work-with-issues/configuring-issues/managing-issue-types-in-an-organization).

  To use this endpoint, the authenticated user must be an administrator for the organization. OAuth app tokens and
  personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/issue-type-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: issues/list-for-org
path: /orgs/{org}/issues
method: GET
summary: List organization issues assigned to the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  List issues in an organization assigned to the authenticated user.

  > [!NOTE]
  > GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull request id, use the "[List pull requests](https://docs.github.com/rest/pulls/pulls#list-pull-requests)" endpoint.

  This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  - **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.
  - **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
  - **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.
  - **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation.","in":"query","name":"filter","schema":{"default":"assigned","enum":["assigned","created","mentioned","subscribed","repos","all"],"type":"string"},"style":"form"},{"description":"Indicates the state of the issues to return.","in":"query","name":"state","schema":{"default":"open","enum":["open","closed","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/labels"},{"description":"Can be the name of an issue type.","in":"query","name":"type","schema":{"type":"string"},"style":"form"},{"description":"What to sort results by.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","comments"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/issue-with-repo-items"}},"schema":{"items":{"$ref":"#/components/schemas/issue"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-members
path: /orgs/{org}/members
method: GET
summary: List organization members
auth_scheme_ref: GitHubBearerToken
description:
  List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only members with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned. These options are only available for organization owners.","in":"query","name":"filter","schema":{"default":"all","enum":["2fa_disabled","2fa_insecure","all"],"type":"string"},"style":"form"},{"description":"Filter members returned by their role.","in":"query","name":"role","schema":{"default":"all","enum":["all","admin","member"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/check-membership-for-user
path: /orgs/{org}/members/{username}
method: GET
summary: Check organization membership for a user
description: Check if a user is, publicly or privately, a member of the organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"204":{"description":"Response if requester is an organization member and user is a member"},"302":{"description":"Response if requester is not an organization member","headers":{"Location":{"example":"https://api.github.com/orgs/github/public_members/pezra","schema":{"type":"string"},"style":"simple"}}},"404":{"description":"Not Found if requester is an organization member and user is not a member"}}


operation_id: orgs/remove-member
path: /orgs/{org}/members/{username}
method: DELETE
summary: Remove an organization member
auth_scheme_ref: GitHubBearerToken
description:
  Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.

  > [!NOTE]
  > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team.

input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"451":{"$ref":"#/components/responses/validation_failed"}}


operation_id: codespaces/get-codespaces-for-user-in-org
path: /orgs/{org}/members/{username}/codespaces
method: GET
summary: List codespaces for a user in organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists the codespaces that a member of an organization has for repositories in that organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespaces-list"}},"schema":{"properties":{"codespaces":{"items":{"$ref":"#/components/schemas/codespace"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","codespaces"],"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/delete-from-organization
path: /orgs/{org}/members/{username}/codespaces/{codespace_name}
method: DELETE
summary: Delete a codespace from the organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a user's codespace.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"},{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/stop-in-organization
path: /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop
method: POST
summary: Stop a codespace for an organization user
auth_scheme_ref: GitHubBearerToken
description:
  Stops a user's codespace.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"},{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace"}},"schema":{"$ref":"#/components/schemas/codespace"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: copilot/get-copilot-seat-details-for-user
path: /orgs/{org}/members/{username}/copilot
method: GET
summary: Get Copilot seat assignment details for a user
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.

  The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.
  For more information about activity data, see [Metrics data properties for GitHub Copilot](https://docs.github.com/copilot/reference/metrics-data).

  Only organization owners can view Copilot seat assignment details for members of their organization.

  OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/copilot-seat-detail-active"}},"schema":{"$ref":"#/components/schemas/copilot-seat-details"}}},"description":"The user's GitHub Copilot seat details, including usage."},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Copilot Business or Enterprise is not enabled for this organization or the user has a pending organization invitation."},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/get-membership-for-user
path: /orgs/{org}/memberships/{username}
method: GET
summary: Get organization membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status.

input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-user-has-an-active-admin-membership-with-organization":{"$ref":"#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization"}},"schema":{"$ref":"#/components/schemas/org-membership"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/set-membership-for-user
path: /orgs/{org}/memberships/{username}
method: PUT
summary: Set organization membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  Only authenticated organization owners can add a member to the organization or update the member's role.

  *   If the authenticated user is _adding_ a member to the organization, the invited user will receive an email inviting them to the organization. The user's [membership status](https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user) will be `pending` until they accept the invitation.
      
  *   Authenticated users can _update_ a user's membership by passing the `role` parameter. If the authenticated user changes a member's role to `admin`, the affected user will receive an email notifying them that they've been made an organization owner. If the authenticated user changes an owner's role to `member`, no email will be sent.

  **Rate limits**

  To prevent abuse, organization owners are limited to creating 50 organization invitations for an organization within a 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Set an organization membership role for a user","value":{"role":"member"}}},"schema":{"properties":{"role":{"default":"member","description":"The role to give the user in the organization. Can be one of:  \n * `admin` - The user will become an owner of the organization.  \n * `member` - The user will become a non-owner member of the organization.","enum":["admin","member"],"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-user-already-had-membership-with-organization":{"$ref":"#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization"}},"schema":{"$ref":"#/components/schemas/org-membership"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"},"451":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/remove-membership-for-user
path: /orgs/{org}/memberships/{username}
method: DELETE
summary: Remove organization membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  In order to remove a user's membership with an organization, the authenticated user must be an organization owner.

  If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.

  > [!NOTE]
  > If a user has both direct membership in the organization as well as indirect membership via an enterprise team, only their direct membership will be removed. Their indirect membership via an enterprise team remains until the user is removed from the enterprise team.

input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
[cell repeats an earlier one in this file: 134 characters]


operation_id: migrations/list-for-org
path: /orgs/{org}/migrations
method: GET
summary: List organization migrations
auth_scheme_ref: GitHubBearerToken
description:
  Lists the most recent migrations, including both exports (which can be started through the REST API) and imports (which cannot be started using the REST API).

  A list of `repositories` is only returned for export migrations.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"Exclude attributes from the API response to improve performance","in":"query","name":"exclude","schema":{"items":{"description":"Allowed values that can be passed to the exclude param.","enum":["repositories"],"example":"repositories","type":"string"},"type":"array"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/migration-with-short-org-items"}},"schema":{"items":{"$ref":"#/components/schemas/migration"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: migrations/start-for-org
path: /orgs/{org}/migrations
method: POST
summary: Start an organization migration
description: Initiates the generation of a migration archive.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"lock_repositories":true,"repositories":["github/Hello-World"]}}},"schema":{"properties":{"exclude":{"description":"Exclude related items from being returned in the response in order to improve performance of the request.","items":{"enum":["repositories"],"type":"string"},"type":"array"},"exclude_attachments":{"default":false,"description":"Indicates whether attachments should be excluded from the migration (to reduce migration archive file size).","example":true,"type":"boolean"},"exclude_git_data":{"default":false,"description":"Indicates whether the repository git data should be excluded from the migration.","type":"boolean"},"exclude_metadata":{"default":false,"description":"Indicates whether metadata should be excluded and only git source should be included for the migration.","type":"boolean"},"exclude_owner_projects":{"default":false,"description":"Indicates whether projects owned by the organization or users should be excluded. from the migration.","example":true,"type":"boolean"},"exclude_releases":{"default":false,"description":"Indicates whether releases should be excluded from the migration (to reduce migration archive file size).","example":true,"type":"boolean"},"lock_repositories":{"default":false,"description":"Indicates whether repositories should be locked (to prevent manipulation) while migrating data.","example":true,"type":"boolean"},"org_metadata_only":{"default":false,"description":"Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).","example":true,"type":"boolean"},"repositories":{"description":"A list of arrays indicating which repositories should be migrated.","items":{"type":"string"},"type":"array"}},"required":["repositories"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/migration-with-short-org-2"}},"schema":{"$ref":"#/components/schemas/migration"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: migrations/get-status-for-org
path: /orgs/{org}/migrations/{migration_id}
method: GET
summary: Get an organization migration status
auth_scheme_ref: GitHubBearerToken
description:
  Fetches the status of a migration.

  The `state` of a migration can be one of the following values:

  *   `pending`, which means the migration hasn't started yet.
  *   `exporting`, which means the migration is in progress.
  *   `exported`, which means the migration finished successfully.
  *   `failed`, which means the migration failed.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/migration-id"},{"description":"Exclude attributes from the API response to improve performance","in":"query","name":"exclude","schema":{"items":{"description":"Allowed values that can be passed to the exclude param.","enum":["repositories"],"example":"repositories","type":"string"},"type":"array"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/migration-with-short-org"}},"schema":{"$ref":"#/components/schemas/migration"}}},"description":"*   `pending`, which means the migration hasn't started yet.\n*   `exporting`, which means the migration is in progress.\n*   `exported`, which means the migration finished successfully.\n*   `failed`, which means the migration failed."},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: migrations/download-archive-for-org
path: /orgs/{org}/migrations/{migration_id}/archive
method: GET
summary: Download an organization migration archive
description: Fetches the URL to a migration archive.
output_schema: {"302":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/migration-id"}],"requestBody":null}


operation_id: migrations/delete-archive-for-org
path: /orgs/{org}/migrations/{migration_id}/archive
method: DELETE
summary: Delete an organization migration archive
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a previous migration archive. Migration archives are automatically deleted after seven days.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/migration-id"}],"requestBody":null}


operation_id: migrations/unlock-repo-for-org
path: /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock
method: DELETE
summary: Unlock an organization repository
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/repos/repos#delete-a-repository) when the migration is complete and you no longer need the source data.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/migration-id"},{"$ref":"#/components/parameters/repo-name"}],"requestBody":null}


operation_id: migrations/list-repos-for-org
path: /orgs/{org}/migrations/{migration_id}/repositories
method: GET
summary: List repositories in an organization migration
description: List all the repositories for this organization migration.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/migration-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-org-roles
path: /orgs/{org}/organization-roles
method: GET
summary: Get all organization roles for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the organization roles available in this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  To use this endpoint, the authenticated user must be one of:

  - An administrator for the organization.
  - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-role-list"}},"schema":{"properties":{"roles":{"description":"The list of organization roles available to the organization.","items":{"$ref":"#/components/schemas/organization-role"},"type":"array"},"total_count":{"description":"The total number of organization roles available to the organization.","type":"integer"}},"type":"object"}}},"description":"Response - list of organization roles"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/revoke-all-org-roles-team
path: /orgs/{org}/organization-roles/teams/{team_slug}
method: DELETE
summary: Remove all organization roles for a team
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes all assigned organization roles from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"}],"requestBody":null}


operation_id: orgs/assign-team-to-org-role
path: /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}
method: PUT
summary: Assign an organization role to a team
auth_scheme_ref: GitHubBearerToken
description:
  Assigns an organization role to a team in an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/role-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"description":"Response if the organization, team or role does not exist."},"422":{"description":"Response if the organization roles feature is not enabled for the organization, or validation failed."}}


operation_id: orgs/revoke-org-role-team
path: /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}
method: DELETE
summary: Remove an organization role from a team
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes an organization role from a team. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/role-id"}],"requestBody":null}


operation_id: orgs/revoke-all-org-roles-user
path: /orgs/{org}/organization-roles/users/{username}
method: DELETE
summary: Remove all organization roles for a user
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Revokes all assigned organization roles from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 118 characters]


operation_id: orgs/assign-user-to-org-role
path: /orgs/{org}/organization-roles/users/{username}/{role_id}
method: PUT
summary: Assign an organization role to a user
auth_scheme_ref: GitHubBearerToken
description:
  Assigns an organization role to a member of an organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"},{"$ref":"#/components/parameters/role-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"description":"Response if the organization, user or role does not exist."},"422":{"description":"Response if the organization roles feature is not enabled enabled for the organization, the validation failed, or the user is not an organization member."}}


operation_id: orgs/revoke-org-role-user
path: /orgs/{org}/organization-roles/users/{username}/{role_id}
method: DELETE
summary: Remove an organization role from a user
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Remove an organization role from a user. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  The authenticated user must be an administrator for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"},{"$ref":"#/components/parameters/role-id"}],"requestBody":null}


operation_id: orgs/get-org-role
path: /orgs/{org}/organization-roles/{role_id}
method: GET
summary: Get an organization role
auth_scheme_ref: GitHubBearerToken
description:
  Gets an organization role that is available to this organization. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  To use this endpoint, the authenticated user must be one of:

  - An administrator for the organization.
  - An organization member (or a member of a team) assigned a custom organization role that includes the **View organization roles** (`read_organization_custom_org_role`) permission. For more information, see "[Permissions for organization access](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/permissions-of-custom-organization-roles#permissions-for-organization-access)."

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/role-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-role"}},"schema":{"$ref":"#/components/schemas/organization-role"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/list-org-role-teams
path: /orgs/{org}/organization-roles/{role_id}/teams
method: GET
summary: List teams that are assigned to an organization role
auth_scheme_ref: GitHubBearerToken
description:
  Lists the teams that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  To use this endpoint, you must be an administrator for the organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/role-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"description":"List of teams assigned to the organization role","items":{"$ref":"#/components/schemas/team-role-assignment"},"type":"array"}}},"description":"Response - List of assigned teams","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"description":"Response if the organization or role does not exist."},"422":{"description":"Response if the organization roles feature is not enabled or validation failed."}}


operation_id: orgs/list-org-role-users
path: /orgs/{org}/organization-roles/{role_id}/users
method: GET
summary: List users that are assigned to an organization role
auth_scheme_ref: GitHubBearerToken
description:
  Lists organization members that are assigned to an organization role. For more information on organization roles, see "[Using organization roles](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/using-organization-roles)."

  To use this endpoint, you must be an administrator for the organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/role-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"description":"List of users assigned to the organization role","items":{"$ref":"#/components/schemas/user-role-assignment"},"type":"array"}}},"description":"Response - List of assigned users","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"description":"Response if the organization or role does not exist."},"422":{"description":"Response if the organization roles feature is not enabled or validation failed."}}


operation_id: orgs/list-outside-collaborators
path: /orgs/{org}/outside_collaborators
method: GET
summary: List outside collaborators for an organization
description: List all users who are outside collaborators of an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. `2fa_insecure` means that only outside collaborators with [insecure 2FA methods](https://docs.github.com/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization#requiring-secure-methods-of-two-factor-authentication-in-your-organization) will be returned.","in":"query","name":"filter","schema":{"default":"all","enum":["2fa_disabled","2fa_insecure","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: orgs/convert-member-to-outside-collaborator
path: /orgs/{org}/outside_collaborators/{username}
method: PUT
summary: Convert an organization member to outside collaborator
auth_scheme_ref: GitHubBearerToken
description:
  When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"202":{"summary":"Status code 202, asynchronous request","value":{"async":true}},"204":{"summary":"Status code 204, synchronous request"}},"schema":{"properties":{"async":{"default":false,"description":"When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"202":{}},"schema":{"additionalProperties":false,"type":"object"}}},"description":"User is getting converted asynchronously"},"204":{"description":"User was converted"},"403":{"description":"Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see \"[Enforcing repository management policies in your enterprise](https://docs.github.com/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories).\""},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/remove-outside-collaborator
path: /orgs/{org}/outside_collaborators/{username}
method: DELETE
summary: Remove outside collaborator from an organization
description: Removing a user from this list will remove them from all the organization's repositories.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"204":{"description":"Response"},"422":{"content":{"application/json":{"examples":{"response-if-user-is-a-member-of-the-organization":{"value":{"documentation_url":"https://docs.github.com/rest/orgs/outside-collaborators#remove-outside-collaborator-from-an-organization","message":"You cannot specify an organization member to remove as an outside collaborator."}}},"schema":{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"description":"Unprocessable Entity if user is a member of the organization"}}


operation_id: packages/list-packages-for-organization
path: /orgs/{org}/packages
method: GET
summary: List packages for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists packages in an organization readable by the user.

  OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"description":"The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.","in":"query","name":"package_type","required":true,"schema":{"enum":["npm","maven","rubygems","docker","nuget","container"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/package-visibility"},{"description":"The page number of the results to fetch. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"page","schema":{"default":1,"type":"integer"},"style":"form"},{"description":"The number of results per page (max 100). For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":30,"type":"integer"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/packages-for-org"}},"schema":{"items":{"$ref":"#/components/schemas/package"},"type":"array"}}},"description":"Response"},"400":{"$ref":"#/components/responses/package_es_list_error"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: packages/get-package-for-organization
path: /orgs/{org}/packages/{package_type}/{package_name}
method: GET
summary: Get a package for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package in an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/package-org"}},"schema":{"$ref":"#/components/schemas/package"}}},"description":"Response"}}


operation_id: packages/delete-package-for-org
path: /orgs/{org}/packages/{package_type}/{package_name}
method: DELETE
summary: Delete a package for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

  The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."

  OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: packages/restore-package-for-org
path: /orgs/{org}/packages/{package_type}/{package_name}/restore
method: POST
summary: Restore a package for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Restores an entire package in an organization.

  You can restore a deleted package under the following conditions:
    - The package was deleted within the last 30 days.
    - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.

  The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."

  OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"},{"description":"package token","in":"query","name":"token","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: packages/get-all-package-versions-for-package-owned-by-org
path: /orgs/{org}/packages/{package_type}/{package_name}/versions
method: GET
summary: List package versions for a package owned by an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists package versions for a package owned by an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"description":"The state of the package, either active or deleted.","in":"query","name":"state","schema":{"default":"active","enum":["active","deleted"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/package-versions-for-org"}},"schema":{"items":{"$ref":"#/components/schemas/package-version"},"type":"array"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: packages/get-package-version-for-organization
path: /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
method: GET
summary: Get a package version for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package version in an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:packages` scope to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/package-version-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/package-version-org"}},"schema":{"$ref":"#/components/schemas/package-version"}}},"description":"Response"}}


operation_id: packages/delete-package-version-for-org
path: /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}
method: DELETE
summary: Delete package version for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

  The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."

  OAuth app tokens and personal access tokens (classic) need the `read:packages` and `delete:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/package-version-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: packages/restore-package-version-for-org
path: /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
method: POST
summary: Restore package version for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Restores a specific package version in an organization.

  You can restore a deleted package under the following conditions:
    - The package was deleted within the last 30 days.
    - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first.

  The authenticated user must have admin permissions in the organization to use this endpoint. If the `package_type` belongs to a GitHub Packages registry that supports granular permissions, the authenticated user must also have admin permissions to the package. For the list of these registries, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#granular-permissions-for-userorganization-scoped-packages)."

  OAuth app tokens and personal access tokens (classic) need the `read:packages` and `write:packages` scopes to use this endpoint. For more information, see "[About permissions for GitHub Packages](https://docs.github.com/packages/learn-github-packages/about-permissions-for-github-packages#permissions-for-repository-scoped-packages)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/package-type"},{"$ref":"#/components/parameters/package-name"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/package-version-id"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 198 characters]


operation_id: orgs/list-pat-grant-requests
path: /orgs/{org}/personal-access-token-requests
method: GET
summary: List requests to access organization resources with fine-grained personal access tokens
auth_scheme_ref: GitHubBearerToken
description:
  Lists requests from organization members to access organization resources with a fine-grained personal access token.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/personal-access-token-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/personal-access-token-owner"},{"$ref":"#/components/parameters/personal-access-token-repository"},{"$ref":"#/components/parameters/personal-access-token-permission"},{"$ref":"#/components/parameters/personal-access-token-before"},{"$ref":"#/components/parameters/personal-access-token-after"},{"$ref":"#/components/parameters/personal-access-token-token-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-pat-grant-request-paginated"}},"schema":{"items":{"$ref":"#/components/schemas/organization-programmatic-access-grant-request"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/review-pat-grant-requests-in-bulk
path: /orgs/{org}/personal-access-token-requests
method: POST
summary: Review requests to access organization resources with fine-grained personal access tokens
auth_scheme_ref: GitHubBearerToken
description:
  Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example of denying a request","value":{"action":"deny","pat_request_ids":[42,73],"reason":"Access is too broad."}}},"schema":{"properties":{"action":{"description":"Action to apply to the requests.","enum":["approve","deny"],"type":"string"},"pat_request_ids":{"description":"Unique identifiers of the requests for access via fine-grained personal access token. Must be formed of between 1 and 100 `pat_request_id` values.","items":{"type":"integer"},"maxItems":100,"minItems":1,"type":"array"},"reason":{"description":"Reason for approving or denying the requests. Max 1024 characters.","maxLength":1024,"nullable":true,"type":"string"}},"required":["action"],"type":"object"}}},"required":true}}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/review-pat-grant-request
path: /orgs/{org}/personal-access-token-requests/{pat_request_id}
method: POST
summary: Review a request to access organization resources with a fine-grained personal access token
auth_scheme_ref: GitHubBearerToken
description:
  Approves or denies a pending request to access organization resources via a fine-grained personal access token.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Unique identifier of the request for access via fine-grained personal access token.","in":"path","name":"pat_request_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example of denying a request","value":{"action":"deny","reason":"This request is denied because the access is too broad."}}},"schema":{"properties":{"action":{"description":"Action to apply to the request.","enum":["approve","deny"],"type":"string"},"reason":{"description":"Reason for approving or denying the request. Max 1024 characters.","maxLength":1024,"nullable":true,"type":"string"}},"required":["action"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/list-pat-grant-request-repositories
path: /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories
method: GET
summary: List repositories requested to be accessed by a fine-grained personal access token
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repositories a fine-grained personal access token request is requesting access to.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Unique identifier of the request for access via fine-grained personal access token.","in":"path","name":"pat_request_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/list-pat-grants
path: /orgs/{org}/personal-access-tokens
method: GET
summary: List fine-grained personal access tokens with access to organization resources
auth_scheme_ref: GitHubBearerToken
description:
  Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/personal-access-token-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/personal-access-token-owner"},{"$ref":"#/components/parameters/personal-access-token-repository"},{"$ref":"#/components/parameters/personal-access-token-permission"},{"$ref":"#/components/parameters/personal-access-token-before"},{"$ref":"#/components/parameters/personal-access-token-after"},{"$ref":"#/components/parameters/personal-access-token-token-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-pat-grant-paginated"}},"schema":{"items":{"$ref":"#/components/schemas/organization-programmatic-access-grant"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/update-pat-accesses
path: /orgs/{org}/personal-access-tokens
method: POST
summary: Update the access to organization resources via fine-grained personal access tokens
auth_scheme_ref: GitHubBearerToken
description:
  Updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example of revoking a fine-grained personal access token.","value":{"action":"revoke","pat_ids":[1296269,1296280]}}},"schema":{"properties":{"action":{"description":"Action to apply to the fine-grained personal access token.","enum":["revoke"],"type":"string"},"pat_ids":{"description":"The IDs of the fine-grained personal access tokens.","items":{"description":"Unique identifier of the fine-grained personal access token.","type":"integer"},"maxItems":100,"minItems":1,"type":"array"}},"required":["action","pat_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/update-pat-access
path: /orgs/{org}/personal-access-tokens/{pat_id}
method: POST
summary: Update the access a fine-grained personal access token has to organization resources
auth_scheme_ref: GitHubBearerToken
description:
  Updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/fine-grained-personal-access-token-id"}],"requestBody":{"content":{"application/json":{"examples":{"204":{"summary":"Example of revoking a fine-grained personal access token.","value":{"action":"revoke"}}},"schema":{"properties":{"action":{"description":"Action to apply to the fine-grained personal access token.","enum":["revoke"],"type":"string"}},"required":["action"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/list-pat-grant-repositories
path: /orgs/{org}/personal-access-tokens/{pat_id}/repositories
method: GET
summary: List repositories a fine-grained personal access token has access to
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repositories a fine-grained personal access token has access to.

  Only GitHub Apps can use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Unique identifier of the fine-grained personal access token.","in":"path","name":"pat_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: private-registries/list-org-private-registries
path: /orgs/{org}/private-registries
method: GET
summary: List private registries for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all private registry configurations available at the organization-level without revealing their encrypted
  values.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-private-registry-configurations-paginated"}},"schema":{"properties":{"configurations":{"items":{"$ref":"#/components/schemas/org-private-registry-configuration"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","configurations"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: private-registries/create-org-private-registry
path: /orgs/{org}/private-registries
method: POST
summary: Create a private registry for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
  For OIDC-based registries (`oidc_azure`, `oidc_aws`, `oidc_jfrog`, `oidc_cloudsmith`, or `oidc_gcp`), the `encrypted_value` and `key_id` fields should be omitted.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"org-private-registry-with-oidc-azure":{"summary":"Example of an OIDC private registry configuration using Azure","value":{"auth_type":"oidc_azure","client_id":"abcdef01-2345-6789-abcd-ef0123456789","registry_type":"docker_registry","tenant_id":"12345678-1234-1234-1234-123456789012","url":"https://myregistry.azurecr.io","visibility":"all"}},"org-private-registry-with-oidc-cloudsmith":{"summary":"Example of an OIDC private registry configuration using Cloudsmith","value":{"audience":"https://github.com/my-org","auth_type":"oidc_cloudsmith","namespace":"my-org","registry_type":"npm_registry","service_slug":"my-service-account","url":"https://npm.cloudsmith.io/my-org/my-repo/","visibility":"all"}},"org-private-registry-with-oidc-gcp":{"summary":"Example of an OIDC private registry configuration using Google Cloud Artifact Registry","value":{"auth_type":"oidc_gcp","registry_type":"docker_registry","service_account":"dependabot@my-project.iam.gserviceaccount.com","url":"https://us-docker.pkg.dev/my-project/my-repo","visibility":"all","workload_identity_provider":"projects/123456789/locations/global/workloadIdentityPools/github-pool/providers/github-provider"}},"org-private-registry-with-private-visibility":{"summary":"Example of a private registry configuration with private visibility","value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","registry_type":"maven_repository","replaces_base":true,"url":"https://maven.pkg.github.com/organization/","username":"monalisa","visibility":"private"}},"org-private-registry-with-selected-visibility":{"summary":"Example of a private registry configuration with selected visibility","value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","registry_type":"maven_repository","selected_repository_ids":[1296269,1296280],"url":"https://maven.pkg.github.com/organization/","username":"monalisa","visibility":"selected"}}},"schema":{"properties":{"account_id":{"description":"The AWS account ID. Required when `auth_type` is `oidc_aws`.","type":"string"},"api_host":{"description":"The Cloudsmith API host. Optional for `oidc_cloudsmith` auth type. If omitted, `api.cloudsmith.io` is used by default.","type":"string"},"audience":{"description":"The OIDC audience. Optional for `oidc_aws`, `oidc_jfrog`, and `oidc_gcp`, and required for `oidc_cloudsmith` auth types.","type":"string"},"auth_type":{"description":"The authentication type for the private registry. Defaults to `token` if not specified. Use `oidc_azure`, `oidc_aws`, `oidc_jfrog`, `oidc_cloudsmith`, or `oidc_gcp` for OIDC authentication.","enum":["token","username_password","oidc_azure","oidc_aws","oidc_jfrog","oidc_cloudsmith","oidc_gcp"],"type":"string"},"aws_region":{"description":"The AWS region. Required when `auth_type` is `oidc_aws`.","type":"string"},"client_id":{"description":"The client ID of the Azure AD application. Required when `auth_type` is `oidc_azure`.","type":"string"},"domain":{"description":"The CodeArtifact domain. Required when `auth_type` is `oidc_aws`.","type":"string"},"domain_owner":{"description":"The CodeArtifact domain owner (AWS account ID). Required when `auth_type` is `oidc_aws`.","type":"string"},"encrypted_value":{"description":"The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get private registries public key for an organization](https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization) endpoint. Required when `auth_type` is `token` or `username_password`. Should be omitted for OIDC auth types.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"identity_mapping_name":{"description":"The JFrog identity mapping name. Optional for `oidc_jfrog` auth type.","type":"string"},"jfrog_oidc_provider_name":{"description":"The JFrog OIDC provider name. Required when `auth_type` is `oidc_jfrog`.","type":"string"},"key_id":{"description":"The ID of the key you used to encrypt the secret. Required when `auth_type` is `token` or `username_password`. Should be omitted for OIDC auth types.","type":"string"},"namespace":{"description":"The Cloudsmith organization namespace. Required when `auth_type` is `oidc_cloudsmith`.","type":"string"},"registry_type":{"description":"The registry type.","enum":["maven_repository","nuget_feed","goproxy_server","npm_registry","rubygems_server","cargo_registry","composer_repository","docker_registry","git_source","helm_registry","hex_organization","hex_repository","pub_repository","python_index","terraform_registry"],"type":"string"},"replaces_base":{"default":false,"description":"Whether this private registry should replace the base registry (e.g., npmjs.org for npm, rubygems.org for rubygems). When set to `true`, Dependabot will only use this registry and will not fall back to the public registry. When set to `false` (default), Dependabot will use this registry for scoped packages but may fall back to the public registry for other packages.","type":"boolean"},"role_name":{"description":"The AWS IAM role name. Required when `auth_type` is `oidc_aws`.","type":"string"},"selected_repository_ids":{"description":"An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when `visibility` is set to `selected`. You can manage the list of selected repositories using the [Update a private registry for an organization](https://docs.github.com/rest/private-registries/organization-configurations#update-a-private-registry-for-an-organization) endpoint. This field should be omitted if `visibility` is set to `all` or `private`.","items":{"type":"integer"},"type":"array"},"service_account":{"description":"The GCP service account email to impersonate. Optional for `oidc_gcp` auth type. If omitted, the federated token is used directly (direct WIF).","type":"string"},"service_slug":{"description":"The Cloudsmith service account slug. Required when `auth_type` is `oidc_cloudsmith`.","type":"string"},"tenant_id":{"description":"The tenant ID of the Azure AD application. Required when `auth_type` is `oidc_azure`.","type":"string"},"url":{"description":"The URL of the private registry.","format":"uri","type":"string"},"username":{"description":"The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication.","nullable":true,"type":"string"},"visibility":{"description":"Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry.","enum":["all","private","selected"],"type":"string"},"workload_identity_provider":{"description":"The full resource name of the GCP Workload Identity Provider (e.g. `projects/<NUM>/locations/global/workloadIdentityPools/<POOL>/providers/<PROVIDER>`). Required when `auth_type` is `oidc_gcp`.","type":"string"}},"required":["registry_type","url","visibility"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"org-private-registry-with-private-visibility":{"$ref":"#/components/examples/org-private-registry-configuration-with-selected-repositories"},"org-private-registry-with-selected-visibility":{"$ref":"#/components/examples/org-private-registry-configuration"}},"schema":{"$ref":"#/components/schemas/org-private-registry-configuration-with-selected-repositories"}}},"description":"The organization private registry configuration"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: private-registries/get-org-public-key
path: /orgs/{org}/private-registries/public-key
method: GET
summary: Get private registries public key for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the org public key, which is needed to encrypt private registry secrets. You need to encrypt a secret before you can create or update secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/private-registries-public-key"}},"schema":{"properties":{"key":{"description":"The Base64 encoded public key.","example":"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234","type":"string"},"key_id":{"description":"The identifier for the key.","example":"012345678912345678","type":"string"}},"required":["key_id","key"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: private-registries/get-org-private-registry
path: /orgs/{org}/private-registries/{secret_name}
method: GET
summary: Get a private registry for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Get the configuration of a single private registry defined for an organization, omitting its encrypted value.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-private-registry-configuration"}},"schema":{"$ref":"#/components/schemas/org-private-registry-configuration"}}},"description":"The specified private registry configuration for the organization"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: private-registries/delete-org-private-registry
path: /orgs/{org}/private-registries/{secret_name}
method: DELETE
summary: Delete a private registry for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Delete a private registry configuration at the organization-level.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 121 characters]

output_schema:
  {"204":{"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: private-registries/update-org-private-registry
path: /orgs/{org}/private-registries/{secret_name}
method: PATCH
summary: Update a private registry for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates a private registry configuration with an encrypted value for an organization. Encrypt your secret using [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). For more information, see "[Encrypting secrets for the REST API](https://docs.github.com/rest/guides/encrypting-secrets-for-the-rest-api)."
  For OIDC-based registries (`oidc_azure`, `oidc_aws`, `oidc_jfrog`, `oidc_cloudsmith`, or `oidc_gcp`), the `encrypted_value` and `key_id` fields should be omitted.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":{"content":{"application/json":{"examples":{"oidc-azure-update":{"summary":"Update an OIDC private registry (Azure)","value":{"selected_repository_ids":[1296269,1296280],"tenant_id":"12345678-1234-1234-1234-123456789012","visibility":"selected"}},"secret-based-update":{"summary":"Update a secret-based private registry","value":{"encrypted_value":"c2VjcmV0","key_id":"012345678912345678","username":"monalisa"}}},"schema":{"properties":{"account_id":{"description":"The AWS account ID. Required when `auth_type` is `oidc_aws`.","type":"string"},"api_host":{"description":"The Cloudsmith API host. Optional for `oidc_cloudsmith` auth type. If omitted, `api.cloudsmith.io` is used by default.","type":"string"},"audience":{"description":"The OIDC audience. Optional for `oidc_aws`, `oidc_jfrog`, and `oidc_gcp`, and required for `oidc_cloudsmith` auth types.","type":"string"},"auth_type":{"description":"The authentication type for the private registry. This field cannot be changed after creation. If provided, it must match the existing `auth_type` of the configuration. To change the authentication type, delete and recreate the configuration.","enum":["token","username_password","oidc_azure","oidc_aws","oidc_jfrog","oidc_cloudsmith","oidc_gcp"],"type":"string"},"aws_region":{"description":"The AWS region. Required when `auth_type` is `oidc_aws`.","type":"string"},"client_id":{"description":"The client ID of the Azure AD application. Required when `auth_type` is `oidc_azure`.","type":"string"},"domain":{"description":"The CodeArtifact domain. Required when `auth_type` is `oidc_aws`.","type":"string"},"domain_owner":{"description":"The CodeArtifact domain owner (AWS account ID). Required when `auth_type` is `oidc_aws`.","type":"string"},"encrypted_value":{"description":"The value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get private registries public key for an organization](https://docs.github.com/rest/private-registries/organization-configurations#get-private-registries-public-key-for-an-organization) endpoint.","pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$","type":"string"},"identity_mapping_name":{"description":"The JFrog identity mapping name. Optional for `oidc_jfrog` auth type.","type":"string"},"jfrog_oidc_provider_name":{"description":"The JFrog OIDC provider name. Required when `auth_type` is `oidc_jfrog`.","type":"string"},"key_id":{"description":"The ID of the key you used to encrypt the secret.","type":"string"},"namespace":{"description":"The Cloudsmith organization namespace. Required when `auth_type` is `oidc_cloudsmith`.","type":"string"},"registry_type":{"description":"The registry type.","enum":["maven_repository","nuget_feed","goproxy_server","npm_registry","rubygems_server","cargo_registry","composer_repository","docker_registry","git_source","helm_registry","hex_organization","hex_repository","pub_repository","python_index","terraform_registry"],"type":"string"},"replaces_base":{"default":false,"description":"Whether this private registry should replace the base registry (e.g., npmjs.org for npm, rubygems.org for rubygems). When set to `true`, Dependabot will only use this registry and will not fall back to the public registry. When set to `false` (default), Dependabot will use this registry for scoped packages but may fall back to the public registry for other packages.","type":"boolean"},"role_name":{"description":"The AWS IAM role name. Required when `auth_type` is `oidc_aws`.","type":"string"},"selected_repository_ids":{"description":"An array of repository IDs that can access the organization private registry. You can only provide a list of repository IDs when `visibility` is set to `selected`. This field should be omitted if `visibility` is set to `all` or `private`.","items":{"type":"integer"},"type":"array"},"service_account":{"description":"The GCP service account email to impersonate. Optional for `oidc_gcp` auth type. If omitted, the federated token is used directly (direct WIF).","type":"string"},"service_slug":{"description":"The Cloudsmith service account slug. Required when `auth_type` is `oidc_cloudsmith`.","type":"string"},"tenant_id":{"description":"The tenant ID of the Azure AD application. Required when `auth_type` is `oidc_azure`.","type":"string"},"url":{"description":"The URL of the private registry.","format":"uri","type":"string"},"username":{"description":"The username to use when authenticating with the private registry. This field should be omitted if the private registry does not require a username for authentication.","nullable":true,"type":"string"},"visibility":{"description":"Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry.","enum":["all","private","selected"],"type":"string"},"workload_identity_provider":{"description":"The full resource name of the GCP Workload Identity Provider (e.g. `projects/<NUM>/locations/global/workloadIdentityPools/<POOL>/providers/<PROVIDER>`). Required when `auth_type` is `oidc_gcp`.","type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: projects/list-for-org
path: /orgs/{org}/projectsV2
method: GET
summary: List projects for organization
description: List all projects owned by a specific organization accessible by the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Limit results to projects of the specified type.","in":"query","name":"q","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2"}},"schema":{"items":{"$ref":"#/components/schemas/projects-v2"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/get-for-org
path: /orgs/{org}/projectsV2/{project_number}
method: GET
summary: Get project for organization
description: Get a specific organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2"}},"schema":{"$ref":"#/components/schemas/projects-v2"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/create-draft-item-for-org
path: /orgs/{org}/projectsV2/{project_number}/drafts
method: POST
summary: Create draft item for organization owned project
description: Create draft issue item for the specified organization owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/project-number"}],"requestBody":{"content":{"application/json":{"examples":{"body":{"summary":"Example with Sample Draft Issue Title and Body","value":{"body":"This is the body content of the draft issue.","title":"Sample Draft Issue Title"}},"title":{"summary":"Example with Sample Draft Issue Title","value":{"title":"Sample Draft Issue Title"}}},"schema":{"properties":{"body":{"description":"The body content of the draft issue item to create in the project.","type":"string"},"title":{"description":"The title of the draft issue item to create in the project.","type":"string"}},"required":["title"],"type":"object"}}},"description":"Details of the draft item to create in the project.","required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"draft_issue":{"$ref":"#/components/examples/projects-v2-item-simple"}},"schema":{"$ref":"#/components/schemas/projects-v2-item-simple"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/list-fields-for-org
path: /orgs/{org}/projectsV2/{project_number}/fields
method: GET
summary: List project fields for organization
description: List all fields for a specific organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2-field-items"}},"schema":{"items":{"$ref":"#/components/schemas/projects-v2-field"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/add-field-for-org
path: /orgs/{org}/projectsV2/{project_number}/fields
method: POST
summary: Add a field to an organization-owned project.
description: Add a field to an organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"date_field":{"summary":"Create a date field","value":{"data_type":"date","name":"Due date"}},"iteration_field":{"$ref":"#/components/examples/projects-v2-field-iteration-request"},"number_field":{"summary":"Create a number field","value":{"data_type":"number","name":"Story points"}},"single_select_field":{"$ref":"#/components/examples/projects-v2-field-single-select-request"},"text_field":{"summary":"Create a text field","value":{"data_type":"text","name":"Team notes"}}},"schema":{"oneOf":[{"additionalProperties":false,"properties":{"issue_field_id":{"description":"The ID of the IssueField to create the field for.","type":"integer"}},"required":["issue_field_id"],"type":"object"},{"additionalProperties":false,"properties":{"data_type":{"description":"The field's data type.","enum":["text","number","date"],"type":"string"},"name":{"description":"The name of the field.","type":"string"}},"required":["name","data_type"],"type":"object"},{"additionalProperties":false,"properties":{"data_type":{"description":"The field's data type.","enum":["single_select"],"type":"string"},"name":{"description":"The name of the field.","type":"string"},"single_select_options":{"description":"The options available for single select fields. At least one option must be provided when creating a single select field.","items":{"$ref":"#/components/schemas/projects-v2-field-single-select-option"},"type":"array"}},"required":["name","data_type","single_select_options"],"type":"object"},{"additionalProperties":false,"properties":{"data_type":{"description":"The field's data type.","enum":["iteration"],"type":"string"},"iteration_configuration":{"$ref":"#/components/schemas/projects-v2-field-iteration-configuration"},"name":{"description":"The name of the field.","type":"string"}},"required":["name","data_type","iteration_configuration"],"type":"object"}]}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"date_field":{"$ref":"#/components/examples/projects-v2-field-date"},"iteration_field":{"$ref":"#/components/examples/projects-v2-field-iteration"},"number_field":{"$ref":"#/components/examples/projects-v2-field-number"},"single_select_field":{"$ref":"#/components/examples/projects-v2-field-single-select"},"text_field":{"$ref":"#/components/examples/projects-v2-field-text"}},"schema":{"$ref":"#/components/schemas/projects-v2-field"}}},"description":"Response for adding a field to an organization-owned project."},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: projects/get-field-for-org
path: /orgs/{org}/projectsV2/{project_number}/fields/{field_id}
method: GET
summary: Get project field for organization
description: Get a specific field for an organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/field-id"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2-field"}},"schema":{"$ref":"#/components/schemas/projects-v2-field"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/list-items-for-org
path: /orgs/{org}/projectsV2/{project_number}/items
method: GET
summary: List items for an organization owned project
description: List all items for a specific organization-owned project accessible by the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"description":"Search query to filter items, see [Filtering projects](https://docs.github.com/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects) for more information.","in":"query","name":"q","schema":{"type":"string"},"style":"form"},{"description":"Limit results to specific fields, by their IDs. If not specified, the title field will be returned.\n\nExample: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789`","in":"query","name":"fields","schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"type":"array"}]},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2-item-with-content"}},"schema":{"items":{"$ref":"#/components/schemas/projects-v2-item-with-content"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/add-item-for-org
path: /orgs/{org}/projectsV2/{project_number}/items
method: POST
summary: Add item to organization owned project
description: Add an issue or pull request item to the specified organization owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/project-number"}],"requestBody":{"content":{"application/json":{"examples":{"issue_with_id":{"summary":"Add an issue using its unique ID","value":{"id":3,"type":"Issue"}},"issue_with_nwo":{"summary":"Add an issue using repository owner, name, and issue number","value":{"number":42,"owner":"octocat","repo":"hello-world","type":"Issue"}},"pull_request_with_id":{"summary":"Add a pull request using its unique ID","value":{"id":3,"type":"PullRequest"}},"pull_request_with_nwo":{"summary":"Add a pull request using repository owner, name, and PR number","value":{"number":123,"owner":"octocat","repo":"hello-world","type":"PullRequest"}}},"schema":{"additionalProperties":false,"oneOf":[{"required":["id"]},{"required":["owner","repo","number"]}],"properties":{"id":{"description":"The unique identifier of the issue or pull request to add to the project.","type":"integer"},"number":{"description":"The issue or pull request number.","type":"integer"},"owner":{"description":"The repository owner login.","type":"string"},"repo":{"description":"The repository name.","type":"string"},"type":{"description":"The type of item to add to the project. Must be either Issue or PullRequest.","enum":["Issue","PullRequest"],"type":"string"}},"required":["type"],"type":"object"}}},"description":"Details of the item to add to the project. You can specify either the unique ID or the repository owner, name, and issue/PR number.","required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"issue_with_id":{"summary":"Response for adding an issue using its unique ID","value":{"$ref":"#/components/examples/projects-v2-item-simple"}},"issue_with_nwo":{"summary":"Response for adding an issue using repository owner, name, and issue number","value":{"$ref":"#/components/examples/projects-v2-item-simple"}},"pull_request_with_id":{"summary":"Response for adding a pull request using its unique ID","value":{"$ref":"#/components/examples/projects-v2-item-simple"}},"pull_request_with_nwo":{"summary":"Response for adding a pull request using repository owner, name, and PR number","value":{"$ref":"#/components/examples/projects-v2-item-simple"}}},"schema":{"$ref":"#/components/schemas/projects-v2-item-simple"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/get-org-item
path: /orgs/{org}/projectsV2/{project_number}/items/{item_id}
method: GET
summary: Get an item for an organization owned project
description: Get a specific item from an organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/item-id"},{"description":"Limit results to specific fields, by their IDs. If not specified, the title field will be returned.\n\nExample: fields[]=123&fields[]=456&fields[]=789 or fields=123,456,789","in":"query","name":"fields","schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"type":"array"}]},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2-item-with-content"}},"schema":{"$ref":"#/components/schemas/projects-v2-item-with-content"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/delete-item-for-org
path: /orgs/{org}/projectsV2/{project_number}/items/{item_id}
method: DELETE
summary: Delete project item for organization
description: Delete a specific item from an organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/item-id"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: projects/update-item-for-org
path: /orgs/{org}/projectsV2/{project_number}/items/{item_id}
method: PATCH
summary: Update project item for organization
description: Update a specific item in an organization-owned project.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/item-id"}],"requestBody":{"content":{"application/json":{"examples":{"date_field":{"summary":"Update a date field","value":{"fields":[{"id":789,"value":"2023-10-05"}]}},"iteration_field":{"summary":"Update an iteration field","value":{"fields":[{"id":1011,"value":"866ee5b8"}]}},"number_field":{"summary":"Update a number field","value":{"fields":[{"id":456,"value":42.5}]}},"single_select_field":{"summary":"Update a single select field","value":{"fields":[{"id":789,"value":"47fc9ee4"}]}},"text_field":{"summary":"Update a text field","value":{"fields":[{"id":123,"value":"Updated text value"}]}}},"schema":{"properties":{"fields":{"description":"A list of field updates to apply.","items":{"properties":{"id":{"description":"The ID of the project field to update.","type":"integer"},"value":{"description":"The new value for the field:\n- For text, number, and date fields, provide the new value directly.\n- For single select and iteration fields, provide the ID of the option or iteration.\n- To clear the field, set this to null.","nullable":true,"oneOf":[{"type":"string"},{"type":"number"}]}},"required":["id","value"],"type":"object"},"type":"array"}},"required":["fields"],"type":"object"}}},"description":"Field updates to apply to the project item. Only text, number, date, single select, and iteration fields are supported.","required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"date_field":{"$ref":"#/components/examples/projects-v2-item-with-content"},"iteration_field":{"$ref":"#/components/examples/projects-v2-item-with-content"},"number_field":{"$ref":"#/components/examples/projects-v2-item-with-content"},"single_select_field":{"$ref":"#/components/examples/projects-v2-item-with-content"},"text_field":{"$ref":"#/components/examples/projects-v2-item-with-content"}},"schema":{"$ref":"#/components/schemas/projects-v2-item-with-content"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: projects/create-view-for-org
path: /orgs/{org}/projectsV2/{project_number}/views
method: POST
summary: Create a view for an organization-owned project
auth_scheme_ref: GitHubBearerToken
description:
  Create a new view in an organization-owned project. Views allow you to customize how items in a project are displayed and filtered.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/project-number"}],"requestBody":{"content":{"application/json":{"examples":{"board_view":{"summary":"Create a board view with filter","value":{"filter":"is:issue is:open label:sprint","layout":"board","name":"Sprint Board","visible_fields":[123,456,789]}},"roadmap_view":{"summary":"Create a roadmap view","value":{"layout":"roadmap","name":"Product Roadmap"}},"table_view":{"summary":"Create a table view","value":{"filter":"is:issue","layout":"table","name":"All Issues","visible_fields":[123,456,789]}}},"schema":{"additionalProperties":false,"properties":{"filter":{"description":"The filter query for the view. See [Filtering projects](https://docs.github.com/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/filtering-projects) for more information.","example":"is:issue is:open","type":"string"},"layout":{"description":"The layout of the view.","enum":["table","board","roadmap"],"example":"board","type":"string"},"name":{"description":"The name of the view.","example":"Sprint Board","type":"string"},"visible_fields":{"description":"`visible_fields` is not applicable to `roadmap` layout views.\nFor `table` and `board` layouts, this represents the field IDs that should be visible in the view. If not provided, the default visible fields will be used.","example":[123,456,789],"items":{"type":"integer"},"type":"array"}},"required":["name","layout"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"board_view":{"summary":"Response for creating a board view with filter","value":{"$ref":"#/components/examples/projects-v2-view"}},"roadmap_view":{"summary":"Response for creating a roadmap view","value":{"$ref":"#/components/examples/projects-v2-view"}},"table_view":{"summary":"Response for creating a table view","value":{"$ref":"#/components/examples/projects-v2-view"}}},"schema":{"$ref":"#/components/schemas/projects-v2-view"}}},"description":"Response for creating a view in an organization-owned project."},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Service unavailable"}}


operation_id: projects/list-view-items-for-org
path: /orgs/{org}/projectsV2/{project_number}/views/{view_number}/items
method: GET
summary: List items for an organization project view
description: List items in an organization project with the saved view's filter applied.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/project-number"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/view-number"},{"description":"Limit results to specific fields, by their IDs. If not specified, the\ntitle field will be returned.\n\nExample: `fields[]=123&fields[]=456&fields[]=789` or `fields=123,456,789`","in":"query","name":"fields","schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":50,"type":"array"}]},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/projects-v2-item-with-content"}},"schema":{"items":{"$ref":"#/components/schemas/projects-v2-item-with-content"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-get-organization-definitions
path: /orgs/{org}/properties/schema
method: GET
summary: Get all custom properties for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets all custom properties defined for an organization.
  Organization members can read these properties.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/custom-properties"}},"schema":{"items":{"$ref":"#/components/schemas/custom-property"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-create-or-update-organization-definitions
path: /orgs/{org}/properties/schema
method: PATCH
summary: Create or update custom properties for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates new or updates existing custom properties defined for an organization in a batch.

  If the property already exists, the existing property will be replaced with the new values.
  Missing optional values will fall back to default values, previous values will be overwritten.
  E.g. if a property exists with `values_editable_by: org_and_repo_actors` and it's updated without specifying `values_editable_by`, it will be updated to default value `org_actors`.

  To use this endpoint, the authenticated user must be one of:
    - An administrator for the organization.
    - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"properties":[{"allowed_values":["production","development"],"default_value":"production","description":"Prod or dev environment","property_name":"environment","required":true,"value_type":"single_select","values_editable_by":"org_actors"},{"property_name":"service","value_type":"string"},{"description":"Team owning the repository","property_name":"team","value_type":"string"}]}}},"schema":{"properties":{"properties":{"description":"The array of custom properties to create or update.","items":{"$ref":"#/components/schemas/custom-property"},"maxItems":100,"minItems":1,"type":"array"}},"required":["properties"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/custom-properties"}},"schema":{"items":{"$ref":"#/components/schemas/custom-property"},"type":"array"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-get-organization-definition
path: /orgs/{org}/properties/schema/{custom_property_name}
method: GET
summary: Get a custom property for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a custom property that is defined for an organization.
  Organization members can read these properties.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/custom-property-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/custom-property"}},"schema":{"$ref":"#/components/schemas/custom-property"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-create-or-update-organization-definition
path: /orgs/{org}/properties/schema/{custom_property_name}
method: PUT
summary: Create or update a custom property for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new or updates an existing custom property that is defined for an organization.

  To use this endpoint, the authenticated user must be one of:
  - An administrator for the organization.
  - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/custom-property-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"allowed_values":["production","development"],"default_value":"production","description":"Prod or dev environment","required":true,"value_type":"single_select"}}},"schema":{"$ref":"#/components/schemas/custom-property-set-payload"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/custom-property"}},"schema":{"$ref":"#/components/schemas/custom-property"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-delete-organization-definition
path: /orgs/{org}/properties/schema/{custom_property_name}
method: DELETE
summary: Remove a custom property for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Removes a custom property that is defined for an organization.

  To use this endpoint, the authenticated user must be one of:
    - An administrator for the organization.
    - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_definitions_manager` in the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/custom-property-name"}],"requestBody":null}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-get-organization-values
path: /orgs/{org}/properties/values
method: GET
summary: List custom property values for organization repositories
auth_scheme_ref: GitHubBearerToken
description:
  Lists organization repositories with all of their custom property values.
  Organization members can read these properties.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"Finds repositories in the organization with a query containing one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/search/search#constructing-a-search-query). See \"[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)\" for a detailed list of qualifiers.","in":"query","name":"repository_query","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-repo-custom-property-values"}},"schema":{"items":{"$ref":"#/components/schemas/org-repo-custom-property-values"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/custom-properties-for-repos-create-or-update-organization-values
path: /orgs/{org}/properties/values
method: PATCH
summary: Create or update custom property values for organization repositories
auth_scheme_ref: GitHubBearerToken
description:
  Create new or update existing custom property values for repositories in a batch that belong to an organization.
  Each target repository will have its custom property values updated to match the values provided in the request.

  A maximum of 30 repositories can be updated in a single request.

  Using a value of `null` for a custom property will remove or 'unset' the property value from the repository.

  To use this endpoint, the authenticated user must be one of:
    - An administrator for the organization.
    - A user, or a user on a team, with the fine-grained permission of `custom_properties_org_values_editor` in the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-repo-update-custom-property-values"}},"schema":{"properties":{"properties":{"description":"List of custom property names and associated values to apply to the repositories.","items":{"$ref":"#/components/schemas/custom-property-value"},"type":"array"},"repository_names":{"description":"The names of repositories that the custom property values will be applied to.","items":{"type":"string"},"maxItems":30,"minItems":1,"type":"array"}},"required":["repository_names","properties"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No Content when custom property values are successfully created or updated"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: orgs/check-public-membership-for-user
path: /orgs/{org}/public_members/{username}
method: GET
summary: Check public organization membership for a user
description: Check if the provided user is a public member of the organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 118 characters]

output_schema:
  {"204":{"description":"Response if user is a public member"},"404":{"description":"Not Found if user is not a public member"}}


operation_id: orgs/set-public-membership-for-authenticated-user
path: /orgs/{org}/public_members/{username}
method: PUT
summary: Set public organization membership for the authenticated user
output_schema: {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"}}
auth_scheme_ref: GitHubBearerToken
description:
  The user can publicize their own membership. (A user cannot publicize the membership for another user.)

  Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."

input_schema:
[cell repeats an earlier one in this file: 118 characters]


operation_id: orgs/remove-public-membership-for-authenticated-user
path: /orgs/{org}/public_members/{username}
method: DELETE
summary: Remove public organization membership for the authenticated user
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default.

input_schema:
[cell repeats an earlier one in this file: 118 characters]


operation_id: repos/list-for-org
path: /orgs/{org}/repos
method: GET
summary: List organization repositories
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories for the specified organization.

  > [!NOTE]
  > In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Specifies the types of repositories you want returned.","in":"query","name":"type","schema":{"default":"all","enum":["all","public","private","forks","sources","member"],"type":"string"},"style":"form"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","pushed","full_name"],"type":"string"},"style":"form"},{"description":"The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: repos/create-in-org
path: /orgs/{org}/repos
method: POST
summary: Create an organization repository
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new repository in the specified organization. The authenticated user must be a member of the organization.

  OAuth app tokens and personal access tokens (classic) need the `public_repo` or `repo` scope to create a public repository, and `repo` scope to create a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"This is your first repository","has_issues":true,"has_projects":true,"has_wiki":true,"homepage":"https://github.com","name":"Hello-World","private":false}}},"schema":{"properties":{"allow_auto_merge":{"default":false,"description":"Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge.","type":"boolean"},"allow_merge_commit":{"default":true,"description":"Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.","type":"boolean"},"allow_rebase_merge":{"default":true,"description":"Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.","type":"boolean"},"allow_squash_merge":{"default":true,"description":"Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.","type":"boolean"},"auto_init":{"default":false,"description":"Pass `true` to create an initial commit with empty README.","type":"boolean"},"custom_properties":{"additionalProperties":true,"description":"The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values.","type":"object"},"delete_branch_on_merge":{"default":false,"description":"Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. **The authenticated user must be an organization owner to set this property to `true`.**","type":"boolean"},"description":{"description":"A short description of the repository.","type":"string"},"gitignore_template":{"description":"Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, \"Haskell\".","type":"string"},"has_downloads":{"default":true,"description":"Whether downloads are enabled.","example":true,"type":"boolean"},"has_issues":{"default":true,"description":"Either `true` to enable issues for this repository or `false` to disable them.","type":"boolean"},"has_projects":{"default":true,"description":"Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.","type":"boolean"},"has_wiki":{"default":true,"description":"Either `true` to enable the wiki for this repository or `false` to disable it.","type":"boolean"},"homepage":{"description":"A URL with more information about the repository.","type":"string"},"is_template":{"default":false,"description":"Either `true` to make this repo available as a template repository or `false` to prevent it.","type":"boolean"},"license_template":{"description":"Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, \"mit\" or \"mpl-2.0\".","type":"string"},"merge_commit_message":{"description":"The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","PR_TITLE","BLANK"],"type":"string"},"merge_commit_title":{"description":"Required when using `merge_commit_message`.\n\nThe default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).","enum":["PR_TITLE","MERGE_MESSAGE"],"type":"string"},"name":{"description":"The name of the repository.","type":"string"},"private":{"default":false,"description":"Whether the repository is private.","type":"boolean"},"squash_merge_commit_message":{"description":"The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","COMMIT_MESSAGES","BLANK"],"type":"string"},"squash_merge_commit_title":{"description":"Required when using `squash_merge_commit_message`.\n\nThe default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).","enum":["PR_TITLE","COMMIT_OR_PR_TITLE"],"type":"string"},"team_id":{"description":"The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.","type":"integer"},"use_squash_pr_title_as_default":{"default":false,"deprecated":true,"description":"Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead.","type":"boolean"},"visibility":{"description":"The visibility of the repository.","enum":["public","private"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/full-repository"}},"schema":{"$ref":"#/components/schemas/full-repository"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/repos/octocat/Hello-World","schema":{"type":"string"},"style":"simple"}}},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"},"451":{"$ref":"#/components/responses/validation_failed"}}


operation_id: repos/get-org-rulesets
path: /orgs/{org}/rulesets
method: GET
summary: Get all organization repository rulesets
description: Get all the repository rulesets for an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/ruleset-targets"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-ruleset-items"}},"schema":{"items":{"$ref":"#/components/schemas/repository-ruleset"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/create-org-ruleset
path: /orgs/{org}/rulesets
method: POST
summary: Create an organization repository ruleset
description: Create a repository ruleset for an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"bypass_actors":[{"actor_id":234,"actor_type":"Team","bypass_mode":"always"}],"conditions":{"ref_name":{"exclude":["refs/heads/dev*"],"include":["refs/heads/main","refs/heads/master"]},"repository_name":{"exclude":["unimportant_repository"],"include":["important_repository","another_important_repository"],"protected":true}},"enforcement":"active","name":"super cool ruleset","rules":[{"parameters":{"operator":"contains","pattern":"github"},"type":"commit_author_email_pattern"}],"target":"branch"}}},"schema":{"properties":{"bypass_actors":{"description":"The actors that can bypass the rules in this ruleset","items":{"$ref":"#/components/schemas/repository-ruleset-bypass-actor"},"type":"array"},"conditions":{"$ref":"#/components/schemas/org-ruleset-conditions"},"enforcement":{"$ref":"#/components/schemas/repository-rule-enforcement"},"name":{"description":"The name of the ruleset.","type":"string"},"rules":{"description":"An array of rules within the ruleset.","items":{"$ref":"#/components/schemas/org-rules"},"type":"array"},"target":{"default":"branch","description":"The target of the ruleset","enum":["branch","tag","push","repository"],"type":"string"}},"required":["name","enforcement"],"type":"object"}}},"description":"Request body","required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-ruleset"}},"schema":{"$ref":"#/components/schemas/repository-ruleset"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/get-org-rule-suites
path: /orgs/{org}/rulesets/rule-suites
method: GET
summary: List organization rule suites
auth_scheme_ref: GitHubBearerToken
description:
  Lists suites of rule evaluations at the organization level.
  For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/ref-in-query"},{"$ref":"#/components/parameters/repository-name-in-query"},{"$ref":"#/components/parameters/time-period"},{"$ref":"#/components/parameters/actor-name-in-query"},{"$ref":"#/components/parameters/rule-suite-result"},{"$ref":"#/components/parameters/evaluate-status"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/rule-suite-items"}},"schema":{"$ref":"#/components/schemas/rule-suites"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/get-org-rule-suite
path: /orgs/{org}/rulesets/rule-suites/{rule_suite_id}
method: GET
summary: Get an organization rule suite
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a suite of rule evaluations from within an organization.
  For more information, see "[Managing rulesets for repositories in your organization](https://docs.github.com/organizations/managing-organization-settings/managing-rulesets-for-repositories-in-your-organization#viewing-insights-for-rulesets)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/rule-suite-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/rule-suite"}},"schema":{"$ref":"#/components/schemas/rule-suite"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/get-org-ruleset
path: /orgs/{org}/rulesets/{ruleset_id}
method: GET
summary: Get an organization repository ruleset
auth_scheme_ref: GitHubBearerToken
description:
  Get a repository ruleset for an organization.

  **Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the user
  making the API request has write access to the ruleset.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-ruleset"}},"schema":{"$ref":"#/components/schemas/repository-ruleset"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/update-org-ruleset
path: /orgs/{org}/rulesets/{ruleset_id}
method: PUT
summary: Update an organization repository ruleset
description: Update a ruleset for an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"bypass_actors":[{"actor_id":234,"actor_type":"Team","bypass_mode":"always"}],"conditions":{"ref_name":{"exclude":["refs/heads/dev*"],"include":["refs/heads/main","refs/heads/master"]},"repository_name":{"exclude":["unimportant_repository"],"include":["important_repository","another_important_repository"],"protected":true}},"enforcement":"active","name":"super cool ruleset","rules":[{"parameters":{"operator":"contains","pattern":"github"},"type":"commit_author_email_pattern"}],"target":"branch"}}},"schema":{"properties":{"bypass_actors":{"description":"The actors that can bypass the rules in this ruleset","items":{"$ref":"#/components/schemas/repository-ruleset-bypass-actor"},"type":"array"},"conditions":{"$ref":"#/components/schemas/org-ruleset-conditions"},"enforcement":{"$ref":"#/components/schemas/repository-rule-enforcement"},"name":{"description":"The name of the ruleset.","type":"string"},"rules":{"description":"An array of rules within the ruleset.","items":{"$ref":"#/components/schemas/org-rules"},"type":"array"},"target":{"description":"The target of the ruleset","enum":["branch","tag","push","repository"],"type":"string"}},"type":"object"}}},"description":"Request body"}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-ruleset"}},"schema":{"$ref":"#/components/schemas/repository-ruleset"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: repos/delete-org-ruleset
path: /orgs/{org}/rulesets/{ruleset_id}
method: DELETE
summary: Delete an organization repository ruleset
description: Delete a ruleset for an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/get-org-ruleset-history
path: /orgs/{org}/rulesets/{ruleset_id}/history
method: GET
summary: Get organization ruleset history
description: Get the history of an organization ruleset.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/ruleset-history"}},"schema":{"items":{"$ref":"#/components/schemas/ruleset-version"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: orgs/get-org-ruleset-version
path: /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}
method: GET
summary: Get organization ruleset version
description: Get a version of an organization ruleset.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The ID of the ruleset.","in":"path","name":"ruleset_id","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The ID of the version","in":"path","name":"version_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-ruleset-version-with-state"}},"schema":{"$ref":"#/components/schemas/ruleset-version-with-state"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: secret-scanning/list-alerts-for-org
path: /orgs/{org}/secret-scanning/alerts
method: GET
summary: List secret scanning alerts for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest.

  The authenticated user must be an administrator or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-scanning-alert-state"},{"$ref":"#/components/parameters/secret-scanning-alert-secret-type"},{"$ref":"#/components/parameters/secret-scanning-alert-exclude-secret-types"},{"$ref":"#/components/parameters/secret-scanning-alert-exclude-providers"},{"$ref":"#/components/parameters/secret-scanning-alert-providers"},{"$ref":"#/components/parameters/secret-scanning-alert-resolution"},{"$ref":"#/components/parameters/secret-scanning-alert-assignee"},{"$ref":"#/components/parameters/secret-scanning-alert-sort"},{"$ref":"#/components/parameters/direction"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/secret-scanning-pagination-before-org-repo"},{"$ref":"#/components/parameters/secret-scanning-pagination-after-org-repo"},{"$ref":"#/components/parameters/secret-scanning-alert-validity"},{"$ref":"#/components/parameters/secret-scanning-alert-publicly-leaked"},{"$ref":"#/components/parameters/secret-scanning-alert-multi-repo"},{"$ref":"#/components/parameters/secret-scanning-alert-hide-secret"},{"$ref":"#/components/parameters/secret-scanning-alert-bypassed"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-secret-scanning-alert-list"}},"schema":{"items":{"$ref":"#/components/schemas/organization-secret-scanning-alert"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"404":{"$ref":"#/components/responses/not_found"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: secret-scanning/list-org-pattern-configs
path: /orgs/{org}/secret-scanning/pattern-configurations
method: GET
summary: List organization pattern configurations
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the secret scanning pattern configurations for an organization.

  Personal access tokens (classic) need the `read:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/secret-scanning-pattern-configuration"}},"schema":{"$ref":"#/components/schemas/secret-scanning-pattern-configuration"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: secret-scanning/update-org-pattern-configs
path: /orgs/{org}/secret-scanning/pattern-configurations
method: PATCH
summary: Update organization pattern configurations
auth_scheme_ref: GitHubBearerToken
description:
  Updates the secret scanning pattern configurations for an organization.

  Personal access tokens (classic) need the `write:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"custom_pattern_settings":[{"custom_pattern_version":"0ujsswThIGTUYm2K8FjOOfXtY1K","push_protection_setting":"enabled","token_type":"cp_2"}],"pattern_config_version":"0ujsswThIGTUYm2K8FjOOfXtY1K","provider_pattern_settings":[{"push_protection_setting":"enabled","token_type":"GITHUB_PERSONAL_ACCESS_TOKEN"}]}}},"schema":{"properties":{"custom_pattern_settings":{"description":"Pattern settings for custom patterns.","items":{"properties":{"custom_pattern_version":{"$ref":"#/components/schemas/secret-scanning-row-version"},"push_protection_setting":{"description":"Push protection setting to set for the pattern.","enum":["disabled","enabled"],"type":"string"},"token_type":{"description":"The ID of the pattern to configure.","type":"string"}},"type":"object"},"type":"array"},"pattern_config_version":{"$ref":"#/components/schemas/secret-scanning-row-version"},"provider_pattern_settings":{"description":"Pattern settings for provider patterns.","items":{"properties":{"push_protection_setting":{"description":"Push protection setting to set for the pattern.","enum":["not-set","disabled","enabled"],"type":"string"},"token_type":{"description":"The ID of the pattern to configure.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"pattern_config_version":"0ujsswThIGTUYm2K8FjOOfXtY1K"}}},"schema":{"properties":{"pattern_config_version":{"description":"The updated pattern configuration version.","type":"string"}},"type":"object"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: security-advisories/list-org-repository-advisories
path: /orgs/{org}/security-advisories
method: GET
summary: List repository security advisories for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists repository security advisories for an organization.

  The authenticated user must be an owner or security manager for the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` or `repository_advisories:write` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/direction"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"created","enum":["created","updated","published"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"description":"The number of advisories to return per page. For more information, see \"[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).\"","in":"query","name":"per_page","schema":{"default":30,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},{"description":"Filter by the state of the repository advisories. Only advisories of this state will be returned.","in":"query","name":"state","schema":{"enum":["triage","draft","published","closed"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/list-repository-advisories"}},"schema":{"items":{"$ref":"#/components/schemas/repository-advisory"},"type":"array"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-security-manager-teams
path: /orgs/{org}/security-managers
method: GET
summary: List security manager teams
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/rest/orgs/organization-roles)" endpoints instead.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/team-simple"},"type":"array"}}},"description":"Response"}}


operation_id: orgs/get-immutable-releases-settings
path: /orgs/{org}/settings/immutable-releases
method: GET
summary: Get immutable releases settings for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the immutable releases policy for repositories in an organization.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"enforced_repositories":"all"}}},"schema":{"$ref":"#/components/schemas/immutable-releases-organization-settings"}}},"description":"Immutable releases settings response"}}


operation_id: orgs/set-immutable-releases-settings
path: /orgs/{org}/settings/immutable-releases
method: PUT
summary: Set immutable releases settings for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the immutable releases policy for repositories in an organization.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"enforced_repositories":"all"}}},"schema":{"properties":{"enforced_repositories":{"description":"The policy that controls how immutable releases are enforced in the organization.","enum":["all","none","selected"],"example":"all","type":"string"},"selected_repository_ids":{"description":"An array of repository ids for which immutable releases enforcement should be applied. You can only provide a list of repository ids when the `enforced_repositories` is set to `selected`. You can add and remove individual repositories using the [Enable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#enable-a-selected-repository-for-immutable-releases-in-an-organization) and [Disable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#disable-a-selected-repository-for-immutable-releases-in-an-organization) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["enforced_repositories"],"type":"object"}}},"required":true}}


operation_id: orgs/get-immutable-releases-settings-repositories
path: /orgs/{org}/settings/immutable-releases/repositories
method: GET
summary: List selected repositories for immutable releases enforcement
auth_scheme_ref: GitHubBearerToken
description:
  List all of the repositories that have been selected for immutable releases enforcement in an organization.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

output_schema:
[cell repeats an earlier one in this file: 359 characters]


operation_id: orgs/set-immutable-releases-settings-repositories
path: /orgs/{org}/settings/immutable-releases/repositories
method: PUT
summary: Set selected repositories for immutable releases enforcement
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Replaces all repositories that have been selected for immutable releases enforcement in an organization. To use this endpoint, the organization immutable releases policy for `enforced_repositories` must be configured to `selected`.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[64780797]}}},"schema":{"properties":{"selected_repository_ids":{"description":"An array of repository ids for which immutable releases enforcement should be applied. You can only provide a list of repository ids when the `enforced_repositories` is set to `selected`. You can add and remove individual repositories using the [Enable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#enable-a-selected-repository-for-immutable-releases-in-an-organization) and [Disable a selected repository for immutable releases in an organization](https://docs.github.com/rest/orgs/orgs#disable-a-selected-repository-for-immutable-releases-in-an-organization) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: orgs/enable-selected-repository-immutable-releases-organization
path: /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
method: PUT
summary: Enable a selected repository for immutable releases in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for `enforced_repositories` must be configured to `selected`.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 123 characters]


operation_id: orgs/disable-selected-repository-immutable-releases-organization
path: /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
method: DELETE
summary: Disable a selected repository for immutable releases in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for `enforced_repositories` must be configured to `selected`.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 123 characters]


operation_id: hosted-compute/list-network-configurations-for-org
path: /orgs/{org}/settings/network-configurations
method: GET
summary: List hosted compute network configurations for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all hosted compute network configurations configured in an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 158 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/network-configurations-paginated"}},"schema":{"properties":{"network_configurations":{"items":{"$ref":"#/components/schemas/network-configuration"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","network_configurations"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: hosted-compute/create-network-configuration-for-org
path: /orgs/{org}/settings/network-configurations
method: POST
summary: Create a hosted compute network configuration for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a hosted compute network configuration for an organization.

  OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"compute_service":"actions","name":"my-network-configuration","network_settings_ids":["23456789ABDCEF1"]}}},"schema":{"properties":{"compute_service":{"description":"The hosted compute service to use for the network configuration.","enum":["none","actions"],"type":"string"},"failover_network_enabled":{"description":"Indicates whether the failover network resource is enabled.","type":"boolean"},"failover_network_settings_ids":{"description":"A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.","items":{"type":"string"},"maxItems":1,"minItems":0,"type":"array"},"name":{"description":"Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.","type":"string"},"network_settings_ids":{"description":"A list of identifiers of the network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.","items":{"type":"string"},"maxItems":1,"minItems":1,"type":"array"}},"required":["name","network_settings_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/network-configuration"}},"schema":{"$ref":"#/components/schemas/network-configuration"}}},"description":"Response"}}


operation_id: hosted-compute/get-network-configuration-for-org
path: /orgs/{org}/settings/network-configurations/{network_configuration_id}
method: GET
summary: Get a hosted compute network configuration for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a hosted compute network configuration configured in an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/network-configuration-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/network-configuration"}},"schema":{"$ref":"#/components/schemas/network-configuration"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: hosted-compute/delete-network-configuration-from-org
path: /orgs/{org}/settings/network-configurations/{network_configuration_id}
method: DELETE
summary: Delete a hosted compute network configuration from an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a hosted compute network configuration from an organization.

  OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/network-configuration-id"}],"requestBody":null}


operation_id: hosted-compute/update-network-configuration-for-org
path: /orgs/{org}/settings/network-configurations/{network_configuration_id}
method: PATCH
summary: Update a hosted compute network configuration for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates a hosted compute network configuration for an organization.

  OAuth app tokens and personal access tokens (classic) need the `write:network_configurations` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/network-configuration-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"compute_service":"actions","name":"my-network-configuration","network_settings_ids":["23456789ABDCEF1"]}}},"schema":{"properties":{"compute_service":{"description":"The hosted compute service to use for the network configuration.","enum":["none","actions"],"type":"string"},"failover_network_enabled":{"description":"Indicates whether the failover network resource is enabled.","type":"boolean"},"failover_network_settings_ids":{"description":"A list of identifiers of the failover network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.","items":{"type":"string"},"maxItems":1,"minItems":0,"type":"array"},"name":{"description":"Name of the network configuration. Must be between 1 and 100 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.","type":"string"},"network_settings_ids":{"description":"A list of identifiers of the network settings resources to use for the network configuration. Exactly one resource identifier must be specified in the list.","items":{"type":"string"},"maxItems":1,"minItems":0,"type":"array"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/network-configuration"}},"schema":{"$ref":"#/components/schemas/network-configuration"}}},"description":"Response"}}


operation_id: hosted-compute/get-network-settings-for-org
path: /orgs/{org}/settings/network-settings/{network_settings_id}
method: GET
summary: Get a hosted compute network settings resource for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a hosted compute network settings resource configured for an organization.

  OAuth app tokens and personal access tokens (classic) need the `read:network_configurations` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/network-settings-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/network-settings"}},"schema":{"$ref":"#/components/schemas/network-settings"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: teams/list
path: /orgs/{org}/teams
method: GET
summary: List teams
description: Lists all teams in an organization that are visible to the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/team-type"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-items"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: teams/create
path: /orgs/{org}/teams
method: POST
summary: Create a team
auth_scheme_ref: GitHubBearerToken
description:
  To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/articles/setting-team-creation-permissions-in-your-organization)."

  When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-teams)".

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"A great team","name":"Justice League","notification_setting":"notifications_enabled","permission":"push","privacy":"closed"}}},"schema":{"properties":{"description":{"description":"The description of the team.","type":"string"},"maintainers":{"description":"List GitHub usernames for organization members who will become team maintainers.","items":{"type":"string"},"type":"array"},"name":{"description":"The name of the team.","type":"string"},"notification_setting":{"description":"The notification setting the team has chosen. The options are:  \n * `notifications_enabled` - team members receive notifications when the team is @mentioned.  \n * `notifications_disabled` - no one receives notifications.  \nDefault: `notifications_enabled`","enum":["notifications_enabled","notifications_disabled"],"type":"string"},"parent_team_id":{"description":"The ID of a team to set as the parent team.","type":"integer"},"privacy":{"description":"The level of privacy this team should have. The options are:  \n**For a non-nested team:**  \n * `secret` - only visible to organization owners and members of this team.  \n * `closed` - visible to all members of this organization.  \nDefault: `secret`  \n**For a parent or child team:**  \n * `closed` - visible to all members of this organization.  \nDefault for child team: `closed`","enum":["secret","closed"],"type":"string"},"repo_names":{"description":"The full name (e.g., \"organization-name/repository-name\") of repositories to add the team to.","items":{"type":"string"},"type":"array"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: teams/get-by-name
path: /orgs/{org}/teams/{team_slug}
method: GET
summary: Get a team by name
auth_scheme_ref: GitHubBearerToken
description:
  Gets a team using the team's `slug`. To create the `slug`, GitHub replaces special characters in the `name` string, changes all words to lowercase, and replaces spaces with a `-` separator. For example, `"My TEam Näme"` would become `my-team-name`.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`.

input_schema:
[cell repeats an earlier one in this file: 119 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: teams/delete-in-org
path: /orgs/{org}/teams/{team_slug}
method: DELETE
summary: Delete a team
auth_scheme_ref: GitHubBearerToken
description:
  To delete a team, the authenticated user must be an organization owner or team maintainer.

  If you are an organization owner, deleting a parent team will delete all of its child teams as well.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`.

input_schema:
[cell repeats an earlier one in this file: 119 characters]

output_schema:
  {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/enterprise_team_unsupported"}}


operation_id: teams/update-in-org
path: /orgs/{org}/teams/{team_slug}
method: PATCH
summary: Update a team
auth_scheme_ref: GitHubBearerToken
description:
  To edit a team, the authenticated user must either be an organization owner or a team maintainer.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"new team description","name":"new team name","notification_setting":"notifications_enabled","privacy":"closed"}}},"schema":{"properties":{"description":{"description":"The description of the team.","type":"string"},"name":{"description":"The name of the team.","type":"string"},"notification_setting":{"description":"The notification setting the team has chosen. Editing teams without specifying this parameter leaves `notification_setting` intact. The options are: \n * `notifications_enabled` - team members receive notifications when the team is @mentioned.  \n * `notifications_disabled` - no one receives notifications.","enum":["notifications_enabled","notifications_disabled"],"type":"string"},"parent_team_id":{"description":"The ID of a team to set as the parent team.","nullable":true,"type":"integer"},"permission":{"default":"pull","description":"**Closing down notice**. The permission that new repositories will be added to the team with when none is specified.","enum":["pull","push","admin"],"type":"string"},"privacy":{"description":"The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are:  \n**For a non-nested team:**  \n * `secret` - only visible to organization owners and members of this team.  \n * `closed` - visible to all members of this organization.  \n**For a parent or child team:**  \n * `closed` - visible to all members of this organization.","enum":["secret","closed"],"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response when the updated information already exists"},"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full"}},"schema":{"$ref":"#/components/schemas/team-full"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: teams/list-pending-invitations-in-org
path: /orgs/{org}/teams/{team_slug}/invitations
method: GET
summary: List pending team invitations
auth_scheme_ref: GitHubBearerToken
description:
  The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-invitation-items"}},"schema":{"items":{"$ref":"#/components/schemas/organization-invitation"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"422":{"$ref":"#/components/responses/enterprise_team_unsupported"}}


operation_id: teams/list-members-in-org
path: /orgs/{org}/teams/{team_slug}/members
method: GET
summary: List team members
auth_scheme_ref: GitHubBearerToken
description:
  Team members will include the members of child teams.

  Each member includes their `role` on the team (`member` or `maintainer`) and an `inherited` flag indicating whether the membership is inherited from a child team (`true`) or is a direct membership (`false`). These fields let you read a member's role and direct/inherited status without additional requests.

  To list members in a team, the team must be visible to the authenticated user.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"description":"Filters members returned by their role in the team.","in":"query","name":"role","schema":{"default":"all","enum":["member","maintainer","all"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-member-items"}},"schema":{"items":{"$ref":"#/components/schemas/team-member"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: teams/get-membership-for-user-in-org
path: /orgs/{org}/teams/{team_slug}/memberships/{username}
method: GET
summary: Get team membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  Team members will include the members of child teams.

  To get a user's membership with a team, the team must be visible to the authenticated user.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`.

  > [!NOTE]
  > The response contains the `state` of the membership and the member's `role`.

  The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/teams/teams#create-a-team).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-user-is-a-team-maintainer":{"$ref":"#/components/examples/team-membership-response-if-user-is-a-team-maintainer"}},"schema":{"$ref":"#/components/schemas/team-membership"}}},"description":"Response"},"404":{"description":"if user has no team membership"}}


operation_id: teams/add-or-update-membership-for-user-in-org
path: /orgs/{org}/teams/{team_slug}/memberships/{username}
method: PUT
summary: Add or update team membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

  An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team.

  If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Add or update team membership for an organization member","value":{"role":"maintainer"}}},"schema":{"properties":{"role":{"default":"member","description":"The role that this user should have in the team.","enum":["member","maintainer"],"type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-users-membership-with-team-is-now-pending":{"$ref":"#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending"}},"schema":{"$ref":"#/components/schemas/team-membership"}}},"description":"Response"},"403":{"description":"Forbidden if team synchronization is set up"},"422":{"description":"Unprocessable Entity if you attempt to add an organization to a team"}}


operation_id: teams/remove-membership-for-user-in-org
path: /orgs/{org}/teams/{team_slug}/memberships/{username}
method: DELETE
summary: Remove team membership for a user
auth_scheme_ref: GitHubBearerToken
description:
  To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team.

  Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

  > [!NOTE]
  > When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)."

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"403":{"description":"Forbidden if team synchronization is set up"}}


operation_id: teams/list-repos-in-org
path: /orgs/{org}/teams/{team_slug}/repos
method: GET
summary: List team repositories
auth_scheme_ref: GitHubBearerToken
description:
  Lists a team's repositories visible to the authenticated user.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/minimal-repository-items"}},"schema":{"items":{"$ref":"#/components/schemas/minimal-repository"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: teams/check-permissions-for-repo-in-org
path: /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
method: GET
summary: Check team permissions for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Checks whether a team has `admin`, `push`, `maintain`, `triage`, or `pull` permission for a repository. Repositories inherited through a parent team will also be checked.

  You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom [media type](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types/) via the `application/vnd.github.v3.repository+json` accept header.

  If a team doesn't have permission for the repository, you will receive a `404 Not Found` response status.

  If the repository is private, you must have at least `read` permission for that repository, and your token must have the `repo` or `admin:org` scope. Otherwise, you will receive a `404 Not Found` response status.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"alternative-response-with-repository-permissions":{"$ref":"#/components/examples/team-repository-alternative-response-with-repository-permissions"}},"schema":{"$ref":"#/components/schemas/team-repository"}}},"description":"Alternative response with repository permissions"},"204":{"description":"Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header."},"404":{"description":"Not Found if team does not have permission for the repository"}}


operation_id: teams/add-or-update-repo-permissions-in-org
path: /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
method: PUT
summary: Add or update team repository permissions
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP method](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.

  For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)".

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Adding a team to an organization repository with the write role","value":{"permission":"push"}}},"schema":{"properties":{"permission":{"description":"The permission to grant the team on this repository. We accept the following permissions to be set: `pull`, `triage`, `push`, `maintain`, `admin` and you can also specify a custom repository role name, if the owning organization has defined any. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository.","type":"string"}},"type":"object"}}}}}


operation_id: teams/remove-repo-in-org
path: /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}
method: DELETE
summary: Remove a repository from a team
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}


operation_id: teams/list-child-in-org
path: /orgs/{org}/teams/{team_slug}/teams
method: GET
summary: List child teams
auth_scheme_ref: GitHubBearerToken
description:
  Lists the child teams of the team specified by `{team_slug}`.

  > [!NOTE]
  > You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/teams`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/team-slug"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response-if-child-teams-exist":{"$ref":"#/components/examples/team-items-response-if-child-teams-exist"}},"schema":{"items":{"$ref":"#/components/schemas/team"},"type":"array"}}},"description":"if child teams exist","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: orgs/enable-or-disable-security-product-on-all-org-repos
path: /orgs/{org}/{security_product}/{enablement}
method: POST
summary: Enable or disable a security feature for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Closing down notice:** The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead. For more information, see the [changelog](https://github.blog/changelog/2024-07-22-deprecation-of-api-endpoint-to-enable-or-disable-a-security-feature-for-an-organization/).

  Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."

  The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org`, `write:org`, or `repo` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/security-product"},{"$ref":"#/components/parameters/org-security-product-enablement"}],"requestBody":{"content":{"application/json":{"examples":{"default":{}},"schema":{"properties":{"query_suite":{"description":"CodeQL query suite to be used. If you specify the `query_suite` parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured.\nIf you don't specify any `query_suite` in your request, the preferred query suite of the organization will be applied.","enum":["default","extended"],"type":"string"}}}}}}}

output_schema:
  {"204":{"description":"Action started"},"422":{"description":"The action could not be taken due to an in progress enablement, or a policy is preventing enablement"}}


operation_id: rate-limit/get
path: /rate_limit
method: GET
summary: Get rate limit status for the authenticated user
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > Accessing this endpoint does not count against your REST API rate limit.

  Some categories of endpoints have custom rate limits that are separate from the rate limit governing the other REST API endpoints. For this reason, the API response categorizes your rate limit. Under `resources`, you'll see objects relating to different categories:
  * The `core` object provides your rate limit status for all non-search-related resources in the REST API.
  * The `search` object provides your rate limit status for the REST API for searching (excluding code searches). For more information, see "[Search](https://docs.github.com/rest/search/search)."
  * The `code_search` object provides your rate limit status for the REST API for searching code. For more information, see "[Search code](https://docs.github.com/rest/search/search#search-code)."
  * The `graphql` object provides your rate limit status for the GraphQL API. For more information, see "[Resource limitations](https://docs.github.com/graphql/overview/resource-limitations#rate-limit)."
  * The `integration_manifest` object provides your rate limit status for the `POST /app-manifests/{code}/conversions` operation. For more information, see "[Creating a GitHub App from a manifest](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app-from-a-manifest#3-you-exchange-the-temporary-code-to-retrieve-the-app-configuration)."
  * The `dependency_snapshots` object provides your rate limit status for submitting snapshots to the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."
  * The `dependency_sbom` object provides your rate limit status for requesting SBOMs from the dependency graph. For more information, see "[Dependency graph](https://docs.github.com/rest/dependency-graph)."
  * The `actions_runner_registration` object provides your rate limit status for registering self-hosted runners in GitHub Actions. For more information, see "[Self-hosted runners](https://docs.github.com/rest/actions/self-hosted-runners)."
  * The `source_import` object is no longer in use for any API endpoints, and it will be removed in the next API version. For more information about API versions, see "[API Versions](https://docs.github.com/rest/about-the-rest-api/api-versions)."

  > [!NOTE]
  > The `rate` object is closing down. If you're writing new API client code or updating existing code, you should use the `core` object instead of the `rate` object. The `core` object contains the same information that is present in the `rate` object.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/rate-limit-overview"}},"schema":{"$ref":"#/components/schemas/rate-limit-overview"}}},"description":"Response","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/x-rate-limit-limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/x-rate-limit-remaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/x-rate-limit-reset"}}},"304":{"$ref":"#/components/responses/not_modified"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/get
path: /repos/{owner}/{repo}
method: GET
summary: Get a repository
auth_scheme_ref: GitHubBearerToken
description:
  The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.

  > [!NOTE]
  > - In order to see the `security_and_analysis` block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."
  > - To view merge-related settings, you must have the `contents:read` and `contents:write` permissions.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/full-repository-default-response"}},"schema":{"$ref":"#/components/schemas/full-repository"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/delete
path: /repos/{owner}/{repo}
method: DELETE
summary: Delete a repository
auth_scheme_ref: GitHubBearerToken
description:
  Deleting a repository requires admin access.

  If an organization owner has configured the organization to prevent members from deleting organization-owned
  repositories, you will get a `403 Forbidden` response.

  OAuth app tokens and personal access tokens (classic) need the `delete_repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"307":{"$ref":"#/components/responses/temporary_redirect"},"403":{"content":{"application/json":{"examples":{"default":{"value":{"documentation_url":"https://docs.github.com/rest/repos/repos#delete-a-repository","message":"Organization members cannot delete repositories."}}},"schema":{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"type":"object"}}},"description":"If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response:"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: repos/update
path: /repos/{owner}/{repo}
method: PATCH
summary: Update a repository
auth_scheme_ref: GitHubBearerToken
description:
  **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/rest/repos/repos#replace-all-repository-topics) endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"This is your first repository","has_issues":true,"has_projects":true,"has_wiki":true,"homepage":"https://github.com","name":"Hello-World","private":true}}},"schema":{"properties":{"allow_auto_merge":{"default":false,"description":"Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge.","type":"boolean"},"allow_forking":{"default":false,"description":"Either `true` to allow private forks, or `false` to prevent private forks.","type":"boolean"},"allow_merge_commit":{"default":true,"description":"Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits.","type":"boolean"},"allow_rebase_merge":{"default":true,"description":"Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging.","type":"boolean"},"allow_squash_merge":{"default":true,"description":"Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging.","type":"boolean"},"allow_update_branch":{"default":false,"description":"Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise.","type":"boolean"},"archived":{"default":false,"description":"Whether to archive this repository. `false` will unarchive a previously archived repository.","type":"boolean"},"default_branch":{"description":"Updates the default branch for this repository.","type":"string"},"delete_branch_on_merge":{"default":false,"description":"Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion.","type":"boolean"},"description":{"description":"A short description of the repository.","type":"string"},"has_issues":{"default":true,"description":"Either `true` to enable issues for this repository or `false` to disable them.","type":"boolean"},"has_projects":{"default":true,"description":"Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error.","type":"boolean"},"has_pull_requests":{"default":true,"description":"Either `true` to allow pull requests for this repository or `false` to prevent pull requests.","type":"boolean"},"has_wiki":{"default":true,"description":"Either `true` to enable the wiki for this repository or `false` to disable it.","type":"boolean"},"homepage":{"description":"A URL with more information about the repository.","type":"string"},"is_template":{"default":false,"description":"Either `true` to make this repo available as a template repository or `false` to prevent it.","type":"boolean"},"merge_commit_message":{"description":"The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","PR_TITLE","BLANK"],"type":"string"},"merge_commit_title":{"description":"Required when using `merge_commit_message`.\n\nThe default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).","enum":["PR_TITLE","MERGE_MESSAGE"],"type":"string"},"name":{"description":"The name of the repository.","type":"string"},"private":{"default":false,"description":"Either `true` to make the repository private or `false` to make it public. Default: `false`.  \n**Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private.","type":"boolean"},"pull_request_creation_policy":{"description":"The policy that controls who can create pull requests for this repository: `all` or `collaborators_only`.","enum":["all","collaborators_only"],"type":"string"},"security_and_analysis":{"description":"Specify which security and analysis features to enable or disable for the repository.\n\nTo use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"\n\nFor example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request:\n`{ \"security_and_analysis\": {\"advanced_security\": { \"status\": \"enabled\" } } }`.\n\nYou can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.","nullable":true,"properties":{"advanced_security":{"description":"Use the `status` property to enable or disable GitHub Advanced Security for this repository.\nFor more information, see \"[About GitHub Advanced\nSecurity](/github/getting-started-with-github/learning-about-github/about-github-advanced-security).\"\n\nFor standalone Code Scanning or Secret Protection products, this parameter cannot be used.","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"code_security":{"description":"Use the `status` property to enable or disable GitHub Code Security for this repository.","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning":{"description":"Use the `status` property to enable or disable secret scanning for this repository. For more information, see \"[About secret scanning](/code-security/secret-security/about-secret-scanning).\"","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning_ai_detection":{"description":"Use the `status` property to enable or disable secret scanning AI detection for this repository. For more information, see \"[Responsible detection of generic secrets with AI](https://docs.github.com/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/generic-secret-detection/responsible-ai-generic-secrets).\"","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning_delegated_alert_dismissal":{"description":"Use the `status` property to enable or disable secret scanning delegated alert dismissal for this repository.","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning_delegated_bypass":{"description":"Use the `status` property to enable or disable secret scanning delegated bypass for this repository.","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning_delegated_bypass_options":{"description":"Feature options for secret scanning delegated bypass.\nThis object is only honored when `security_and_analysis.secret_scanning_delegated_bypass.status` is set to `enabled`.\nYou can send this object in the same request as `secret_scanning_delegated_bypass`, or update just the options in a separate request.","properties":{"reviewers":{"description":"The bypass reviewers for secret scanning delegated bypass.\nIf you omit this field, the existing set of reviewers is unchanged.","items":{"properties":{"mode":{"default":"ALWAYS","description":"The bypass mode for the reviewer","enum":["ALWAYS","EXEMPT"],"type":"string"},"reviewer_id":{"description":"The ID of the team or role selected as a bypass reviewer","type":"integer"},"reviewer_type":{"description":"The type of the bypass reviewer","enum":["TEAM","ROLE"],"type":"string"}},"required":["reviewer_id","reviewer_type"],"type":"object"},"type":"array"}},"type":"object"},"secret_scanning_non_provider_patterns":{"description":"Use the `status` property to enable or disable secret scanning non-provider patterns for this repository. For more information, see \"[Supported secret scanning patterns](/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets).\"","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"},"secret_scanning_push_protection":{"description":"Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see \"[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning).\"","properties":{"status":{"description":"Can be `enabled` or `disabled`.","type":"string"}},"type":"object"}},"type":"object"},"squash_merge_commit_message":{"description":"The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","COMMIT_MESSAGES","BLANK"],"type":"string"},"squash_merge_commit_title":{"description":"Required when using `squash_merge_commit_message`.\n\nThe default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).","enum":["PR_TITLE","COMMIT_OR_PR_TITLE"],"type":"string"},"use_squash_pr_title_as_default":{"default":false,"deprecated":true,"description":"Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property is closing down. Please use `squash_merge_commit_title` instead.","type":"boolean"},"visibility":{"description":"The visibility of the repository.","enum":["public","private"],"type":"string"},"web_commit_signoff_required":{"default":false,"description":"Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/full-repository"}},"schema":{"$ref":"#/components/schemas/full-repository"}}},"description":"Response"},"307":{"$ref":"#/components/responses/temporary_redirect"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/list-artifacts-for-repo
path: /repos/{owner}/{repo}/actions/artifacts
method: GET
summary: List artifacts for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists all artifacts for a repository.

  Anyone with read access to the repository can use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/artifact-name"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact-paginated"}},"schema":{"properties":{"artifacts":{"items":{"$ref":"#/components/schemas/artifact"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","artifacts"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-artifact
path: /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
method: GET
summary: Get an artifact
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific artifact for a workflow run.

  Anyone with read access to the repository can use this endpoint.

  If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/artifact-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact"}},"schema":{"$ref":"#/components/schemas/artifact"}}},"description":"Response"}}


operation_id: actions/delete-artifact
path: /repos/{owner}/{repo}/actions/artifacts/{artifact_id}
method: DELETE
summary: Delete an artifact
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an artifact for a workflow run.
  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/artifact-id"}],"requestBody":null}


operation_id: actions/download-artifact
path: /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}
method: GET
summary: Download an artifact
auth_scheme_ref: GitHubBearerToken
description:
  Gets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for `Location:` in
  the response header to find the URL for the download. The `:archive_format` must be `zip`.

  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/artifact-id"},{"in":"path","name":"archive_format","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"302":{"description":"Response","headers":{"Location":{"$ref":"#/components/headers/location"}}},"410":{"$ref":"#/components/responses/gone"}}


operation_id: actions/get-actions-cache-retention-limit-for-repository
path: /repos/{owner}/{repo}/actions/cache/retention-limit
method: GET
summary: Get GitHub Actions cache retention limit for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if
  not manually removed or evicted due to size constraints.

  OAuth tokens and personal access tokens (classic) need the `admin:repository` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-retention-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-retention-limit-for-repository"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-actions-cache-retention-limit-for-repository
path: /repos/{owner}/{repo}/actions/cache/retention-limit
method: PUT
summary: Set GitHub Actions cache retention limit for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache retention limit for a repository. This determines how long caches will be retained for, if
  not manually removed or evicted due to size constraints.

  OAuth tokens and personal access tokens (classic) need the `admin:repository` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-retention-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-retention-limit-for-repository"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 186 characters]


operation_id: actions/get-actions-cache-storage-limit-for-repository
path: /repos/{owner}/{repo}/actions/cache/storage-limit
method: GET
summary: Get GitHub Actions cache storage limit for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache storage limit for a repository. This determines the maximum size of caches that can be
  stored before eviction occurs.

  OAuth tokens and personal access tokens (classic) need the `admin:repository` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-storage-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-storage-limit-for-repository"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-actions-cache-storage-limit-for-repository
path: /repos/{owner}/{repo}/actions/cache/storage-limit
method: PUT
summary: Set GitHub Actions cache storage limit for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache storage limit for a repository. This determines the maximum size of caches that can be
  stored before eviction occurs.

  OAuth tokens and personal access tokens (classic) need the `admin:repository` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-storage-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-storage-limit-for-repository"}}},"required":true}}

output_schema:
[cell repeats an earlier one in this file: 186 characters]


operation_id: actions/get-actions-cache-usage
path: /repos/{owner}/{repo}/actions/cache/usage
method: GET
summary: Get GitHub Actions cache usage for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache usage for a repository.
  The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated.

  Anyone with read access to the repository can use this endpoint.

  If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-usage"}},"schema":{"$ref":"#/components/schemas/actions-cache-usage-by-repository"}}},"description":"Response"}}


operation_id: actions/get-actions-cache-list
path: /repos/{owner}/{repo}/actions/caches
method: GET
summary: List GitHub Actions caches for a repository
auth_scheme_ref: GitHubBearerToken
description:
  Lists the GitHub Actions caches for a repository.

  OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/actions-cache-git-ref-full"},{"$ref":"#/components/parameters/actions-cache-key"},{"$ref":"#/components/parameters/actions-cache-list-sort"},{"$ref":"#/components/parameters/direction"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-list"}},"schema":{"$ref":"#/components/schemas/actions-cache-list"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


