# endpoints

operation_id: meta/root
path: /
method: GET
summary: GitHub API Root
description: Get Hypermedia links to resources accessible in GitHub's REST API
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/root"}},"schema":{"$ref":"#/components/schemas/root"}}},"description":"Response"}}


operation_id: security-advisories/list-global-advisories
path: /advisories
method: GET
summary: List global security advisories
auth_scheme_ref: GitHubBearerToken
description:
  Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.

  By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see "[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories)."

input_schema:
  {"parameters":[{"description":"If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.","in":"query","name":"ghsa_id","schema":{"type":"string"},"style":"form"},{"description":"If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.","in":"query","name":"type","schema":{"default":"reviewed","enum":["reviewed","malware","unreviewed"],"type":"string"},"style":"form"},{"description":"If specified, only advisories with this CVE (Common Vulnerabilities and Exposures) identifier will be returned.","in":"query","name":"cve_id","schema":{"type":"string"},"style":"form"},{"description":"If specified, only advisories for these ecosystems will be returned.","in":"query","name":"ecosystem","schema":{"$ref":"#/components/schemas/security-advisory-ecosystems"},"style":"form"},{"description":"If specified, only advisories with these severities will be returned.","in":"query","name":"severity","schema":{"enum":["unknown","low","medium","high","critical"],"type":"string"},"style":"form"},{"description":"If specified, only advisories with these Common Weakness Enumerations (CWEs) will be returned.\n\nExample: `cwes=79,284,22` or `cwes[]=79&cwes[]=284&cwes[]=22`","in":"query","name":"cwes","schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}]},"style":"form"},{"description":"Whether to only return advisories that have been withdrawn.","in":"query","name":"is_withdrawn","schema":{"type":"boolean"},"style":"form"},{"description":"If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.\nIf the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.\n\nExample: `affects=package1,package2@1.0.0,package3@2.0.0` or `affects[]=package1&affects[]=package2@1.0.0`","in":"query","name":"affects","schema":{"oneOf":[{"type":"string"},{"items":{"type":"string"},"maxItems":1000,"type":"array"}]},"style":"form"},{"description":"If specified, only return advisories that were published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"","in":"query","name":"published","schema":{"type":"string"},"style":"form"},{"description":"If specified, only return advisories that were updated on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"","in":"query","name":"updated","schema":{"type":"string"},"style":"form"},{"description":"If specified, only show advisories that were updated or published on a date or date range.\n\nFor more information on the syntax of the date range, see \"[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).\"","in":"query","name":"modified","schema":{"type":"string"},"style":"form"},{"description":"If specified, only return advisories that have an EPSS percentage score that matches the provided value.\nThe EPSS percentage represents the likelihood of a CVE being exploited.","in":"query","name":"epss_percentage","schema":{"type":"string"},"style":"form"},{"description":"If specified, only return advisories that have an EPSS percentile score that matches the provided value.\nThe EPSS percentile represents the relative rank of the CVE's likelihood of being exploited compared to other CVEs.","in":"query","name":"epss_percentile","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/direction"},{"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,"maximum":100,"minimum":1,"type":"integer"},"style":"form"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"published","enum":["updated","published","epss_percentage","epss_percentile"],"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-advisory-items"}},"schema":{"items":{"$ref":"#/components/schemas/global-advisory"},"type":"array"}}},"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed_simple"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Too many requests"}}


operation_id: security-advisories/get-global-advisory
path: /advisories/{ghsa_id}
method: GET
summary: Get a global security advisory
description: Gets a global security advisory using its GitHub Security Advisory (GHSA) identifier.
input_schema: {"parameters":[{"$ref":"#/components/parameters/ghsa_id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/global-advisory"}},"schema":{"$ref":"#/components/schemas/global-advisory"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: agent-tasks/list-tasks-for-repo
path: /agents/repos/{owner}/{repo}/tasks
method: GET
summary: List tasks for repository
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Returns a list of tasks for a specific repository

  **Fine-grained access tokens for "List tasks for repository"**

  This endpoint works with the following fine-grained token types:

  * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
  * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

  The fine-grained token must have the following permission set:

  * "Agent tasks" repository permissions (read)

  GitHub App installation access tokens are not supported for this endpoint.

input_schema:
  {"parameters":[{"description":"The account owner of the repository. The name is not case sensitive.","in":"path","name":"owner","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The name of the repository. The name is not case sensitive.","in":"path","name":"repo","required":true,"schema":{"type":"string"},"style":"simple"},{"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":"The page number of the results to fetch.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"},"style":"form"},{"description":"The field to sort results by. Can be `updated_at` or `created_at`.","in":"query","name":"sort","schema":{"default":"updated_at","enum":["updated_at","created_at"],"type":"string"},"style":"form"},{"description":"The direction to sort results. Can be `asc` or `desc`.","in":"query","name":"direction","schema":{"default":"desc","enum":["asc","desc"],"type":"string"},"style":"form"},{"description":"Comma-separated list of task states to filter by. Can be any combination of: `queued`, `in_progress`, `completed`, `failed`, `idle`, `waiting_for_user`, `timed_out`, `cancelled`.","in":"query","name":"state","schema":{"type":"string"},"style":"form"},{"description":"Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.","in":"query","name":"is_archived","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Only show tasks updated at or after this time (ISO 8601 timestamp)","in":"query","name":"since","schema":{"format":"date-time","type":"string"},"style":"form"},{"description":"Filter tasks by creator user ID. Accepts one or more user IDs.","in":"query","name":"creator_id","schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"tasks":[{"archived_at":null,"artifacts":[{"data":{"id":42},"provider":"github","type":"pull"}],"created_at":"2025-01-01T00:00:00Z","creator":{"id":1},"creator_type":"user","html_url":"https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890","id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"Fix the login button on the homepage","owner":{"id":1},"repository":{"id":1296269},"session_count":1,"state":"completed","updated_at":"2025-01-01T01:00:00Z","url":"https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"}]}}},"schema":{"properties":{"tasks":{"description":"List of tasks","items":{"properties":{"archived_at":{"description":"Timestamp when the task was archived, null if not archived","format":"date-time","nullable":true,"type":"string"},"artifacts":{"description":"Resources created by this task (PRs, branches, etc.)","items":{"description":"A resource generated by the task","properties":{"data":{"description":"Resource data (shape depends on type)","oneOf":[{"description":"A GitHub resource (pull request, issue, etc.)","properties":{"global_id":{"description":"GraphQL global ID","type":"string"},"id":{"description":"GitHub resource ID","format":"int64","type":"integer"}},"required":["id"],"type":"object"},{"description":"A Git branch reference","properties":{"base_ref":{"description":"Base branch name","type":"string"},"head_ref":{"description":"Head branch name","type":"string"}},"required":["head_ref","base_ref"],"type":"object"}]},"provider":{"description":"Provider namespace","enum":["github"],"type":"string"},"type":{"description":"Type of artifact. Available Values: `pull`, `branch`.\n","enum":["pull","branch"],"type":"string"}},"required":["provider","type","data"],"type":"object"},"type":"array"},"created_at":{"description":"Timestamp when the task was created","format":"date-time","type":"string"},"creator":{"description":"The entity who created this task","oneOf":[{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}]},"creator_type":{"description":"Type of the task creator","enum":["user","organization"],"type":"string"},"html_url":{"description":"Web URL for this task","type":"string"},"id":{"description":"Unique task identifier","type":"string"},"name":{"description":"Human-readable name derived from the task prompt","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"repository":{"description":"The repository this task belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"session_count":{"description":"Number of sessions in this task","format":"int32","type":"integer"},"state":{"description":"Current state of the task, derived from its most recent session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"updated_at":{"description":"Timestamp of the most recent update","format":"date-time","type":"string"},"url":{"description":"API URL for this task","type":"string"},"user_collaborators":{"deprecated":true,"description":"User objects of collaborators on this task","items":{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"required":["id","state","created_at"],"type":"object"},"type":"array"},"total_active_count":{"description":"Total count of active (non-archived) tasks","format":"int32","type":"integer"},"total_archived_count":{"description":"Total count of archived tasks","format":"int32","type":"integer"}},"required":["tasks"],"type":"object"}}},"description":"Tasks retrieved successfully","headers":{"Link":{"description":"Pagination links. Contains rel=\"first\" (always),\nrel=\"prev\" (when current page > 1),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n","example":"<https://api.github.com/agents/repos/{owner}/{repo}/tasks?page=2&per_page=30>; rel=\"next\", <https://api.github.com/agents/repos/{owner}/{repo}/tasks?page=1&per_page=30>; rel=\"first\"","schema":{"type":"string"},"style":"simple"}}},"400":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Insufficient permissions"},"404":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Resource not found"},"422":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Validation Failed"}}


operation_id: agent-tasks/create-task-in-repo
path: /agents/repos/{owner}/{repo}/tasks
method: POST
summary: Start a task
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Starts a new Copilot cloud agent task for a repository.

  This endpoint is only available to users with a Copilot Business or Copilot Enterprise subscription.

  **Fine-grained access tokens for "Start a task"**

  This endpoint works with the following fine-grained token types:

  * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
  * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

  The fine-grained token must have the following permission set:

  * "Agent tasks" repository permissions (read and write)

  GitHub App installation access tokens are not supported for this endpoint.

input_schema:
  {"parameters":[{"description":"The account owner of the repository. The name is not case sensitive.","in":"path","name":"owner","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The name of the repository. The name is not case sensitive.","in":"path","name":"repo","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"base_ref":"main","prompt":"Fix the login button on the homepage"}}},"schema":{"properties":{"base_ref":{"description":"Base ref for new branch/PR","type":"string"},"create_pull_request":{"default":false,"description":"Whether to create a PR.","type":"boolean"},"head_ref":{"description":"Head ref for existing branch/PR. If provided with `base_ref`, the agent looks up open PR context for `head_ref` targeting `base_ref` and commits to `head_ref` instead of creating a new branch.","type":"string"},"model":{"description":"The model to use for this task. The allowed models may change over time and depend on the user's GitHub Copilot plan and organization policies. Currently supported values: `claude-sonnet-4.6`, `claude-opus-4.6`, `gpt-5.2-codex`, `gpt-5.3-codex`, `gpt-5.4`, `claude-sonnet-4.5`, `claude-opus-4.5`","type":"string"},"prompt":{"description":"The user's prompt for the agent","type":"string"}},"required":["prompt"],"type":"object"}}},"description":"The task creation parameters, including the user's prompt and optional agent settings.","required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"value":{"archived_at":null,"artifacts":[],"created_at":"2025-01-01T00:00:00Z","creator":{"id":1},"creator_type":"user","html_url":"https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890","id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"Fix the login button on the homepage","owner":{"id":1},"repository":{"id":1296269},"session_count":1,"state":"queued","updated_at":"2025-01-01T00:00:00Z","url":"https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"schema":{"properties":{"archived_at":{"description":"Timestamp when the task was archived, null if not archived","format":"date-time","nullable":true,"type":"string"},"artifacts":{"description":"Resources created by this task (PRs, branches, etc.)","items":{"description":"A resource generated by the task","properties":{"data":{"description":"Resource data (shape depends on type)","oneOf":[{"description":"A GitHub resource (pull request, issue, etc.)","properties":{"global_id":{"description":"GraphQL global ID","type":"string"},"id":{"description":"GitHub resource ID","format":"int64","type":"integer"}},"required":["id"],"type":"object"},{"description":"A Git branch reference","properties":{"base_ref":{"description":"Base branch name","type":"string"},"head_ref":{"description":"Head branch name","type":"string"}},"required":["head_ref","base_ref"],"type":"object"}]},"provider":{"description":"Provider namespace","enum":["github"],"type":"string"},"type":{"description":"Type of artifact. Available Values: `pull`, `branch`.\n","enum":["pull","branch"],"type":"string"}},"required":["provider","type","data"],"type":"object"},"type":"array"},"created_at":{"description":"Timestamp when the task was created","format":"date-time","type":"string"},"creator":{"description":"The entity who created this task","oneOf":[{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}]},"creator_type":{"description":"Type of the task creator","enum":["user","organization"],"type":"string"},"html_url":{"description":"Web URL for this task","type":"string"},"id":{"description":"Unique task identifier","type":"string"},"name":{"description":"Human-readable name derived from the task prompt","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"repository":{"description":"The repository this task belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"session_count":{"description":"Number of sessions in this task","format":"int32","type":"integer"},"state":{"description":"Current state of the task, derived from its most recent session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"updated_at":{"description":"Timestamp of the most recent update","format":"date-time","type":"string"},"url":{"description":"API URL for this task","type":"string"},"user_collaborators":{"deprecated":true,"description":"User objects of collaborators on this task","items":{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"required":["id","state","created_at"],"type":"object"}}},"description":"Task created successfully"},"400":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Problems parsing JSON"},"401":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Insufficient permissions"},"422":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Validation Failed"}}


operation_id: agent-tasks/get-task-by-repo-and-id
path: /agents/repos/{owner}/{repo}/tasks/{task_id}
method: GET
summary: Get a task by repo
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Returns a task by ID scoped to an owner/repo path

  **Fine-grained access tokens for "Get a task by repo"**

  This endpoint works with the following fine-grained token types:

  * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
  * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

  The fine-grained token must have the following permission set:

  * "Agent tasks" repository permissions (read)

  GitHub App installation access tokens are not supported for this endpoint.

input_schema:
  {"parameters":[{"description":"The account owner of the repository. The name is not case sensitive.","in":"path","name":"owner","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The name of the repository. The name is not case sensitive.","in":"path","name":"repo","required":true,"schema":{"type":"string"},"style":"simple"},{"description":"The unique identifier of the task.","in":"path","name":"task_id","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"archived_at":null,"artifacts":[{"data":{"id":42},"provider":"github","type":"pull"}],"created_at":"2025-01-01T00:00:00Z","creator":{"id":1},"creator_type":"user","html_url":"https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890","id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"Fix the login button on the homepage","owner":{"id":1},"repository":{"id":1296269},"session_count":1,"sessions":[{"base_ref":"main","completed_at":"2025-01-01T01:00:00Z","created_at":"2025-01-01T00:00:00Z","head_ref":"copilot/fix-1","id":"s1a2b3c4-d5e6-7890-abcd-ef1234567890","model":"claude-sonnet-4.6","name":"Fix the login button on the homepage","owner":{"id":1},"prompt":"Fix the login button on the homepage","repository":{"id":1296269},"state":"completed","task_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","updated_at":"2025-01-01T01:00:00Z","user":{"id":1}}],"state":"completed","updated_at":"2025-01-01T01:00:00Z","url":"https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"schema":{"allOf":[{"properties":{"archived_at":{"description":"Timestamp when the task was archived, null if not archived","format":"date-time","nullable":true,"type":"string"},"artifacts":{"description":"Resources created by this task (PRs, branches, etc.)","items":{"description":"A resource generated by the task","properties":{"data":{"description":"Resource data (shape depends on type)","oneOf":[{"description":"A GitHub resource (pull request, issue, etc.)","properties":{"global_id":{"description":"GraphQL global ID","type":"string"},"id":{"description":"GitHub resource ID","format":"int64","type":"integer"}},"required":["id"],"type":"object"},{"description":"A Git branch reference","properties":{"base_ref":{"description":"Base branch name","type":"string"},"head_ref":{"description":"Head branch name","type":"string"}},"required":["head_ref","base_ref"],"type":"object"}]},"provider":{"description":"Provider namespace","enum":["github"],"type":"string"},"type":{"description":"Type of artifact. Available Values: `pull`, `branch`.\n","enum":["pull","branch"],"type":"string"}},"required":["provider","type","data"],"type":"object"},"type":"array"},"created_at":{"description":"Timestamp when the task was created","format":"date-time","type":"string"},"creator":{"description":"The entity who created this task","oneOf":[{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}]},"creator_type":{"description":"Type of the task creator","enum":["user","organization"],"type":"string"},"html_url":{"description":"Web URL for this task","type":"string"},"id":{"description":"Unique task identifier","type":"string"},"name":{"description":"Human-readable name derived from the task prompt","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"repository":{"description":"The repository this task belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"session_count":{"description":"Number of sessions in this task","format":"int32","type":"integer"},"state":{"description":"Current state of the task, derived from its most recent session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"updated_at":{"description":"Timestamp of the most recent update","format":"date-time","type":"string"},"url":{"description":"API URL for this task","type":"string"},"user_collaborators":{"deprecated":true,"description":"User objects of collaborators on this task","items":{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"required":["id","state","created_at"],"type":"object"},{"properties":{"sessions":{"description":"Sessions associated with this task","items":{"description":"Full session details within a task","properties":{"base_ref":{"description":"Base branch name","type":"string"},"completed_at":{"description":"Completion timestamp","format":"date-time","type":"string"},"created_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"error":{"description":"Error details for a failed session","properties":{"message":{"description":"Error message","type":"string"}},"type":"object"},"head_ref":{"description":"Head branch name","type":"string"},"id":{"description":"Session ID","type":"string"},"model":{"description":"Model used for this session","type":"string"},"name":{"description":"Session name","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"prompt":{"description":"Content of the triggering event","type":"string"},"repository":{"description":"The repository this session belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"state":{"description":"Current state of a session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"task_id":{"description":"Task ID this session belongs to","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"user":{"description":"The user who created this session","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}},"required":["id","state","created_at"],"type":"object"},"type":"array"}},"type":"object"}]}}},"description":"Task retrieved successfully"},"400":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Insufficient permissions"},"404":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Resource not found"},"422":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Validation Failed"}}


operation_id: agent-tasks/list-tasks
path: /agents/tasks
method: GET
summary: List tasks
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Returns a list of tasks for the authenticated user

  **Fine-grained access tokens for "List tasks"**

  This endpoint works with the following fine-grained token types:

  * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
  * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

  The fine-grained token must have the following permission set:

  * "Agent tasks" repository permissions (read)

  GitHub App installation access tokens are not supported for this endpoint.

input_schema:
  {"parameters":[{"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":"The page number of the results to fetch.","in":"query","name":"page","schema":{"default":1,"minimum":1,"type":"integer"},"style":"form"},{"description":"The field to sort results by. Can be `updated_at` or `created_at`.","in":"query","name":"sort","schema":{"default":"updated_at","enum":["updated_at","created_at"],"type":"string"},"style":"form"},{"description":"The direction to sort results. Can be `asc` or `desc`.","in":"query","name":"direction","schema":{"default":"desc","enum":["asc","desc"],"type":"string"},"style":"form"},{"description":"Comma-separated list of task states to filter by. Can be any combination of: `queued`, `in_progress`, `completed`, `failed`, `idle`, `waiting_for_user`, `timed_out`, `cancelled`.","in":"query","name":"state","schema":{"type":"string"},"style":"form"},{"description":"Filter by archived status. When `true`, returns only archived tasks. When `false` or omitted, returns only non-archived tasks. Defaults to `false`.","in":"query","name":"is_archived","schema":{"default":false,"type":"boolean"},"style":"form"},{"description":"Only show tasks updated at or after this time (ISO 8601 timestamp)","in":"query","name":"since","schema":{"format":"date-time","type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"tasks":[{"archived_at":null,"artifacts":[{"data":{"id":42},"provider":"github","type":"pull"}],"created_at":"2025-01-01T00:00:00Z","creator":{"id":1},"creator_type":"user","id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"Fix the login button on the homepage","owner":{"id":1},"repository":{"id":1296269},"session_count":1,"state":"completed","updated_at":"2025-01-01T01:00:00Z"}]}}},"schema":{"properties":{"tasks":{"description":"List of tasks","items":{"properties":{"archived_at":{"description":"Timestamp when the task was archived, null if not archived","format":"date-time","nullable":true,"type":"string"},"artifacts":{"description":"Resources created by this task (PRs, branches, etc.)","items":{"description":"A resource generated by the task","properties":{"data":{"description":"Resource data (shape depends on type)","oneOf":[{"description":"A GitHub resource (pull request, issue, etc.)","properties":{"global_id":{"description":"GraphQL global ID","type":"string"},"id":{"description":"GitHub resource ID","format":"int64","type":"integer"}},"required":["id"],"type":"object"},{"description":"A Git branch reference","properties":{"base_ref":{"description":"Base branch name","type":"string"},"head_ref":{"description":"Head branch name","type":"string"}},"required":["head_ref","base_ref"],"type":"object"}]},"provider":{"description":"Provider namespace","enum":["github"],"type":"string"},"type":{"description":"Type of artifact. Available Values: `pull`, `branch`.\n","enum":["pull","branch"],"type":"string"}},"required":["provider","type","data"],"type":"object"},"type":"array"},"created_at":{"description":"Timestamp when the task was created","format":"date-time","type":"string"},"creator":{"description":"The entity who created this task","oneOf":[{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}]},"creator_type":{"description":"Type of the task creator","enum":["user","organization"],"type":"string"},"html_url":{"description":"Web URL for this task","type":"string"},"id":{"description":"Unique task identifier","type":"string"},"name":{"description":"Human-readable name derived from the task prompt","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"repository":{"description":"The repository this task belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"session_count":{"description":"Number of sessions in this task","format":"int32","type":"integer"},"state":{"description":"Current state of the task, derived from its most recent session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"updated_at":{"description":"Timestamp of the most recent update","format":"date-time","type":"string"},"url":{"description":"API URL for this task","type":"string"},"user_collaborators":{"deprecated":true,"description":"User objects of collaborators on this task","items":{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"required":["id","state","created_at"],"type":"object"},"type":"array"},"total_active_count":{"description":"Total count of active (non-archived) tasks","format":"int32","type":"integer"},"total_archived_count":{"description":"Total count of archived tasks","format":"int32","type":"integer"}},"required":["tasks"],"type":"object"}}},"description":"Tasks retrieved successfully","headers":{"Link":{"description":"Pagination links. Contains rel=\"first\" (always),\nrel=\"next\" (when more pages exist), and rel=\"last\" (when on the final page).\n","example":"<https://api.github.com/agents/tasks?page=2&per_page=30>; rel=\"next\", <https://api.github.com/agents/tasks?page=1&per_page=30>; rel=\"first\"","schema":{"type":"string"},"style":"simple"}}},"400":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Insufficient permissions"},"422":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Validation Failed"}}


operation_id: agent-tasks/get-task-by-id
path: /agents/tasks/{task_id}
method: GET
summary: Get a task by ID
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Returns a task by ID with its associated sessions

  **Fine-grained access tokens for "Get a task by ID"**

  This endpoint works with the following fine-grained token types:

  * [GitHub App user access tokens](https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app)
  * [Fine-grained personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token)

  The fine-grained token must have the following permission set:

  * "Agent tasks" repository permissions (read)

  GitHub App installation access tokens are not supported for this endpoint.

input_schema:
  {"parameters":[{"description":"The unique identifier of the task.","in":"path","name":"task_id","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"archived_at":null,"artifacts":[{"data":{"id":42},"provider":"github","type":"pull"}],"created_at":"2025-01-01T00:00:00Z","creator":{"id":1},"creator_type":"user","html_url":"https://github.com/octocat/hello-world/copilot/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890","id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","name":"Fix the login button on the homepage","owner":{"id":1},"repository":{"id":1296269},"session_count":1,"sessions":[{"base_ref":"main","completed_at":"2025-01-01T01:00:00Z","created_at":"2025-01-01T00:00:00Z","head_ref":"copilot/fix-1","id":"s1a2b3c4-d5e6-7890-abcd-ef1234567890","model":"claude-sonnet-4.6","name":"Fix the login button on the homepage","owner":{"id":1},"prompt":"Fix the login button on the homepage","repository":{"id":1296269},"state":"completed","task_id":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","updated_at":"2025-01-01T01:00:00Z","user":{"id":1}}],"state":"completed","updated_at":"2025-01-01T01:00:00Z","url":"https://api.github.com/agents/repos/octocat/hello-world/tasks/a1b2c3d4-e5f6-7890-abcd-ef1234567890"}}},"schema":{"allOf":[{"properties":{"archived_at":{"description":"Timestamp when the task was archived, null if not archived","format":"date-time","nullable":true,"type":"string"},"artifacts":{"description":"Resources created by this task (PRs, branches, etc.)","items":{"description":"A resource generated by the task","properties":{"data":{"description":"Resource data (shape depends on type)","oneOf":[{"description":"A GitHub resource (pull request, issue, etc.)","properties":{"global_id":{"description":"GraphQL global ID","type":"string"},"id":{"description":"GitHub resource ID","format":"int64","type":"integer"}},"required":["id"],"type":"object"},{"description":"A Git branch reference","properties":{"base_ref":{"description":"Base branch name","type":"string"},"head_ref":{"description":"Head branch name","type":"string"}},"required":["head_ref","base_ref"],"type":"object"}]},"provider":{"description":"Provider namespace","enum":["github"],"type":"string"},"type":{"description":"Type of artifact. Available Values: `pull`, `branch`.\n","enum":["pull","branch"],"type":"string"}},"required":["provider","type","data"],"type":"object"},"type":"array"},"created_at":{"description":"Timestamp when the task was created","format":"date-time","type":"string"},"creator":{"description":"The entity who created this task","oneOf":[{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}]},"creator_type":{"description":"Type of the task creator","enum":["user","organization"],"type":"string"},"html_url":{"description":"Web URL for this task","type":"string"},"id":{"description":"Unique task identifier","type":"string"},"name":{"description":"Human-readable name derived from the task prompt","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"repository":{"description":"The repository this task belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"session_count":{"description":"Number of sessions in this task","format":"int32","type":"integer"},"state":{"description":"Current state of the task, derived from its most recent session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"updated_at":{"description":"Timestamp of the most recent update","format":"date-time","type":"string"},"url":{"description":"API URL for this task","type":"string"},"user_collaborators":{"deprecated":true,"description":"User objects of collaborators on this task","items":{"description":"A GitHub user","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"type":"array"}},"required":["id","state","created_at"],"type":"object"},{"properties":{"sessions":{"description":"Sessions associated with this task","items":{"description":"Full session details within a task","properties":{"base_ref":{"description":"Base branch name","type":"string"},"completed_at":{"description":"Completion timestamp","format":"date-time","type":"string"},"created_at":{"description":"Creation timestamp","format":"date-time","type":"string"},"error":{"description":"Error details for a failed session","properties":{"message":{"description":"Error message","type":"string"}},"type":"object"},"head_ref":{"description":"Head branch name","type":"string"},"id":{"description":"Session ID","type":"string"},"model":{"description":"Model used for this session","type":"string"},"name":{"description":"Session name","type":"string"},"owner":{"description":"The owner of the repository","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"},"prompt":{"description":"Content of the triggering event","type":"string"},"repository":{"description":"The repository this session belongs to","properties":{"id":{"description":"The unique identifier of the repository","format":"int64","type":"integer"}},"type":"object"},"state":{"description":"Current state of a session","enum":["queued","in_progress","completed","failed","idle","waiting_for_user","timed_out","cancelled"],"type":"string"},"task_id":{"description":"Task ID this session belongs to","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","type":"string"},"user":{"description":"The user who created this session","properties":{"id":{"description":"The unique identifier of the user","format":"int64","type":"integer"}},"type":"object"}},"required":["id","state","created_at"],"type":"object"},"type":"array"}},"type":"object"}]}}},"description":"Task retrieved successfully"},"400":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Problems parsing request"},"401":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Insufficient permissions"},"404":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Resource not found"},"422":{"content":{"application/json":{"schema":{"description":"Structured error response following GitHub REST API conventions.\nFor 422 Unprocessable Entity the errors array contains validation\ndetails; for other error status codes only message and\ndocumentation_url are returned.","properties":{"documentation_url":{"description":"URL to relevant API documentation","type":"string"},"errors":{"description":"List of validation errors (present only for 422 responses)","items":{"description":"A single validation error","properties":{"code":{"description":"Machine-readable error code","enum":["missing","missing_field","invalid","already_exists","unprocessable","custom"],"type":"string"},"message":{"description":"Human-readable message (populated when code is \"custom\")","type":"string"}},"required":["code"],"type":"object"},"type":"array"},"message":{"description":"Summary message (e.g. \"Validation Failed\", \"Not Found\")","type":"string"}},"required":["message","documentation_url"],"type":"object"}}},"description":"Validation Failed"}}


operation_id: apps/get-authenticated
path: /app
method: GET
summary: Get the authenticated app
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns the GitHub App associated with the authentication credentials used. To see how many app installations are associated with this GitHub App, see the `installations_count` in the response. For more details about your app's installations, see the "[List installations for the authenticated app](https://docs.github.com/rest/apps/apps#list-installations-for-the-authenticated-app)" endpoint.

  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/integration"}},"schema":{"$ref":"#/components/schemas/integration"}}},"description":"Response"}}


operation_id: apps/create-from-manifest
path: /app-manifests/{code}/conversions
method: POST
summary: Create a GitHub App from a manifest
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/apps/building-github-apps/creating-github-apps-from-a-manifest/). When you create a GitHub App with the manifest flow, you receive a temporary `code` used to retrieve the GitHub App's `id`, `pem` (private key), and `webhook_secret`.

input_schema:
  {"parameters":[{"in":"path","name":"code","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/integration-from-manifest"}},"schema":{"allOf":[{"$ref":"#/components/schemas/integration"},{"additionalProperties":true,"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"pem":{"type":"string"},"webhook_secret":{"nullable":true,"type":"string"}},"required":["client_id","client_secret","webhook_secret","pem"],"type":"object"}]}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: apps/get-webhook-config-for-app
path: /app/hook/config
method: GET
summary: Get a webhook configuration for an app
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."

  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/webhook-config"}},"schema":{"$ref":"#/components/schemas/webhook-config"}}},"description":"Response"}}


operation_id: apps/update-webhook-config-for-app
path: /app/hook/config
method: PATCH
summary: Update a webhook configuration for an app
auth_scheme_ref: GitHubBearerToken
description:
  Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)."

  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.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"content_type":"json","insecure_ssl":"0","secret":"********","url":"https://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"}}},"required":true}}

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


operation_id: apps/list-webhook-deliveries
path: /app/hook/deliveries
method: GET
summary: List deliveries for an app webhook
auth_scheme_ref: GitHubBearerToken
description:
  Returns a list of webhook deliveries for the webhook configured for a GitHub App.

  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.

input_schema:
  {"parameters":[{"$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: apps/get-webhook-delivery
path: /app/hook/deliveries/{delivery_id}
method: GET
summary: Get a delivery for an app webhook
input_schema: {"parameters":[{"$ref":"#/components/parameters/delivery-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns a delivery for the webhook configured for a GitHub App.

  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/hook-delivery"}},"schema":{"$ref":"#/components/schemas/hook-delivery"}}},"description":"Response"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: apps/redeliver-webhook-delivery
path: /app/hook/deliveries/{delivery_id}/attempts
method: POST
summary: Redeliver a delivery for an app webhook
input_schema: {"parameters":[{"$ref":"#/components/parameters/delivery-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Redeliver a delivery for the webhook configured for a GitHub App.

  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:
  {"202":{"$ref":"#/components/responses/accepted"},"400":{"$ref":"#/components/responses/bad_request"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: apps/list-installation-requests-for-authenticated-app
path: /app/installation-requests
method: GET
summary: List installation requests for the authenticated app
description: Lists all the pending installation requests for the authenticated GitHub App.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"exampleKey1":{"$ref":"#/components/examples/integration-installation-request-paginated"}},"schema":{"items":{"$ref":"#/components/schemas/integration-installation-request"},"type":"array"}}},"description":"List of integration installation requests"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"}}


operation_id: apps/list-installations
path: /app/installations
method: GET
summary: List installations for the authenticated app
auth_scheme_ref: GitHubBearerToken
description:
  The permissions the installation has are included under the `permissions` key.

  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/since"},{"in":"query","name":"outdated","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/base-installation-items"}},"schema":{"items":{"$ref":"#/components/schemas/installation"},"type":"array"}}},"description":"The permissions the installation has are included under the `permissions` key.","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


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

  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/base-installation"}},"schema":{"$ref":"#/components/schemas/installation"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: apps/delete-installation
path: /app/installations/{installation_id}
method: DELETE
summary: Delete an installation for the authenticated app
input_schema: {"parameters":[{"$ref":"#/components/parameters/installation-id"}],"requestBody":null}
output_schema: {"202":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Uninstalls a GitHub App on a user, organization, or enterprise account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/apps/apps#suspend-an-app-installation)" endpoint.

  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.


operation_id: apps/create-installation-access-token
path: /app/installations/{installation_id}/access_tokens
method: POST
summary: Create an installation access token for an app
auth_scheme_ref: GitHubBearerToken
description:
  Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.

  > [!NOTE]
  > Starting April 27, 2026, GitHub began a staged rollout of a stateless format (`ghs_APPID_JWT`) to all newly minted GitHub App installation tokens, making them more performant and improving the reliability of our API surface. If your application expects or relies on installation tokens being exactly 40 characters long, it may not handle this new token format correctly. You can now validate your apps and workflows using a temporary request header that lets you enable the token format on demand. For more information about the temporary header, see [the GitHub blog](https://github.blog/changelog/2026-05-15-github-app-installation-tokens-per-request-override-header).

  Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.

  Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.

  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.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/installation-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"permissions":{"contents":"read","issues":"write"},"repositories":["Hello-World"]}}},"schema":{"properties":{"permissions":{"$ref":"#/components/schemas/app-permissions"},"repositories":{"description":"List of repository names that the token should have access to","items":{"example":"rails","type":"string"},"type":"array"},"repository_ids":{"description":"List of repository IDs that the token should have access to","example":[1],"items":{"type":"integer"},"type":"array"}},"type":"object"}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/installation-token"}},"schema":{"$ref":"#/components/schemas/installation-token"}}},"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: apps/suspend-installation
path: /app/installations/{installation_id}/suspended
method: PUT
summary: Suspend an app installation
input_schema: {"parameters":[{"$ref":"#/components/parameters/installation-id"}],"requestBody":null}
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Suspends a GitHub App on a user, organization, or enterprise account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account.

  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.


operation_id: apps/unsuspend-installation
path: /app/installations/{installation_id}/suspended
method: DELETE
summary: Unsuspend an app installation
input_schema: {"parameters":[{"$ref":"#/components/parameters/installation-id"}],"requestBody":null}
output_schema: {"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a GitHub App installation suspension.

  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.


operation_id: apps/delete-authorization
path: /applications/{client_id}/grant
method: DELETE
summary: Delete an app authorization
output_schema: {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}
auth_scheme_ref: GitHubBearerToken
description:
  OAuth and GitHub application owners can revoke a grant for their application and a specific user. You must provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted.
  Deleting an application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/client-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}}},"schema":{"properties":{"access_token":{"description":"The OAuth access token used to authenticate to the GitHub API.","type":"string"}},"required":["access_token"],"type":"object"}}},"required":true}}


operation_id: apps/check-token
path: /applications/{client_id}/token
method: POST
summary: Check a token
auth_scheme_ref: GitHubBearerToken
description:
  OAuth applications and GitHub applications with OAuth authorizations can use this API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. Invalid tokens will return `404 NOT FOUND`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/client-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}}},"schema":{"properties":{"access_token":{"description":"The access_token of the OAuth or GitHub application.","type":"string"}},"required":["access_token"],"type":"object"}}},"required":true}}

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


operation_id: apps/delete-token
path: /applications/{client_id}/token
method: DELETE
summary: Delete an app token
output_schema: {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed"}}
auth_scheme_ref: GitHubBearerToken
description:
  OAuth  or GitHub application owners can revoke a single token for an OAuth application or a GitHub application with an OAuth authorization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/client-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}}},"schema":{"properties":{"access_token":{"description":"The OAuth access token used to authenticate to the GitHub API.","type":"string"}},"required":["access_token"],"type":"object"}}},"required":true}}


operation_id: apps/reset-token
path: /applications/{client_id}/token
method: PATCH
summary: Reset a token
auth_scheme_ref: GitHubBearerToken
description:
  OAuth applications and GitHub applications with OAuth authorizations can use this API method to reset a valid OAuth token without end-user involvement. Applications must save the "token" property in the response because changes take effect immediately. Invalid tokens will return `404 NOT FOUND`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/client-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a"}}},"schema":{"properties":{"access_token":{"description":"The access_token of the OAuth or GitHub application.","type":"string"}},"required":["access_token"],"type":"object"}}},"required":true}}

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


operation_id: apps/scope-token
path: /applications/{client_id}/token/scoped
method: POST
summary: Create a scoped access token
auth_scheme_ref: GitHubBearerToken
description:
  Use a non-scoped user access token to create a repository-scoped and/or permission-scoped user access token. You can specify
  which repositories the token can access and which permissions are granted to the
  token.

  Invalid tokens will return `404 NOT FOUND`.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/client-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a","permissions":{"contents":"read","issues":"write","metadata":"read"},"target":"octocat"}}},"schema":{"properties":{"access_token":{"description":"The access token used to authenticate to the GitHub API.","example":"e72e16c7e42f292c6912e7710c838347ae178b4a","type":"string"},"permissions":{"$ref":"#/components/schemas/app-permissions"},"repositories":{"description":"The list of repository names to scope the user access token to. `repositories` may not be specified if `repository_ids` is specified.","items":{"example":"rails","type":"string"},"type":"array"},"repository_ids":{"description":"The list of repository IDs to scope the user access token to. `repository_ids` may not be specified if `repositories` is specified.","example":[1],"items":{"type":"integer"},"type":"array"},"target":{"description":"The name of the user or organization to scope the user access token to. **Required** unless `target_id` is specified.","example":"octocat","type":"string"},"target_id":{"description":"The ID of the user or organization to scope the user access token to. **Required** unless `target` is specified.","example":1,"type":"integer"}},"required":["access_token"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/scope-token"}},"schema":{"$ref":"#/components/schemas/authorization"}}},"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: apps/get-by-slug
path: /apps/{app_slug}
method: GET
summary: Get an app
input_schema: {"parameters":[{"$ref":"#/components/parameters/app-slug"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`).

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


operation_id: classroom/get-an-assignment
path: /assignments/{assignment_id}
method: GET
summary: Get an assignment
input_schema: {"parameters":[{"$ref":"#/components/parameters/assignment-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets a GitHub Classroom assignment. Assignment will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

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


operation_id: classroom/list-accepted-assignments-for-an-assignment
path: /assignments/{assignment_id}/accepted_assignments
method: GET
summary: List accepted assignments for an assignment
auth_scheme_ref: GitHubBearerToken
description:
  Lists any assignment repositories that have been created by students accepting a GitHub Classroom assignment. Accepted assignments will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/classroom-accepted-assignment"}},"schema":{"items":{"$ref":"#/components/schemas/classroom-accepted-assignment"},"type":"array"}}},"description":"Response"}}


operation_id: classroom/get-assignment-grades
path: /assignments/{assignment_id}/grades
method: GET
summary: Get assignment grades
input_schema: {"parameters":[{"$ref":"#/components/parameters/assignment-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets grades for a GitHub Classroom assignment. Grades will only be returned if the current user is an administrator of the GitHub Classroom for the assignment.

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


operation_id: classroom/list-classrooms
path: /classrooms
method: GET
summary: List classrooms
auth_scheme_ref: GitHubBearerToken
description:
  Lists GitHub Classroom classrooms for the current user. Classrooms will only be returned if the current user is an administrator of one or more GitHub Classrooms.

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

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


operation_id: classroom/get-a-classroom
path: /classrooms/{classroom_id}
method: GET
summary: Get a classroom
input_schema: {"parameters":[{"$ref":"#/components/parameters/classroom-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets a GitHub Classroom classroom for the current user. Classroom will only be returned if the current user is an administrator of the GitHub Classroom.

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


operation_id: classroom/list-assignments-for-a-classroom
path: /classrooms/{classroom_id}/assignments
method: GET
summary: List assignments for a classroom
auth_scheme_ref: GitHubBearerToken
description:
  Lists GitHub Classroom assignments for a classroom. Assignments will only be returned if the current user is an administrator of the GitHub Classroom.

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

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


operation_id: codes-of-conduct/get-all-codes-of-conduct
path: /codes_of_conduct
method: GET
summary: Get all codes of conduct
description: Returns array of all GitHub's codes of conduct.
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/code-of-conduct-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/code-of-conduct"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: codes-of-conduct/get-conduct-code
path: /codes_of_conduct/{key}
method: GET
summary: Get a code of conduct
description: Returns information about the specified GitHub code of conduct.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


operation_id: credentials/revoke
path: /credentials/revoke
method: POST
summary: Revoke a list of credentials
auth_scheme_ref: GitHubBearerToken
description:
  Submit a list of credentials to be revoked. This endpoint is intended to revoke credentials the caller does not own and may have found exposed on GitHub.com or elsewhere. It can also be used for credentials associated with an old user account that you no longer have access to. Credential owners will be notified of the revocation.

  This endpoint currently accepts the following credential types:
  - Personal access tokens (classic) (`ghp_`)
  - Fine-grained personal access tokens (`github_pat_`)
  - OAuth app access tokens (`gho_`)
  - User-to-server tokens from GitHub Apps (`ghu_`)
  - Refresh tokens from GitHub Apps (`ghr_`)


  Revoked credentials may impact users on GitHub Free, Pro, & Team and GitHub Enterprise Cloud, and GitHub Enterprise Cloud with Enterprise Managed Users.
  GitHub cannot reactivate any credentials that have been revoked; new credentials will need to be generated.

  To prevent abuse, this API is limited to only 60 unauthenticated requests per hour and a max of 1000 tokens per API request.

  > [!NOTE]
  > Any authenticated requests will return a 403.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"credentials":["ghp_1234567890abcdef1234567890abcdef12345678","github_pat_0A1B2C3D4E5F6G7H8I9J0K_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456","gho_1234567890abcdef1234567890abcdef12345678","ghu_1234567890abcdef1234567890abcdef12345678","ghr_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab"]}}},"schema":{"properties":{"credentials":{"description":"A list of credentials to be revoked, up to 1000 per request.","items":{"type":"string"},"maxItems":1000,"minItems":1,"type":"array"}},"required":["credentials"],"type":"object"}}},"required":true}}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"422":{"$ref":"#/components/responses/validation_failed_simple"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: emojis/get
path: /emojis
method: GET
summary: Get emojis
description: Lists all the emojis available to use on GitHub.
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/emojis-get"}},"schema":{"additionalProperties":{"type":"string"},"type":"object"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: actions/get-actions-cache-retention-limit-for-enterprise
path: /enterprises/{enterprise}/actions/cache/retention-limit
method: GET
summary: Get GitHub Actions cache retention limit for an enterprise
input_schema: {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this
  enterprise may not set a higher cache retention limit.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-retention-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-retention-limit-for-enterprise"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-actions-cache-retention-limit-for-enterprise
path: /enterprises/{enterprise}/actions/cache/retention-limit
method: PUT
summary: Set GitHub Actions cache retention limit for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache retention limit for an enterprise. All organizations and repositories under this
  enterprise may not set a higher cache retention limit.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-retention-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-retention-limit-for-enterprise"}}},"required":true}}

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


operation_id: actions/get-actions-cache-storage-limit-for-enterprise
path: /enterprises/{enterprise}/actions/cache/storage-limit
method: GET
summary: Get GitHub Actions cache storage limit for an enterprise
input_schema: {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this
  enterprise may not set a higher cache storage limit.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-cache-storage-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-storage-limit-for-enterprise"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-actions-cache-storage-limit-for-enterprise
path: /enterprises/{enterprise}/actions/cache/storage-limit
method: PUT
summary: Set GitHub Actions cache storage limit for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache storage limit for an enterprise. All organizations and repositories under this
  enterprise may not set a higher cache storage limit.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-storage-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-storage-limit-for-enterprise"}}},"required":true}}

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


operation_id: oidc/list-oidc-custom-property-inclusions-for-enterprise
path: /enterprises/{enterprise}/actions/oidc/customization/properties/repo
method: GET
summary: List OIDC custom property inclusions for an enterprise
input_schema: {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repository custom properties that are included in the OIDC token for repository actions in an enterprise.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":[{"custom_property_name":"environment","inclusion_source":"enterprise"},{"custom_property_name":"team","inclusion_source":"enterprise"}]}},"schema":{"items":{"$ref":"#/components/schemas/oidc-custom-property-inclusion"},"type":"array"}}},"description":"A JSON array of OIDC custom property inclusions"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: oidc/create-oidc-custom-property-inclusion-for-enterprise
path: /enterprises/{enterprise}/actions/oidc/customization/properties/repo
method: POST
summary: Create an OIDC custom property inclusion for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository custom property to be included in the OIDC token for repository actions in an enterprise.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/oidc-custom-property-inclusion"}},"schema":{"$ref":"#/components/schemas/oidc-custom-property-inclusion-input"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/oidc-custom-property-inclusion"}},"schema":{"$ref":"#/components/schemas/oidc-custom-property-inclusion"}}},"description":"OIDC custom property inclusion created"},"400":{"description":"Invalid input"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"description":"Property inclusion already exists"}}


operation_id: oidc/delete-oidc-custom-property-inclusion-for-enterprise
path: /enterprises/{enterprise}/actions/oidc/customization/properties/repo/{custom_property_name}
method: DELETE
summary: Delete an OIDC custom property inclusion for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository custom property from being included in the OIDC token for repository actions in an enterprise.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"description":"The name of the custom property to remove from OIDC token inclusion","in":"path","name":"custom_property_name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"OIDC custom property inclusion deleted"},"400":{"description":"Invalid input"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"description":"Property inclusion not found"}}


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

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"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/enterprise-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-for-enterprise
path: /enterprises/{enterprise}/code-security/configurations
method: POST
summary: Create a code security configuration for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Creates a code security configuration in an enterprise.

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"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-enterprise","name":"High rish 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":"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":{"default":"disabled","description":"The enablement status of Dependabot alerts","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 enterprise.","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":{"default":"disabled","description":"The enablement status of secret scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_extended_metadata":{"default":"disabled","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/enterprise-code-security-configuration"}},"schema":{"$ref":"#/components/schemas/code-security-configuration"}}},"description":"Successfully created code security configuration"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


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

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `read:enterprise` 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"}}


operation_id: code-security/get-single-configuration-for-enterprise
path: /enterprises/{enterprise}/code-security/configurations/{configuration_id}
method: GET
summary: Retrieve a code security configuration of an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Gets a code security configuration available in an enterprise.

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

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

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/enterprise-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-for-enterprise
path: /enterprises/{enterprise}/code-security/configurations/{configuration_id}
method: DELETE
summary: Delete a code security configuration for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a code security configuration from an enterprise.
  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 for the enterprise to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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-enterprise-configuration
path: /enterprises/{enterprise}/code-security/configurations/{configuration_id}
method: PATCH
summary: Update a custom code security configuration for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Updates a code security configuration in an enterprise.

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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-enterprise 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_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 across the enterprise.","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":{"default":"disabled","description":"The enablement status of secret scanning delegated alert dismissal","enum":["enabled","disabled","not_set"],"type":"string"},"secret_scanning_extended_metadata":{"default":"disabled","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":{"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/enterprise-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"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: code-security/attach-enterprise-configuration
path: /enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach
method: POST
summary: Attach an enterprise configuration to repositories
auth_scheme_ref: GitHubBearerToken
description:
  Attaches an enterprise code security configuration to 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 for the enterprise to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/configuration-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example for attaching a configuration to some repositories","value":{"scope":"all"}}},"schema":{"additionalProperties":false,"properties":{"scope":{"description":"The type of repositories to attach the configuration to.","enum":["all","all_without_configurations"],"type":"string"}},"required":["scope"],"type":"object"}}},"required":true}}

output_schema:
  {"202":{"$ref":"#/components/responses/accepted"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"}}


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

  This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.

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

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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-enterprise-configuration
path: /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories
method: GET
summary: Get repositories associated with an enterprise code security configuration
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repositories associated with an enterprise code security configuration in an organization.

  The authenticated user must be an administrator of the enterprise in order to use this endpoint.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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`, `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: copilot/copilot-enterprise-one-day-usage-metrics
path: /enterprises/{enterprise}/copilot/metrics/reports/enterprise-1-day
method: GET
summary: Get Copilot enterprise usage metrics for a specific day
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the Copilot enterprise usage metrics report for a specific day. The report provides comprehensive usage data for Copilot features across the enterprise.

  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. Reports are available starting from October 10, 2025, and historical data can be accessed for up to 1 year from the current date.

  Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


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

  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.

  Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.

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-enterprise-user-teams-one-day-report
path: /enterprises/{enterprise}/copilot/metrics/reports/user-teams-1-day
method: GET
summary: Get Copilot enterprise user-teams report for a specific day
auth_scheme_ref: GitHubBearerToken
description:
  Use this endpoint to retrieve download links for the Copilot enterprise user-teams report for a specific day. The report provides user-team join data for Copilot across the enterprise, 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 enterprise 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.

  Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


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

  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. Reports are available starting from October 10, 2025, and historical data can be accessed for up to 1 year from the current date.

  Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


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

  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.

  Enterprise owners, billing managers, and authorized users with fine-grained "View Enterprise Copilot Metrics" permission can retrieve Copilot metrics reports for the enterprise. OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint.

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/set-enterprise-coding-agent-policy
path: /enterprises/{enterprise}/copilot/policies/coding_agent
method: PUT
summary: Set the coding agent policy for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Sets the policy for Copilot cloud agent usage across an enterprise.

  Enterprise owners can configure whether Copilot cloud agent is enabled for all
  organizations, disabled for all organizations, configured by individual organization
  admins, or enabled for selected organizations only.

  Only enterprise owners can set the coding agent policy for their enterprise.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Enable coding agent for all organizations","value":{"policy_state":"enabled_for_all_orgs"}}},"schema":{"properties":{"policy_state":{"description":"The policy state for Copilot cloud agent in the enterprise. Can be one of `enabled_for_all_orgs`, `disabled_for_all_orgs`, `enabled_for_selected_orgs`, or `configured_by_org_admins`.","enum":["enabled_for_all_orgs","disabled_for_all_orgs","enabled_for_selected_orgs","configured_by_org_admins"],"type":"string"}},"required":["policy_state"],"type":"object"}}},"description":"The coding agent policy configuration","required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"400":{"$ref":"#/components/responses/bad_request"}}


operation_id: copilot/add-organizations-to-enterprise-coding-agent-policy
path: /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
method: POST
summary: Add organizations to the enterprise coding agent policy
auth_scheme_ref: GitHubBearerToken
description:
  Enables Copilot cloud agent for the specified organizations within the enterprise.

  The enterprise's coding agent policy must be set to `enabled_for_selected_orgs` before
  using this endpoint. Organizations can be specified by login or matched via custom properties.

  Only organizations that have Copilot enabled and belong to the enterprise will be affected.

  Only enterprise owners can add organizations to the coding agent policy.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Add organizations that match a login or have a custom property","value":{"custom_properties":[{"property_name":"department","values":["engineering","security"]}],"organizations":["my-org-1","my-org-2"]}}},"schema":{"properties":{"custom_properties":{"description":"List of custom property filters to match organizations. Organizations matching any of the specified property name/value pairs will be included. This is a one-time operation, setting the property on an organization in the future will not automatically update its coding agent policy.","items":{"properties":{"property_name":{"description":"The name of the custom property to filter by.","type":"string"},"values":{"description":"The values of the custom property to match.","items":{"type":"string"},"type":"array"}},"required":["property_name","values"],"type":"object"},"type":"array"},"organizations":{"description":"List of organization logins within the enterprise to enable Copilot cloud agent for.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"The organizations to enable Copilot cloud agent for","required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"400":{"$ref":"#/components/responses/bad_request"}}


operation_id: copilot/remove-organizations-from-enterprise-coding-agent-policy
path: /enterprises/{enterprise}/copilot/policies/coding_agent/organizations
method: DELETE
summary: Remove organizations from the enterprise coding agent policy
auth_scheme_ref: GitHubBearerToken
description:
  Disables Copilot cloud agent for the specified organizations within the enterprise.

  The enterprise's coding agent policy must be set to `enabled_for_selected_orgs` before
  using this endpoint. Organizations can be specified by login or matched via custom properties.

  Only organizations that have Copilot enabled and belong to the enterprise will be affected.

  Only enterprise owners can remove organizations from the coding agent policy.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Remove organizations that match a login or have a custom property","value":{"custom_properties":[{"property_name":"department","values":["engineering","security"]}],"organizations":["my-org-1","my-org-2"]}}},"schema":{"properties":{"custom_properties":{"description":"List of custom property filters to match organizations. Organizations matching any of the specified property name/value pairs will be included. This is a one-time operation, setting the property on an organization in the future will not automatically update its coding agent policy.","items":{"properties":{"property_name":{"description":"The name of the custom property to filter by.","type":"string"},"values":{"description":"The values of the custom property to match.","items":{"type":"string"},"type":"array"}},"required":["property_name","values"],"type":"object"},"type":"array"},"organizations":{"description":"List of organization logins within the enterprise to disable Copilot cloud agent for.","items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"The organizations to disable Copilot cloud agent for","required":true}}

output_schema:
  {"204":{"$ref":"#/components/responses/no_content"},"400":{"$ref":"#/components/responses/bad_request"}}


operation_id: dependabot/list-alerts-for-enterprise
path: /enterprises/{enterprise}/dependabot/alerts
method: GET
summary: List Dependabot alerts for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Lists Dependabot alerts for repositories that are owned by the specified enterprise.

  The authenticated user must be a member of the enterprise to use this endpoint.

  Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, 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)."

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$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-has"},{"$ref":"#/components/parameters/dependabot-alert-comma-separated-assignees"},{"$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"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: dependabot/repository-access-for-enterprise
path: /enterprises/{enterprise}/dependabot/repository-access
method: GET
summary: Lists the repositories Dependabot can access in an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories that enterprise admins have allowed Dependabot to access when updating dependencies across organizations in the enterprise.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"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-enterprise
path: /enterprises/{enterprise}/dependabot/repository-access
method: PATCH
summary: Updates Dependabot's repository access list for an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Updates repositories according to the list of repositories that enterprise admins have given Dependabot access to when they've updated dependencies across organizations in the enterprise.

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

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"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:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: dependabot/set-repository-access-default-level-for-enterprise
path: /enterprises/{enterprise}/dependabot/repository-access/default-level
method: PUT
summary: Set the default repository access level for Dependabot in an enterprise
auth_scheme_ref: GitHubBearerToken
description:
  Sets the default level of repository access Dependabot will have while performing an update across organizations in the enterprise. 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.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"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:
  {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: enterprise-teams/list
path: /enterprises/{enterprise}/teams
method: GET
summary: List enterprise teams
description: List all teams in the enterprise for the authenticated user
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: enterprise-teams/create
path: /enterprises/{enterprise}/teams
method: POST
summary: Create an enterprise team
description: To create an enterprise team, the authenticated user must be an owner of the enterprise.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"A great team.","group_id":"62ab9291-fae2-468e-974b-7e45096d5021","name":"Justice League"}}},"schema":{"properties":{"description":{"description":"A description of the team.","nullable":true,"type":"string"},"group_id":{"description":"The ID of the IdP group to assign team membership with. You can get this value from the [REST API endpoints for SCIM](https://docs.github.com/rest/scim#list-provisioned-scim-groups-for-an-enterprise).","nullable":true,"type":"string"},"name":{"description":"The name of the team.","type":"string"},"notification_setting":{"description":"The notification setting the team is set to. The options are:\n\n* `notifications_enabled` - team members receive notifications when the team is @mentioned.\n* `notifications_disabled` - no one receives notifications.\n\nDefault: `notifications_enabled`\n","enum":["notifications_enabled","notifications_disabled"],"type":"string"},"organization_selection_type":{"default":"disabled","description":"Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`.\n`disabled`: The team is not assigned to any organizations. This is the default when you create a new team.\n`selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments) endpoint.\n`all`: The team is assigned to all current and future organizations in the enterprise.\n","enum":["disabled","selected","all"],"type":"string"},"sync_to_organizations":{"default":"disabled","description":"Retired: this field is no longer supported.\nWhether the enterprise team should be reflected in each organization.\nThis value cannot be set.\n","enum":["all","disabled"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/enterprise-teams-item"}},"schema":{"$ref":"#/components/schemas/enterprise-team"}}},"description":"Response"}}


operation_id: enterprise-team-memberships/list
path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships
method: GET
summary: List members in an enterprise team
description: Lists all team members in an enterprise team.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$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: enterprise-team-memberships/bulk-add
path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add
method: POST
summary: Bulk add team members
description: Add multiple team members to an enterprise team.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"usernames":["monalisa","octocat"]}}},"schema":{"properties":{"usernames":{"description":"The GitHub user handles to add to the team.","items":{"description":"The handle for the GitHub user account.","type":"string"},"type":"array"}},"required":["usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Successfully added team members."}}


operation_id: enterprise-team-memberships/bulk-remove
path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove
method: POST
summary: Bulk remove team members
description: Remove multiple team members from an enterprise team.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"usernames":["monalisa","octocat"]}}},"schema":{"properties":{"usernames":{"description":"The GitHub user handles to be removed from the team.","items":{"description":"The handle for the GitHub user account.","type":"string"},"type":"array"}},"required":["usernames"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/simple-user-items"}},"schema":{"items":{"$ref":"#/components/schemas/simple-user"},"type":"array"}}},"description":"Successfully removed team members."}}


operation_id: enterprise-team-memberships/get
path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}
method: GET
summary: Get enterprise team membership
description: Returns whether the user is a member of the enterprise team.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"exampleKey1":{"$ref":"#/components/examples/simple-user"}},"schema":{"$ref":"#/components/schemas/simple-user"}}},"description":"User is a member of the enterprise team."}}


operation_id: enterprise-team-memberships/add
path: /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}
method: PUT
summary: Add team member
description: Add a team member to an enterprise team.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$ref":"#/components/parameters/username"}],"requestBody":null}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"exampleKey1":{"$ref":"#/components/examples/simple-user"}},"schema":{"$ref":"#/components/schemas/simple-user"}}},"description":"Successfully added team member"}}


operation_id: enterprise-team-organizations/get-assignments
path: /enterprises/{enterprise}/teams/{enterprise-team}/organizations
method: GET
summary: Get organization assignments
description: Get all organizations assigned to an enterprise team
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple"}},"schema":{"items":{"$ref":"#/components/schemas/organization-simple"},"type":"array"}}},"description":"An array of organizations the team is assigned to"}}


operation_id: enterprise-team-organizations/bulk-add
path: /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add
method: POST
summary: Add organization assignments
description: Assign an enterprise team to multiple organizations.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"organization_slugs":["github"]}}},"schema":{"properties":{"organization_slugs":{"description":"Organization slug to assign the team to.","items":{"description":"Organization slug to assign the team to","type":"string"},"type":"array"}},"required":["organization_slugs"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/organization-simple"},"type":"array"}}},"description":"Successfully assigned the enterprise team to organizations."}}


operation_id: enterprise-team-organizations/bulk-remove
path: /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove
method: POST
summary: Remove organization assignments
description: Unassign an enterprise team from multiple organizations.
output_schema: {"204":{"description":"Successfully unassigned the enterprise team from organizations."}}
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"organization_slugs":["github"]}}},"schema":{"properties":{"organization_slugs":{"description":"Organization slug to unassign the team from.","items":{"description":"Organization slug to unassign the team from","type":"string"},"type":"array"}},"required":["organization_slugs"],"type":"object"}}},"required":true}}


operation_id: enterprise-team-organizations/get-assignment
path: /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
method: GET
summary: Get organization assignment
description: Check if an enterprise team is assigned to an organization
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple"}},"schema":{"$ref":"#/components/schemas/organization-simple"}}},"description":"The team is assigned to the organization"},"404":{"description":"The team is not assigned to the organization"}}


operation_id: enterprise-team-organizations/add
path: /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
method: PUT
summary: Add an organization assignment
description: Assign an enterprise team to an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/enterprise-team"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple"}},"schema":{"$ref":"#/components/schemas/organization-simple"}}},"description":"Successfully assigned the enterprise team to the organization."}}


operation_id: enterprise-teams/get
path: /enterprises/{enterprise}/teams/{team_slug}
method: GET
summary: Get an enterprise team
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 and adds the "ent:" prefix. For example, "My TEam Näme" would become `ent:my-team-name`.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/enterprise-teams-item"}},"schema":{"$ref":"#/components/schemas/enterprise-team"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: enterprise-teams/delete
path: /enterprises/{enterprise}/teams/{team_slug}
method: DELETE
summary: Delete an enterprise team
output_schema: {"204":{"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"}}
auth_scheme_ref: GitHubBearerToken
description:
  To delete an enterprise team, the authenticated user must be an enterprise owner.

  If you are an enterprise owner, deleting an enterprise team will delete all of its IdP mappings as well.

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


operation_id: enterprise-teams/update
path: /enterprises/{enterprise}/teams/{team_slug}
method: PATCH
summary: Update an enterprise team
description: To edit a team, the authenticated user must be an enterprise owner.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/enterprise"},{"$ref":"#/components/parameters/team-slug"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"A great team.","group_id":"62ab9291-fae2-468e-974b-7e45096d5021","name":"Justice League"}}},"schema":{"properties":{"description":{"description":"A new description for the team.","nullable":true,"type":"string"},"group_id":{"description":"The ID of the IdP group to assign team membership with. The new IdP group will replace the existing one, or replace existing direct members if the team isn't currently linked to an IdP group.","nullable":true,"type":"string"},"name":{"description":"A new name for the team.","nullable":true,"type":"string"},"notification_setting":{"description":"The notification setting the team is set to. The options are:\n\n* `notifications_enabled` - team members receive notifications when the team is @mentioned.\n* `notifications_disabled` - no one receives notifications.\n","enum":["notifications_enabled","notifications_disabled"],"type":"string"},"organization_selection_type":{"default":"disabled","description":"Specifies which organizations in the enterprise should have access to this team. Can be one of `disabled`, `selected`, or `all`.\n`disabled`: The team is not assigned to any organizations. This is the default when you create a new team.\n`selected`: The team is assigned to specific organizations. You can then use the [add organization assignments API](https://docs.github.com/rest/enterprise-teams/enterprise-team-organizations#add-organization-assignments).\n`all`: The team is assigned to all current and future organizations in the enterprise.\n","enum":["disabled","selected","all"],"type":"string"},"sync_to_organizations":{"default":"disabled","description":"Retired: this field is no longer supported.\nWhether the enterprise team should be reflected in each organization.\nThis value cannot be changed.\n","enum":["all","disabled"],"type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/enterprise-teams-item"}},"schema":{"$ref":"#/components/schemas/enterprise-team"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: activity/list-public-events
path: /events
method: GET
summary: List public 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:
  {"parameters":[{"$ref":"#/components/parameters/public-events-per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/public-events-items"}},"schema":{"items":{"$ref":"#/components/schemas/event"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: activity/get-feeds
path: /feeds
method: GET
summary: Get feeds
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.

  *   **Timeline**: The GitHub global public timeline
  *   **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."
  *   **Current user public**: The public timeline for the authenticated user
  *   **Current user**: The private timeline for the authenticated user
  *   **Current user actor**: The private timeline for activity created by the authenticated user
  *   **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.
  *   **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.

  By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."

  > [!NOTE]
  > Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) since current feed URIs use the older, non revocable auth tokens.

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


operation_id: gists/list
path: /gists
method: GET
summary: List gists for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists:

input_schema:
  {"parameters":[{"$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/base-gist-items"}},"schema":{"items":{"$ref":"#/components/schemas/base-gist"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: gists/create
path: /gists
method: POST
summary: Create a gist
auth_scheme_ref: GitHubBearerToken
description:
  Allows you to add a new gist with one or more files.

  > [!NOTE]
  > Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Creating a gist","value":{"description":"Example of a gist","files":{"README.md":{"content":"Hello World"}},"public":false}}},"schema":{"properties":{"description":{"description":"Description of the gist","example":"Example Ruby script","type":"string"},"files":{"additionalProperties":{"properties":{"content":{"description":"Content of the file","type":"string"}},"required":["content"],"type":"object"},"description":"Names and content for the files that make up the gist","example":{"hello.rb":{"content":"puts \"Hello, World!\""}},"type":"object"},"public":{"oneOf":[{"default":false,"description":"Flag indicating whether the gist is public","example":true,"type":"boolean"},{"default":"false","enum":["true","false"],"example":"true","type":"string"}]}},"required":["files"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/gist"}},"schema":{"$ref":"#/components/schemas/gist-simple"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/gists/aa5a315d61ae9438b18d","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: gists/list-public
path: /gists/public
method: GET
summary: List public gists
auth_scheme_ref: GitHubBearerToken
description:
  List public gists sorted by most recently updated to least recently updated.

  Note: With [pagination](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api), you can fetch up to 3000 gists. For example, you can fetch 100 pages with 30 gists per page or 30 pages with 100 gists per page.

input_schema:
  {"parameters":[{"$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/base-gist-items"}},"schema":{"items":{"$ref":"#/components/schemas/base-gist"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: gists/list-starred
path: /gists/starred
method: GET
summary: List starred gists
description: List the authenticated user's starred gists:
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$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/base-gist-items"}},"schema":{"items":{"$ref":"#/components/schemas/base-gist"},"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: gists/get
path: /gists/{gist_id}
method: GET
summary: Get a gist
input_schema: {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specified gist.

  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. This is the default if you do not pass any specific media type.

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


operation_id: gists/delete
path: /gists/{gist_id}
method: DELETE
summary: Delete a gist
input_schema: {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"204":{"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: gists/update
path: /gists/{gist_id}
method: PATCH
summary: Update a gist
auth_scheme_ref: GitHubBearerToken
description:
  Allows you to update a gist's description and to update, delete, or rename gist files. Files
  from the previous version of the gist that aren't explicitly changed during an edit
  are unchanged.

  At least one of `description` or `files` is required.

  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. This is the default if you do not pass any specific media type.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":{"content":{"application/json":{"examples":{"deleteFile":{"summary":"Deleting a gist file","value":{"files":{"hello.py":null}}},"renameFile":{"summary":"Renaming a gist file","value":{"files":{"hello.py":{"filename":"goodbye.py"}}}},"updateGist":{"summary":"Updating a gist","value":{"description":"An updated gist description","files":{"README.md":{"content":"Hello World from GitHub"}}}}},"schema":{"nullable":true,"properties":{"description":{"description":"The description of the gist.","example":"Example Ruby script","type":"string"},"files":{"additionalProperties":{"nullable":true,"properties":{"content":{"description":"The new content of the file.","type":"string"},"filename":{"description":"The new filename for the file.","nullable":true,"type":"string"}},"type":"object"},"description":"The gist files to be updated, renamed, or deleted. Each `key` must match the current filename\n(including extension) of the targeted gist file. For example: `hello.py`.\n\nTo delete a file, set the whole file to null. For example: `hello.py : null`. The file will also be\ndeleted if the specified object does not contain at least one of `content` or `filename`.","example":{"hello.rb":{"content":"blah","filename":"goodbye.rb"}},"type":"object"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"deleteFile":{"$ref":"#/components/examples/delete-gist-file"},"renameFile":{"$ref":"#/components/examples/rename-gist-file"},"updateGist":{"$ref":"#/components/examples/gist"}},"schema":{"$ref":"#/components/schemas/gist-simple"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: gists/list-comments
path: /gists/{gist_id}/comments
method: GET
summary: List gist comments
auth_scheme_ref: GitHubBearerToken
description:
  Lists the comments on a gist.

  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. This is the default if you do not pass any specific media type.

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

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


operation_id: gists/create-comment
path: /gists/{gist_id}/comments
method: POST
summary: Create a gist comment
auth_scheme_ref: GitHubBearerToken
description:
  Creates a comment on a gist.

  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. This is the default if you do not pass any specific media type.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Creating a comment in a gist","value":{"body":"This is a comment to a gist"}}},"schema":{"properties":{"body":{"description":"The comment text.","example":"Body of the attachment","maxLength":65535,"type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/gist-comment"}},"schema":{"$ref":"#/components/schemas/gist-comment"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/gists/a6db0bec360bb87e9418/comments/1","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: gists/get-comment
path: /gists/{gist_id}/comments/{comment_id}
method: GET
summary: Get a gist comment
auth_scheme_ref: GitHubBearerToken
description:
  Gets a comment on a gist.

  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. This is the default if you do not pass any specific media type.

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

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


operation_id: gists/update-comment
path: /gists/{gist_id}/comments/{comment_id}
method: PATCH
summary: Update a gist comment
auth_scheme_ref: GitHubBearerToken
description:
  Updates a comment on a gist.

  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. This is the default if you do not pass any specific media type.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"},{"$ref":"#/components/parameters/comment-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Updating a comment in a gist","value":{"body":"This is an update to a comment in a gist"}}},"schema":{"properties":{"body":{"description":"The comment text.","example":"Body of the attachment","maxLength":65535,"type":"string"}},"required":["body"],"type":"object"}}},"required":true}}

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


operation_id: gists/list-commits
path: /gists/{gist_id}/commits
method: GET
summary: List gist commits
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/gist-commit-items"}},"schema":{"items":{"$ref":"#/components/schemas/gist-commit"},"type":"array"}}},"description":"Response","headers":{"Link":{"example":"<https://api.github.com/resource?page=2>; rel=\"next\"","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: gists/list-forks
path: /gists/{gist_id}/forks
method: GET
summary: List gist forks
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: gists/fork
path: /gists/{gist_id}/forks
method: POST
summary: Fork a gist
input_schema: {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/base-gist"}},"schema":{"$ref":"#/components/schemas/base-gist"}}},"description":"Response","headers":{"Location":{"example":"https://api.github.com/gists/aa5a315d61ae9438b18d","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: gists/check-is-starred
path: /gists/{gist_id}/star
method: GET
summary: Check if a gist is starred
input_schema: {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"204":{"description":"Response if gist is starred"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"content":{"application/json":{"schema":{"additionalProperties":false,"type":"object"}}},"description":"Not Found if gist is not starred"}}


operation_id: gists/star
path: /gists/{gist_id}/star
method: PUT
summary: Star a gist
input_schema: {"parameters":[{"$ref":"#/components/parameters/gist-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  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)."

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


operation_id: gists/get-revision
path: /gists/{gist_id}/{sha}
method: GET
summary: Get a gist revision
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specified gist revision.

  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. This is the default if you do not pass any specific media type.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/gist-id"},{"in":"path","name":"sha","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


operation_id: gitignore/get-all-templates
path: /gitignore/templates
method: GET
summary: Get all gitignore templates
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  List all templates available to pass as an option when [creating a repository](https://docs.github.com/rest/repos/repos#create-a-repository-for-the-authenticated-user).

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["Actionscript","Android","AppceleratorTitanium","Autotools","Bancha","C","C++"]}},"schema":{"items":{"type":"string"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: gitignore/get-template
path: /gitignore/templates/{name}
method: GET
summary: Get a gitignore template
auth_scheme_ref: GitHubBearerToken
description:
  Get the content of a gitignore template.

  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 .gitignore contents.

input_schema:
  {"parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/gitignore-template"}},"schema":{"$ref":"#/components/schemas/gitignore-template"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: apps/list-repos-accessible-to-installation
path: /installation/repositories
method: GET
summary: List repositories accessible to the app installation
description: List repositories that an app installation can access.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repository-paginated-2"}},"schema":{"properties":{"repositories":{"items":{"allOf":[{"$ref":"#/components/schemas/repository"},{"properties":{"custom_properties":{"additionalProperties":true,"description":"The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values. Present for org repos only.","type":"object"}},"type":"object"}]},"type":"array"},"repository_selection":{"example":"selected","type":"string"},"total_count":{"type":"integer"}},"required":["total_count","repositories"],"type":"object"}}},"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: apps/revoke-installation-access-token
path: /installation/token
method: DELETE
summary: Revoke an installation access token
input_schema: {"parameters":[],"requestBody":null}
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Revokes the installation token you're using to authenticate as an installation and access this endpoint.

  Once an installation token is revoked, the token is invalidated and cannot be used. Other endpoints that require the revoked installation token must have a new installation token to work. You can create a new token using the "[Create an installation access token for an app](https://docs.github.com/rest/apps/apps#create-an-installation-access-token-for-an-app)" endpoint.


operation_id: issues/list
path: /issues
method: GET
summary: List issues assigned to the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  List issues assigned to the authenticated user across all visible repositories including owned repositories, member
  repositories, and organization repositories. You can use the `filter` query parameter to fetch issues that are not
  necessarily assigned to you.

  > [!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":[{"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":"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"},{"in":"query","name":"collab","schema":{"type":"boolean"},"style":"form"},{"in":"query","name":"orgs","schema":{"type":"boolean"},"style":"form"},{"in":"query","name":"owned","schema":{"type":"boolean"},"style":"form"},{"in":"query","name":"pulls","schema":{"type":"boolean"},"style":"form"},{"$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"}}},"304":{"$ref":"#/components/responses/not_modified"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: licenses/get-all-commonly-used
path: /licenses
method: GET
summary: Get all commonly used licenses
auth_scheme_ref: GitHubBearerToken
description:
  Lists the most commonly used licenses on GitHub. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)."

input_schema:
  {"parameters":[{"in":"query","name":"featured","schema":{"type":"boolean"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/license-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/license-simple"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: licenses/get
path: /licenses/{license}
method: GET
summary: Get a license
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about a specific license. For more information, see "[Licensing a repository ](https://docs.github.com/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository)."

input_schema:
  {"parameters":[{"in":"path","name":"license","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


operation_id: markdown/render
path: /markdown
method: POST
summary: Render a Markdown document
auth_scheme_ref: GitHubBearerToken
description:
  Depending on what is rendered in the Markdown, you may need to provide additional token scopes for labels, such as `issues:read` or `pull_requests:read`.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Rendering markdown","value":{"text":"Hello **world**"}}},"schema":{"properties":{"context":{"description":"The repository context to use when creating references in `gfm` mode.  For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository.","type":"string"},"mode":{"default":"markdown","description":"The rendering mode.","enum":["markdown","gfm"],"example":"markdown","type":"string"},"text":{"description":"The Markdown text to render in HTML.","type":"string"}},"required":["text"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"text/html":{"examples":{"default":{"summary":"Example response","value":"<p>Hello <strong>world</strong></p>"}},"schema":{"type":"string"}}},"description":"Response","headers":{"Content-Length":{"example":"279","schema":{"type":"string"},"style":"simple"},"Content-Type":{"$ref":"#/components/headers/content-type"},"X-CommonMarker-Version":{"$ref":"#/components/headers/x-common-marker-version"}}},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: markdown/render-raw
path: /markdown/raw
method: POST
summary: Render a Markdown document in raw mode
auth_scheme_ref: GitHubBearerToken
description:
  You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.

input_schema:
  {"parameters":[],"requestBody":{"content":{"text/plain":{"examples":{"default":{"value":{"text":"Hello **world**"}}},"schema":{"type":"string"}},"text/x-markdown":{"examples":{"default":{"summary":"Rendering markdown","value":{"text":"Hello **world**"}}},"schema":{"type":"string"}}}}}

output_schema:
  {"200":{"content":{"text/html":{"examples":{"default":{"summary":"Example response","value":"<p>Hello <strong>world</strong></p>"}},"schema":{"type":"string"}}},"description":"Response","headers":{"X-CommonMarker-Version":{"$ref":"#/components/headers/x-common-marker-version"}}},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: apps/get-subscription-plan-for-account
path: /marketplace_listing/accounts/{account_id}
method: GET
summary: Get a subscription plan for an account
input_schema: {"parameters":[{"$ref":"#/components/parameters/account-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/marketplace-purchase"}},"schema":{"$ref":"#/components/schemas/marketplace-purchase"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Not Found when the account has not purchased the listing"}}


operation_id: apps/list-plans
path: /marketplace_listing/plans
method: GET
summary: List plans
auth_scheme_ref: GitHubBearerToken
description:
  Lists all plans that are part of your GitHub Marketplace listing.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

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

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


operation_id: apps/list-accounts-for-plan
path: /marketplace_listing/plans/{plan_id}/accounts
method: GET
summary: List accounts for a plan
auth_scheme_ref: GitHubBearerToken
description:
  Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/plan-id"},{"$ref":"#/components/parameters/sort"},{"description":"To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter.","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/marketplace-purchase-items"}},"schema":{"items":{"$ref":"#/components/schemas/marketplace-purchase"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"401":{"$ref":"#/components/responses/requires_authentication"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: apps/get-subscription-plan-for-account-stubbed
path: /marketplace_listing/stubbed/accounts/{account_id}
method: GET
summary: Get a subscription plan for an account (stubbed)
input_schema: {"parameters":[{"$ref":"#/components/parameters/account-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/marketplace-purchase"}},"schema":{"$ref":"#/components/schemas/marketplace-purchase"}}},"description":"Response"},"401":{"$ref":"#/components/responses/requires_authentication"},"404":{"description":"Not Found when the account has not purchased the listing"}}


operation_id: apps/list-plans-stubbed
path: /marketplace_listing/stubbed/plans
method: GET
summary: List plans (stubbed)
auth_scheme_ref: GitHubBearerToken
description:
  Lists all plans that are part of your GitHub Marketplace listing.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/marketplace-listing-plan-items"}},"schema":{"items":{"$ref":"#/components/schemas/marketplace-listing-plan"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"401":{"$ref":"#/components/responses/requires_authentication"}}


operation_id: apps/list-accounts-for-plan-stubbed
path: /marketplace_listing/stubbed/plans/{plan_id}/accounts
method: GET
summary: List accounts for a plan (stubbed)
auth_scheme_ref: GitHubBearerToken
description:
  Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change.

  GitHub Apps 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. OAuth apps must use [basic authentication](https://docs.github.com/rest/authentication/authenticating-to-the-rest-api#using-basic-authentication) with their client ID and client secret to access this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/plan-id"},{"$ref":"#/components/parameters/sort"},{"description":"To return the oldest accounts first, set to `asc`. Ignored without the `sort` parameter.","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/marketplace-purchase-items"}},"schema":{"items":{"$ref":"#/components/schemas/marketplace-purchase"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"401":{"$ref":"#/components/responses/requires_authentication"}}


operation_id: meta/get
path: /meta
method: GET
summary: Get GitHub meta information
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)."

  The API's response also includes a list of GitHub's domain names.

  The values shown in the documentation's response are example values. You must always query the API directly to get the latest values.

  > [!NOTE]
  > This endpoint returns both IPv4 and IPv6 addresses. However, not all features support IPv6. You should refer to the specific documentation for each feature to determine if IPv6 is supported.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/api-overview"}},"schema":{"$ref":"#/components/schemas/api-overview"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: activity/list-public-events-for-repo-network
path: /networks/{owner}/{repo}/events
method: GET
summary: List public events for a network of repositories
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:
  {"parameters":[{"$ref":"#/components/parameters/owner"},{"$ref":"#/components/parameters/repo"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/public-repo-events-items"}},"schema":{"items":{"$ref":"#/components/schemas/event"},"type":"array"}}},"description":"Response"},"301":{"$ref":"#/components/responses/moved_permanently"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: activity/list-notifications-for-authenticated-user
path: /notifications
method: GET
summary: List notifications for the authenticated user
description: List all notifications for the current user, sorted by most recently updated.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/all"},{"$ref":"#/components/parameters/participating"},{"$ref":"#/components/parameters/since"},{"$ref":"#/components/parameters/before"},{"$ref":"#/components/parameters/page"},{"description":"The number of results per page (max 50). 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/thread-items"}},"schema":{"items":{"$ref":"#/components/schemas/thread"},"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"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: activity/mark-notifications-as-read
path: /notifications
method: PUT
summary: Mark notifications as read
auth_scheme_ref: GitHubBearerToken
description:
  Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub will run an asynchronous process to mark notifications as "read." To check whether any "unread" notifications remain, you can use the [List notifications for the authenticated user](https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`.

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"last_read_at":"2022-06-10T00:00:00Z","read":true}}},"schema":{"properties":{"last_read_at":{"description":"Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.","format":"date-time","type":"string"},"read":{"description":"Whether the notification has been read.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/notifications-mark-read"}},"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"Response"},"205":{"description":"Reset Content"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: activity/get-thread
path: /notifications/threads/{thread_id}
method: GET
summary: Get a thread
description: Gets information about a notification thread.
input_schema: {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/thread"}},"schema":{"$ref":"#/components/schemas/thread"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: activity/mark-thread-as-done
path: /notifications/threads/{thread_id}
method: DELETE
summary: Mark a thread as done
input_schema: {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":null}
output_schema: {"204":{"description":"No content"}}
auth_scheme_ref: GitHubBearerToken
description:
  Marks a thread as "done." Marking a thread as "done" is equivalent to marking a notification in your notification inbox on GitHub as done: https://github.com/notifications.


operation_id: activity/mark-thread-as-read
path: /notifications/threads/{thread_id}
method: PATCH
summary: Mark a thread as read
input_schema: {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub: https://github.com/notifications.

output_schema:
  {"205":{"description":"Reset Content"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: activity/get-thread-subscription-for-authenticated-user
path: /notifications/threads/{thread_id}/subscription
method: GET
summary: Get a thread subscription for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/rest/activity/watching#get-a-repository-subscription).

  Note that subscriptions are only generated if a user is participating in a conversation--for example, they've replied to the thread, were **@mentioned**, or manually subscribe to a thread.

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


operation_id: activity/set-thread-subscription
path: /notifications/threads/{thread_id}/subscription
method: PUT
summary: Set a thread subscription
auth_scheme_ref: GitHubBearerToken
description:
  If you are watching a repository, you receive notifications for all threads by default. Use this endpoint to ignore future notifications for threads until you comment on the thread or get an **@mention**.

  You can also use this endpoint to subscribe to threads that you are currently not receiving notifications for or to subscribed to threads that you have previously ignored.

  Unsubscribing from a conversation in a repository that you are not watching is functionally equivalent to the [Delete a thread subscription](https://docs.github.com/rest/activity/notifications#delete-a-thread-subscription) endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"ignored":false}}},"schema":{"properties":{"ignored":{"default":false,"description":"Whether to block all notifications from a thread.","type":"boolean"}},"type":"object"}}}}}

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


operation_id: activity/delete-thread-subscription
path: /notifications/threads/{thread_id}/subscription
method: DELETE
summary: Delete a thread subscription
input_schema: {"parameters":[{"$ref":"#/components/parameters/thread-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Mutes all future notifications for a conversation until you comment on the thread or get an **@mention**. If you are watching the repository of the thread, you will still receive notifications. To ignore future notifications for a repository you are watching, use the [Set a thread subscription](https://docs.github.com/rest/activity/notifications#set-a-thread-subscription) endpoint and set `ignore` to `true`.

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


operation_id: meta/get-octocat
path: /octocat
method: GET
summary: Get Octocat
description: Get the octocat as ASCII art
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"description":"The words to show in Octocat's speech bubble","in":"query","name":"s","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/octocat-stream":{"examples":{"default":{"$ref":"#/components/examples/octocat"}},"schema":{"type":"string"}}},"description":"Response"}}


operation_id: orgs/list
path: /organizations
method: GET
summary: List organizations
auth_scheme_ref: GitHubBearerToken
description:
  Lists all organizations, in the order that they were created.

  > [!NOTE]
  > Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of organizations.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-simple-items"}},"schema":{"items":{"$ref":"#/components/schemas/organization-simple"},"type":"array"}}},"description":"Response","headers":{"Link":{"example":"<https://api.github.com/organizations?since=135>; rel=\"next\"","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"}}


operation_id: actions/get-actions-cache-retention-limit-for-organization
path: /organizations/{org}/actions/cache/retention-limit
method: GET
summary: Get GitHub Actions cache retention limit for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache retention limit for an organization. All repositories under this
  organization may not set a higher cache retention limit.

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

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


operation_id: actions/set-actions-cache-retention-limit-for-organization
path: /organizations/{org}/actions/cache/retention-limit
method: PUT
summary: Set GitHub Actions cache retention limit for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache retention limit for an organization. All repositories under this
  organization may not set a higher cache retention limit.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-retention-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-retention-limit-for-organization"}}},"required":true}}

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


operation_id: actions/get-actions-cache-storage-limit-for-organization
path: /organizations/{org}/actions/cache/storage-limit
method: GET
summary: Get GitHub Actions cache storage limit for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets GitHub Actions cache storage limit for an organization. All repositories under this
  organization may not set a higher cache storage limit.

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

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


operation_id: actions/set-actions-cache-storage-limit-for-organization
path: /organizations/{org}/actions/cache/storage-limit
method: PUT
summary: Set GitHub Actions cache storage limit for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets GitHub Actions cache storage limit for an organization. All organizations and repositories under this
  organization may not set a higher cache storage limit.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"selected_actions":{"$ref":"#/components/examples/actions-cache-storage-limit"}},"schema":{"$ref":"#/components/schemas/actions-cache-storage-limit-for-organization"}}},"required":true}}

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


operation_id: billing/get-github-billing-ai-credit-usage-report-org
path: /organizations/{org}/settings/billing/ai_credit/usage
method: GET
summary: Get billing AI credit usage report for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of AI credit usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

  **Note:** Only data from the past 24 months is accessible via this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/billing-usage-report-year"},{"$ref":"#/components/parameters/billing-usage-report-month-default"},{"$ref":"#/components/parameters/billing-usage-report-day"},{"$ref":"#/components/parameters/billing-usage-report-user"},{"$ref":"#/components/parameters/billing-usage-report-model"},{"$ref":"#/components/parameters/billing-usage-report-product"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_ai_credit_usage_report_org"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: billing/get-all-budgets-org
path: /organizations/{org}/settings/billing/budgets
method: GET
summary: Get all budgets for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets all budgets for an organization. The authenticated user must be an organization admin or billing manager.
  Each page returns up to 100 budgets.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The page number of the results to fetch.","in":"query","name":"page","schema":{"default":1,"type":"integer"},"style":"form"},{"description":"The number of results per page (max 100).","in":"query","name":"per_page","schema":{"default":10,"type":"integer"},"style":"form"},{"description":"Filter budgets by scope type.\n\n- `organization`: Budgets scoped to the organization.\n- `repository`: Budgets scoped to a repository.\n- `multi_user_customer`: Universal budgets that apply to all users in the organization.\n- `user`: Budgets scoped to an individual user.","in":"query","name":"scope","schema":{"enum":["enterprise","organization","repository","cost_center","multi_user_customer","user"],"type":"string"},"style":"form"},{"description":"Filter consumed amount details for budgets by the specified user login.","in":"query","name":"user","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/get_all_budgets"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: billing/create-organization-budget
path: /organizations/{org}/settings/billing/budgets
method: POST
summary: Create a budget for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new budget for an organization. The authenticated user must be an
  organization admin or billing manager.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"create-organization-budget":{"summary":"Create organization budget example","value":{"budget_alerting":{"alert_recipients":[],"will_alert":false},"budget_amount":500,"budget_entity_name":"","budget_product_sku":"actions","budget_scope":"organization","budget_type":"ProductPricing","prevent_further_usage":true}}},"schema":{"properties":{"budget_alerting":{"properties":{"alert_recipients":{"description":"Array of user login names who will receive alerts","items":{"type":"string"},"type":"array"},"will_alert":{"description":"Whether alerts are enabled for this budget","type":"boolean"}},"type":"object"},"budget_amount":{"description":"The budget amount in whole dollars. For license-based products, this represents the number of licenses.","type":"integer"},"budget_entity_name":{"default":"","description":"The name of the entity to apply the budget to","type":"string"},"budget_product_sku":{"description":"A single product or SKU that will be covered in the budget","type":"string"},"budget_scope":{"description":"The scope of the budget for this organization.\n\n- `organization`: Apply the budget to the organization.\n- `repository`: Apply the budget to a specific repository in the organization.\n- `multi_user_customer`: Apply a universal budget to all users in the organization.\n- `user`: Apply the budget to a single user in the organization.\n\n`user` and `multi_user_customer` scopes are only supported when\n`budget_product_sku` is `ai_credits` or `premium_requests`.","enum":["organization","repository","multi_user_customer","user"],"type":"string"},"budget_type":{"description":"The type of pricing model used by the budget. Determines how `budget_product_sku` is interpreted.\n\n- `BundlePricing`: Covers all AI credit SKUs. Set `budget_product_sku` to `ai_credits`.\n- `ProductPricing`: Covers all SKUs that belong to a product. Set `budget_product_sku` to a product such as `actions` or `packages`.\n- `SkuPricing`: Covers a single, specific SKU. Set `budget_product_sku` to a SKU such as `actions_linux`.","oneOf":[{"enum":["BundlePricing"],"type":"string"},{"enum":["ProductPricing"],"type":"string"},{"enum":["SkuPricing"],"type":"string"}]},"prevent_further_usage":{"description":"Whether to prevent additional spending once the budget is exceeded. For `user` and `multi_user_customer` scopes, this must be `true`.","type":"boolean"},"user":{"description":"The username of the user for `user` scope budgets. This field is required when `budget_scope` is `user`.","type":"string"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"create-organization-budget":{"$ref":"#/components/examples/create-budget"}},"schema":{"$ref":"#/components/schemas/create-budget"}}},"description":"Budget created successfully"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"content":{"application/json":{"examples":{"insufficient-permissions":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#create-a-budget-for-an-organization","message":"Insufficient permissions to create a budget."}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Insufficient permissions"},"404":{"content":{"application/json":{"examples":{"feature-not-enabled":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#create-a-budget-for-an-organization","message":"Not Found"}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Feature not enabled or organization not found"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"content":{"application/json":{"examples":{"server-error":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#create-a-budget-for-an-organization","message":"Unable to create budget."}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Internal server error"}}


operation_id: billing/get-budget-org
path: /organizations/{org}/settings/billing/budgets/{budget_id}
method: GET
summary: Get a budget by ID for an organization
description: Gets a budget by ID. The authenticated user must be an organization admin or billing manager.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/budget"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/budget"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: billing/delete-budget-org
path: /organizations/{org}/settings/billing/budgets/{budget_id}
method: DELETE
summary: Delete a budget for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a budget by ID for an organization. The authenticated user must be an organization admin or billing manager.

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

output_schema:
  {"200":{"$ref":"#/components/responses/delete-budget"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: billing/update-budget-org
path: /organizations/{org}/settings/billing/budgets/{budget_id}
method: PATCH
summary: Update a budget for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates an existing budget for an organization. The authenticated user must be an organization admin or billing manager.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/budget"}],"requestBody":{"content":{"application/json":{"examples":{"update-budget":{"summary":"Update budget example","value":{"budget_alerting":{"alert_recipients":[],"will_alert":false},"budget_amount":10,"prevent_further_usage":false}}},"schema":{"properties":{"budget_alerting":{"properties":{"alert_recipients":{"description":"Array of user login names who will receive alerts","items":{"type":"string"},"type":"array"},"will_alert":{"description":"Whether alerts are enabled for this budget","type":"boolean"}},"type":"object"},"budget_amount":{"description":"The budget amount in whole dollars. For license-based products, this represents the number of licenses.","type":"integer"},"budget_entity_name":{"description":"The name of the entity to apply the budget to","type":"string"},"budget_product_sku":{"description":"A single product or SKU that will be covered in the budget","type":"string"},"budget_scope":{"description":"The scope of the budget for this organization.\n\n- `organization`: Apply the budget to the organization.\n- `repository`: Apply the budget to a specific repository in the organization.\n- `multi_user_customer`: Apply a universal budget to all users in the organization.\n- `user`: Apply the budget to a single user in the organization.","enum":["enterprise","organization","repository","cost_center","multi_user_customer","user"],"type":"string"},"budget_type":{"description":"The type of pricing model used by the budget. Determines how `budget_product_sku` is interpreted.\n\n- `BundlePricing`: Covers all AI credit SKUs. Set `budget_product_sku` to `ai_credits`.\n- `ProductPricing`: Covers all SKUs that belong to a product. Set `budget_product_sku` to a product such as `actions` or `packages`.\n- `SkuPricing`: Covers a single, specific SKU. Set `budget_product_sku` to a SKU such as `actions_linux`.","oneOf":[{"enum":["BundlePricing"],"type":"string"},{"enum":["ProductPricing"],"type":"string"},{"enum":["SkuPricing"],"type":"string"}]},"prevent_further_usage":{"description":"Whether to prevent additional spending once the budget is exceeded. For budgets with `user` or `multi_user_customer` scope, this must remain `true`.","type":"boolean"},"user":{"description":"The username of the user for `user` scope budgets.","type":"string"}},"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"update-budget":{"$ref":"#/components/examples/update-budget"}},"schema":{"$ref":"#/components/schemas/update-budget"}}},"description":"Budget updated successfully"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"content":{"application/json":{"examples":{"budget-not-found":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#update-a-budget","message":"Budget with ID 550e8400-e29b-41d4-a716-446655440000 not found."}},"feature-not-enabled":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#update-a-budget","message":"Not Found"}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Budget not found or feature not enabled"},"422":{"$ref":"#/components/responses/validation_failed"},"500":{"content":{"application/json":{"examples":{"server-error":{"value":{"documentation_url":"https://docs.github.com/rest/billing/budgets#update-a-budget","message":"Unable to update budget."}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Internal server error"}}


operation_id: billing/get-github-billing-premium-request-usage-report-org
path: /organizations/{org}/settings/billing/premium_request/usage
method: GET
summary: Get billing premium request usage report for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of premium request usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

  **Note:** Only data from the past 24 months is accessible via this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/billing-usage-report-year"},{"$ref":"#/components/parameters/billing-usage-report-month-default"},{"$ref":"#/components/parameters/billing-usage-report-day"},{"$ref":"#/components/parameters/billing-usage-report-user"},{"$ref":"#/components/parameters/billing-usage-report-model"},{"$ref":"#/components/parameters/billing-usage-report-product"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_premium_request_usage_report_org"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: billing/get-github-billing-usage-report-org
path: /organizations/{org}/settings/billing/usage
method: GET
summary: Get billing usage report for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

  **Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/billing/using-the-new-billing-platform)."

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/billing-usage-report-year"},{"$ref":"#/components/parameters/billing-usage-report-month"},{"$ref":"#/components/parameters/billing-usage-report-day"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_usage_report_org"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: billing/get-github-billing-usage-summary-report-org
path: /organizations/{org}/settings/billing/usage/summary
method: GET
summary: Get billing usage summary for an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets a summary report of usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.

  **Note:** Only data from the past 24 months is accessible via this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/billing-usage-report-year"},{"$ref":"#/components/parameters/billing-usage-report-month-default"},{"$ref":"#/components/parameters/billing-usage-report-day"},{"$ref":"#/components/parameters/billing-usage-report-repository"},{"$ref":"#/components/parameters/billing-usage-report-product"},{"$ref":"#/components/parameters/billing-usage-report-sku"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_usage_summary_report_org"},"400":{"$ref":"#/components/responses/bad_request"},"403":{"$ref":"#/components/responses/forbidden"},"500":{"$ref":"#/components/responses/internal_error"},"503":{"$ref":"#/components/responses/service_unavailable"}}


operation_id: orgs/get
path: /orgs/{org}
method: GET
summary: Get an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about an organization.

  When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/).

  To see the full details about an organization, the authenticated user must be an organization owner.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to see the full details about an organization.

  To see information about an organization's GitHub plan, GitHub Apps need the `Organization plan` permission.

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


operation_id: orgs/delete
path: /orgs/{org}
method: DELETE
summary: Delete an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an organization and all its repositories.

  The organization login will be unavailable for 90 days after deletion.

  Please review the Terms of Service regarding account deletion before using this endpoint:

  https://docs.github.com/site-policy/github-terms/github-terms-of-service

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


operation_id: orgs/update
path: /orgs/{org}
method: PATCH
summary: Update an organization
auth_scheme_ref: GitHubBearerToken
description:
  > [!WARNING]
  > **Closing down notice:** GitHub will replace and discontinue `members_allowed_repository_creation_type` in favor of more granular permissions. The new input parameters are `members_can_create_public_repositories`, `members_can_create_private_repositories` for all organizations and `members_can_create_internal_repositories` for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes).

  > [!WARNING]
  > **Closing down notice:** Code security product enablement for new repositories through the organization API is closing down. Please use [code security configurations](https://docs.github.com/rest/code-security/configurations#set-a-code-security-configuration-as-a-default-for-an-organization) to set defaults instead. For more information on setting a default security configuration, see the [changelog](https://github.blog/changelog/2024-07-09-sunsetting-security-settings-defaults-parameters-in-the-organizations-rest-api/).

  Updates the organization's profile and member privileges.

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

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"billing_email":"mona@github.com","company":"GitHub","default_repository_permission":"read","description":"GitHub, the company.","email":"mona@github.com","location":"San Francisco","members_allowed_repository_creation_type":"all","members_can_create_repositories":true,"name":"github","twitter_username":"github"}}},"schema":{"properties":{"advanced_security_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"billing_email":{"description":"Billing email address. This address is not publicized.","type":"string"},"blog":{"example":"\"http://github.blog\"","type":"string"},"company":{"description":"The company name.","type":"string"},"default_repository_permission":{"default":"read","description":"Default permission level members have for organization repositories.","enum":["read","write","admin","none"],"type":"string"},"dependabot_alerts_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"dependabot_security_updates_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"dependency_graph_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"deploy_keys_enabled_for_repositories":{"description":"Controls whether or not deploy keys may be added and used for repositories in the organization.","type":"boolean"},"description":{"description":"The description of the company. The maximum size is 160 characters.","type":"string"},"email":{"description":"The publicly visible email address.","type":"string"},"has_organization_projects":{"description":"Whether an organization can use organization projects.","type":"boolean"},"has_repository_projects":{"description":"Whether repositories that belong to the organization can use repository projects.","type":"boolean"},"location":{"description":"The location.","type":"string"},"members_allowed_repository_creation_type":{"description":"Specifies which types of repositories non-admin organization members can create. `private` is only available to repositories that are part of an organization on GitHub Enterprise Cloud. \n**Note:** This parameter is closing down and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details.","enum":["all","private","none"],"type":"string"},"members_can_create_internal_repositories":{"description":"Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation.","type":"boolean"},"members_can_create_pages":{"default":true,"description":"Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.","type":"boolean"},"members_can_create_private_pages":{"default":true,"description":"Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.","type":"boolean"},"members_can_create_private_repositories":{"description":"Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation.","type":"boolean"},"members_can_create_public_pages":{"default":true,"description":"Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.","type":"boolean"},"members_can_create_public_repositories":{"description":"Whether organization members can create public repositories, which are visible to anyone. For more information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" in the GitHub Help documentation.","type":"boolean"},"members_can_create_repositories":{"default":true,"description":"Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details.","type":"boolean"},"members_can_fork_private_repositories":{"default":false,"description":"Whether organization members can fork private organization repositories.","type":"boolean"},"name":{"description":"The shorthand name of the company.","type":"string"},"secret_scanning_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"secret_scanning_push_protection_custom_link":{"description":"If `secret_scanning_push_protection_custom_link_enabled` is true, the URL that will be displayed to contributors who are blocked from pushing a secret.","type":"string"},"secret_scanning_push_protection_enabled_for_new_repositories":{"deprecated":true,"description":"**Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/rest/code-security/configurations) instead.\n\nWhether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.\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\nYou can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request.","type":"boolean"},"twitter_username":{"description":"The Twitter username of the company.","type":"string"},"web_commit_signoff_required":{"default":false,"description":"Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface.","type":"boolean"}},"type":"object"}}}}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/organization-full"}},"schema":{"$ref":"#/components/schemas/organization-full"}}},"description":"Response"},"409":{"$ref":"#/components/responses/conflict"},"422":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/validation-error"},{"$ref":"#/components/schemas/validation-error-simple"}]}}},"description":"Validation failed"}}


operation_id: actions/get-actions-cache-usage-for-org
path: /orgs/{org}/actions/cache/usage
method: GET
summary: Get GitHub Actions cache usage for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the total GitHub Actions cache usage for an organization.
  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.

  OAuth 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/actions-cache-usage-org-enterprise"}},"schema":{"$ref":"#/components/schemas/actions-cache-usage-org-enterprise"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/get-actions-cache-usage-by-repo-for-org
path: /orgs/{org}/actions/cache/usage-by-repository
method: GET
summary: List repositories with GitHub Actions cache usage for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories and their GitHub Actions cache usage for an organization.
  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.

  OAuth 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/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-actions-cache-usage-by-repo"}},"schema":{"properties":{"repository_cache_usages":{"items":{"$ref":"#/components/schemas/actions-cache-usage-by-repository"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","repository_cache_usages"],"type":"object"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/list-hosted-runners-for-org
path: /orgs/{org}/actions/hosted-runners
method: GET
summary: List GitHub-hosted runners for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all GitHub-hosted runners configured in an organization.

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

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

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


operation_id: actions/create-hosted-runner-for-org
path: /orgs/{org}/actions/hosted-runners
method: POST
summary: Create a GitHub-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a GitHub-hosted runner for an organization.
  OAuth tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"enable_static_ip":false,"image":{"id":"ubuntu-latest","source":"github"},"maximum_runners":50,"name":"My Hosted runner","runner_group_id":1,"size":"4-core"}}},"schema":{"properties":{"enable_static_ip":{"description":"Whether this runner should be created with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits`","type":"boolean"},"image":{"description":"The image of runner. To list all available images, use `GET /actions/hosted-runners/images/github-owned` or `GET /actions/hosted-runners/images/partner`.","properties":{"id":{"description":"The unique identifier of the runner image.","type":"string"},"source":{"description":"The source of the runner image.","enum":["github","partner","custom"],"type":"string"},"version":{"description":"The version of the runner image to deploy. This is relevant only for runners using custom images.","nullable":true,"type":"string"}},"type":"object"},"image_gen":{"default":false,"description":"Whether this runner should be used to generate custom images.","type":"boolean"},"maximum_runners":{"description":"The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.","type":"integer"},"name":{"description":"Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.","type":"string"},"runner_group_id":{"description":"The existing runner group to add this runner to.","type":"integer"},"size":{"description":"The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes`","type":"string"}},"required":["name","image","size","runner_group_id"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner"}}},"description":"Response"}}


operation_id: actions/list-custom-images-for-org
path: /orgs/{org}/actions/hosted-runners/images/custom
method: GET
summary: List custom images for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  List custom images for an organization.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-custom-image-versions"}},"schema":{"properties":{"images":{"items":{"$ref":"#/components/schemas/actions-hosted-runner-custom-image"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","images"],"type":"object"}}},"description":"Response"}}


operation_id: actions/get-custom-image-for-org
path: /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}
method: GET
summary: Get a custom image definition for GitHub Actions Hosted Runners
auth_scheme_ref: GitHubBearerToken
description:
  Get a custom image definition for GitHub Actions Hosted Runners.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/actions-custom-image-definition-id"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-custom-image"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner-custom-image"}}},"description":"Response"}}


operation_id: actions/delete-custom-image-from-org
path: /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}
method: DELETE
summary: Delete a custom image from the organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Delete a custom image from the organization.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/actions-custom-image-definition-id"}],"requestBody":null}


operation_id: actions/list-custom-image-versions-for-org
path: /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions
method: GET
summary: List image versions of a custom image for an organization
auth_scheme_ref: GitHubBearerToken
description:
  List image versions of a custom image for an organization.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/actions-custom-image-definition-id"},{"$ref":"#/components/parameters/org"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-custom-image-versions"}},"schema":{"properties":{"image_versions":{"items":{"$ref":"#/components/schemas/actions-hosted-runner-custom-image-version"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","image_versions"],"type":"object"}}},"description":"Response"}}


operation_id: actions/get-custom-image-version-for-org
path: /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}
method: GET
summary: Get an image version of a custom image for GitHub Actions Hosted Runners
auth_scheme_ref: GitHubBearerToken
description:
  Get an image version of a custom image for GitHub Actions Hosted Runners.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/actions-custom-image-definition-id"},{"$ref":"#/components/parameters/actions-custom-image-version"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-custom-image-version"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner-custom-image-version"}}},"description":"Response"}}


operation_id: actions/delete-custom-image-version-from-org
path: /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}
method: DELETE
summary: Delete an image version of custom image from the organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Delete an image version of custom image from the organization.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/actions-custom-image-definition-id"},{"$ref":"#/components/parameters/actions-custom-image-version"}],"requestBody":null}


operation_id: actions/get-hosted-runners-github-owned-images-for-org
path: /orgs/{org}/actions/hosted-runners/images/github-owned
method: GET
summary: Get GitHub-owned images for GitHub-hosted runners in an organization
description: Get the list of GitHub-owned images available for GitHub-hosted runners for an organization.
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-curated-image"}},"schema":{"properties":{"images":{"items":{"$ref":"#/components/schemas/actions-hosted-runner-curated-image"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","images"],"type":"object"}}},"description":"Response"}}


operation_id: actions/get-hosted-runners-limits-for-org
path: /orgs/{org}/actions/hosted-runners/limits
method: GET
summary: Get limits on GitHub-hosted runners for an organization
description: Get the GitHub-hosted runners limits for an organization.
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-limits-default"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner-limits"}}},"description":"Response"}}


operation_id: actions/get-hosted-runners-machine-specs-for-org
path: /orgs/{org}/actions/hosted-runners/machine-sizes
method: GET
summary: Get GitHub-hosted runners machine specs for an organization
description: Get the list of machine specs available for GitHub-hosted runners for an organization.
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner-machine-spec"}},"schema":{"properties":{"machine_specs":{"items":{"$ref":"#/components/schemas/actions-hosted-runner-machine-spec"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","machine_specs"],"type":"object"}}},"description":"Response"}}


operation_id: actions/get-hosted-runners-platforms-for-org
path: /orgs/{org}/actions/hosted-runners/platforms
method: GET
summary: Get platforms for GitHub-hosted runners in an organization
description: Get the list of platforms available for GitHub-hosted runners for an organization.
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"platforms":["linux-x64","win-x64"],"total_count":1}}},"schema":{"properties":{"platforms":{"items":{"type":"string"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","platforms"],"type":"object"}}},"description":"Response"}}


operation_id: actions/get-hosted-runner-for-org
path: /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
method: GET
summary: Get a GitHub-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a GitHub-hosted runner configured in an organization.

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

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}}}


operation_id: actions/delete-hosted-runner-for-org
path: /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
method: DELETE
summary: Delete a GitHub-hosted runner for an organization
description: Deletes a GitHub-hosted runner for an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hosted-runner-id"}],"requestBody":null}

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-hosted-runner"}},"schema":{"$ref":"#/components/schemas/actions-hosted-runner"}}},"description":"Response"}}


operation_id: actions/update-hosted-runner-for-org
path: /orgs/{org}/actions/hosted-runners/{hosted_runner_id}
method: PATCH
summary: Update a GitHub-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates a GitHub-hosted runner for an organization.
  OAuth app tokens and personal access tokens (classic) need the `manage_runners:org` scope to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/hosted-runner-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"enable_static_ip":false,"maximum_runners":50,"name":"My larger runner","runner_group_id":1}}},"schema":{"properties":{"enable_static_ip":{"description":"Whether this runner should be updated with a static public IP. Note limit on account. To list limits on account, use `GET actions/hosted-runners/limits`","type":"boolean"},"image_gen":{"description":"Whether to enable image generation for this runner pool. When enabled, the runner pool is used to build and publish custom runner images.","type":"boolean"},"image_id":{"description":"The unique identifier of the runner image. To list available images, use `GET /actions/hosted-runners/images/github-owned`, `GET /actions/hosted-runners/images/partner`, or `GET /actions/hosted-runners/images/custom`.","type":"string"},"image_source":{"description":"The source type of the runner image to use. Must match the source of the image specified by `image_id`. Can be one of `github`, `partner`, or `custom`.","enum":["github","partner","custom"],"type":"string"},"image_version":{"description":"The version of the runner image to deploy. This is relevant only for runners using custom images.","nullable":true,"type":"string"},"maximum_runners":{"description":"The maximum amount of runners to scale up to. Runners will not auto-scale above this number. Use this setting to limit your cost.","type":"integer"},"name":{"description":"Name of the runner. Must be between 1 and 64 characters and may only contain upper and lowercase letters a-z, numbers 0-9, '.', '-', and '_'.","type":"string"},"runner_group_id":{"description":"The existing runner group to add this runner to.","type":"integer"},"size":{"description":"The machine size of the runner. To list available sizes, use `GET actions/hosted-runners/machine-sizes`","type":"string"}},"type":"object"}}},"required":true}}

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


operation_id: oidc/list-oidc-custom-property-inclusions-for-org
path: /orgs/{org}/actions/oidc/customization/properties/repo
method: GET
summary: List OIDC custom property inclusions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repository custom properties that are included in the OIDC token for repository actions in 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":{"value":[{"property_name":"environment"},{"property_name":"team"}]}},"schema":{"items":{"$ref":"#/components/schemas/oidc-custom-property-inclusion"},"type":"array"}}},"description":"A JSON array of OIDC custom property inclusions"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: oidc/create-oidc-custom-property-inclusion-for-org
path: /orgs/{org}/actions/oidc/customization/properties/repo
method: POST
summary: Create an OIDC custom property inclusion for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository custom property to be included in the OIDC token for repository actions in an 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":{"$ref":"#/components/examples/oidc-custom-property-inclusion"}},"schema":{"$ref":"#/components/schemas/oidc-custom-property-inclusion-input"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/oidc-custom-property-inclusion"}},"schema":{"$ref":"#/components/schemas/oidc-custom-property-inclusion"}}},"description":"OIDC custom property inclusion created"},"400":{"description":"Invalid input"},"403":{"$ref":"#/components/responses/forbidden"},"422":{"description":"Property inclusion already exists"}}


operation_id: oidc/delete-oidc-custom-property-inclusion-for-org
path: /orgs/{org}/actions/oidc/customization/properties/repo/{custom_property_name}
method: DELETE
summary: Delete an OIDC custom property inclusion for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository custom property from being included in the OIDC token for repository actions in an 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"},{"description":"The name of the custom property to remove from OIDC token inclusion","in":"path","name":"custom_property_name","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"OIDC custom property inclusion deleted"},"400":{"description":"Invalid input"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"description":"Property inclusion not found"}}


operation_id: oidc/get-oidc-custom-sub-template-for-org
path: /orgs/{org}/actions/oidc/customization/sub
method: GET
summary: Get the customization template for an OIDC subject claim for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the customization template for an OpenID Connect (OIDC) subject claim.

  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/oidc-custom-sub"}},"schema":{"$ref":"#/components/schemas/oidc-custom-sub"}}},"description":"A JSON serialized template for OIDC subject claim customization"}}


operation_id: oidc/update-oidc-custom-sub-template-for-org
path: /orgs/{org}/actions/oidc/customization/sub
method: PUT
summary: Set the customization template for an OIDC subject claim for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates or updates the customization template for an OpenID Connect (OIDC) subject claim.

  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":{"$ref":"#/components/examples/oidc-custom-sub"}},"schema":{"description":"Actions OIDC Subject customization","properties":{"include_claim_keys":{"description":"Array of unique strings. Each claim key can only contain alphanumeric characters and underscores.","items":{"type":"string"},"type":"array"},"use_immutable_subject":{"description":"Whether to opt in to the immutable OIDC subject claim format for the organization. When `true`, new OIDC tokens will use a stable, repository-ID-based `sub` claim instead of the name-based format.","type":"boolean"}},"title":"Actions OIDC Subject customization","type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Empty response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/get-github-actions-permissions-organization
path: /orgs/{org}/actions/permissions
method: GET
summary: Get GitHub Actions permissions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows 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":{"$ref":"#/components/examples/actions-organization-permissions"}},"schema":{"$ref":"#/components/schemas/actions-organization-permissions"}}},"description":"Response"}}


operation_id: actions/set-github-actions-permissions-organization
path: /orgs/{org}/actions/permissions
method: PUT
summary: Set GitHub Actions permissions for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the GitHub Actions permissions policy for repositories and allowed actions and reusable workflows in an 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":{"allowed_actions":"selected","enabled_repositories":"all","sha_pinning_required":true}}},"schema":{"properties":{"allowed_actions":{"$ref":"#/components/schemas/allowed-actions"},"enabled_repositories":{"$ref":"#/components/schemas/enabled-repositories"},"sha_pinning_required":{"$ref":"#/components/schemas/sha-pinning-required"}},"required":["enabled_repositories"],"type":"object"}}},"required":true}}


operation_id: actions/get-artifact-and-log-retention-settings-organization
path: /orgs/{org}/actions/permissions/artifact-and-log-retention
method: GET
summary: Get artifact and log retention settings for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets artifact and log retention settings for an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response":{"summary":"Example response","value":{"days":90,"maximum_allowed_days":365}}},"schema":{"$ref":"#/components/schemas/actions-artifact-and-log-retention-response"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-artifact-and-log-retention-settings-organization
path: /orgs/{org}/actions/permissions/artifact-and-log-retention
method: PUT
summary: Set artifact and log retention settings for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets artifact and log retention settings for an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"application/json":{"value":{"days":100}}},"schema":{"$ref":"#/components/schemas/actions-artifact-and-log-retention"}}},"required":true}}

output_schema:
  {"204":{"description":"No content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/get-fork-pr-contributor-approval-permissions-organization
path: /orgs/{org}/actions/permissions/fork-pr-contributor-approval
method: GET
summary: Get fork PR contributor approval permissions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the fork PR contributor approval policy for an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-contributor-approval"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-contributor-approval"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-fork-pr-contributor-approval-permissions-organization
path: /orgs/{org}/actions/permissions/fork-pr-contributor-approval
method: PUT
summary: Set fork PR contributor approval permissions for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets the fork PR contributor approval policy for an 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":{"summary":"Set approval policy to first time contributors","value":{"approval_policy":"first_time_contributors"}}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-contributor-approval"}}},"required":true}}

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


operation_id: actions/get-private-repo-fork-pr-workflows-settings-organization
path: /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
method: GET
summary: Get private repo fork PR workflow settings for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the settings for whether workflows from fork pull requests can run on private repositories in an organization.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-workflows-private-repos"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-workflows-private-repos"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-private-repo-fork-pr-workflows-settings-organization
path: /orgs/{org}/actions/permissions/fork-pr-workflows-private-repos
method: PUT
summary: Set private repo fork PR workflow settings for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets the settings for whether workflows from fork pull requests can run on private repositories in an organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/actions-fork-pr-workflows-private-repos"}},"schema":{"$ref":"#/components/schemas/actions-fork-pr-workflows-private-repos-request"}}},"required":true}}

output_schema:
  {"204":{"description":"Empty response for successful settings update"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Forbidden - Fork PR workflow settings for private repositories are managed by the enterprise owner"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/list-selected-repositories-enabled-github-actions-organization
path: /orgs/{org}/actions/permissions/repositories
method: GET
summary: List selected repositories enabled for GitHub Actions in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists the selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-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/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: actions/set-selected-repositories-enabled-github-actions-organization
path: /orgs/{org}/actions/permissions/repositories
method: PUT
summary: Set selected repositories enabled for GitHub Actions in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Replaces the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-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":{"selected_repository_ids":[32,42]}}},"schema":{"properties":{"selected_repository_ids":{"description":"List of repository IDs to enable for GitHub Actions.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: actions/enable-selected-repository-github-actions-organization
path: /orgs/{org}/actions/permissions/repositories/{repository_id}
method: PUT
summary: Enable a selected repository for GitHub Actions in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-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/repository-id"}],"requestBody":null}


operation_id: actions/disable-selected-repository-github-actions-organization
path: /orgs/{org}/actions/permissions/repositories/{repository_id}
method: DELETE
summary: Disable a selected repository for GitHub Actions in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-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/repository-id"}],"requestBody":null}


operation_id: actions/get-allowed-actions-organization
path: /orgs/{org}/actions/permissions/selected-actions
method: GET
summary: Get allowed actions and reusable workflows for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the selected actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-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":{"$ref":"#/components/examples/selected-actions"}},"schema":{"$ref":"#/components/schemas/selected-actions"}}},"description":"Response"}}


operation_id: actions/set-allowed-actions-organization
path: /orgs/{org}/actions/permissions/selected-actions
method: PUT
summary: Set allowed actions and reusable workflows for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the actions and reusable workflows that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-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":{"selected_actions":{"$ref":"#/components/examples/selected-actions"}},"schema":{"$ref":"#/components/schemas/selected-actions"}}}}}


operation_id: actions/get-self-hosted-runners-permissions-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners
method: GET
summary: Get self-hosted runners settings for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the settings for self-hosted runners for an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

output_schema:
  {"200":{"content":{"application/json":{"examples":{"response":{"summary":"Example response","value":{"enabled_repositories":"selected","selected_repositories_url":"http://api.github.localhost/organizations/1/actions/permissions/self-hosted-runners/repositories"}}},"schema":{"$ref":"#/components/schemas/self-hosted-runners-settings"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-self-hosted-runners-permissions-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners
method: PUT
summary: Set self-hosted runners settings for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets the settings for self-hosted runners for an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"application/json":{"value":{"enabled_repositories":"all"}}},"schema":{"properties":{"enabled_repositories":{"description":"The policy that controls whether self-hosted runners can be used in the organization","enum":["all","selected","none"],"type":"string"}},"required":["enabled_repositories"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/list-selected-repositories-self-hosted-runners-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners/repositories
method: GET
summary: List repositories allowed to use self-hosted runners in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories that are allowed to use self-hosted runners in an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission 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/repository-paginated"}},"schema":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/repository"},"type":"array"},"total_count":{"type":"integer"}},"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-selected-repositories-self-hosted-runners-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners/repositories
method: PUT
summary: Set repositories allowed to use self-hosted runners in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Sets repositories that are allowed to use self-hosted runners in an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"application/json":{"value":{"selected_repository_ids":[1,2,3]}}},"schema":{"properties":{"selected_repository_ids":{"description":"IDs of repositories that can use repository-level self-hosted runners","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"No content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/enable-selected-repository-self-hosted-runners-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
method: PUT
summary: Add a repository to the list of repositories allowed to use self-hosted runners in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to the list of repositories that are allowed to use self-hosted runners in an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

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

output_schema:
  {"204":{"description":"No content"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: actions/disable-selected-repository-self-hosted-runners-organization
path: /orgs/{org}/actions/permissions/self-hosted-runners/repositories/{repository_id}
method: DELETE
auth_scheme_ref: GitHubBearerToken
summary:
  Remove a repository from the list of repositories allowed to use self-hosted runners in an organization

description:
  Removes a repository from the list of repositories that are allowed to use self-hosted runners in an organization.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope or the "Actions policies" fine-grained permission to use this endpoint.

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

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


operation_id: actions/get-github-actions-default-workflow-permissions-organization
path: /orgs/{org}/actions/permissions/workflow
method: GET
summary: Get default workflow permissions for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization,
  as well as whether GitHub Actions can submit approving pull request reviews. For more information, see
  "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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":{"$ref":"#/components/examples/actions-default-workflow-permissions"}},"schema":{"$ref":"#/components/schemas/actions-get-default-workflow-permissions"}}},"description":"Response"}}


operation_id: actions/set-github-actions-default-workflow-permissions-organization
path: /orgs/{org}/actions/permissions/workflow
method: PUT
summary: Set default workflow permissions for an organization
output_schema: {"204":{"description":"Success response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions
  can submit approving pull request reviews. For more information, see
  "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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":{"$ref":"#/components/examples/actions-default-workflow-permissions"}},"schema":{"$ref":"#/components/schemas/actions-set-default-workflow-permissions"}}}}}


operation_id: actions/list-self-hosted-runner-groups-for-org
path: /orgs/{org}/actions/runner-groups
method: GET
summary: List self-hosted runner groups for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all self-hosted runner groups configured in an organization and inherited from an enterprise.

  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/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/visible-to-repository"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/runner-groups-org"}},"schema":{"properties":{"runner_groups":{"items":{"$ref":"#/components/schemas/runner-groups-org"},"type":"array"},"total_count":{"type":"number"}},"required":["total_count","runner_groups"],"type":"object"}}},"description":"Response"}}


operation_id: actions/create-self-hosted-runner-group-for-org
path: /orgs/{org}/actions/runner-groups
method: POST
summary: Create a self-hosted runner group for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new self-hosted runner group for 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":{"name":"Expensive hardware runners","runners":[9,2],"selected_repository_ids":[32,91],"visibility":"selected"}}},"schema":{"properties":{"allows_public_repositories":{"default":false,"description":"Whether the runner group can be used by `public` repositories.","type":"boolean"},"name":{"description":"Name of the runner group.","type":"string"},"network_configuration_id":{"description":"The identifier of a hosted compute network configuration.","type":"string"},"restricted_to_workflows":{"default":false,"description":"If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.","type":"boolean"},"runners":{"description":"List of runner IDs to add to the runner group.","items":{"description":"Unique identifier of the runner.","type":"integer"},"type":"array"},"selected_repository_ids":{"description":"List of repository IDs that can access the runner group.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"},"selected_workflows":{"description":"List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.","items":{"description":"Name of workflow the runner group should be allowed to run. Note that a ref, tag, or long SHA is required.","example":"octo-org/octo-repo/.github/workflows/deploy.yaml@main","type":"string"},"type":"array"},"visibility":{"default":"all","description":"Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories.","enum":["selected","all","private"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/runner-group"}},"schema":{"$ref":"#/components/schemas/runner-groups-org"}}},"description":"Response"}}


operation_id: actions/get-self-hosted-runner-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}
method: GET
summary: Get a self-hosted runner group for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific self-hosted runner group for an 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/runner-group-id"}],"requestBody":null}

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


operation_id: actions/delete-self-hosted-runner-group-from-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}
method: DELETE
summary: Delete a self-hosted runner group from an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a self-hosted runner group for 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/runner-group-id"}],"requestBody":null}


operation_id: actions/update-self-hosted-runner-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}
method: PATCH
summary: Update a self-hosted runner group for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Updates the `name` and `visibility` of a self-hosted runner group in an 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/runner-group-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"Expensive hardware runners","visibility":"selected"}}},"schema":{"properties":{"allows_public_repositories":{"default":false,"description":"Whether the runner group can be used by `public` repositories.","type":"boolean"},"name":{"description":"Name of the runner group.","type":"string"},"network_configuration_id":{"description":"The identifier of a hosted compute network configuration.","nullable":true,"type":"string"},"restricted_to_workflows":{"default":false,"description":"If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.","type":"boolean"},"selected_workflows":{"description":"List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.","items":{"description":"Name of workflow the runner group should be allowed to run. Note that a ref, tag, or long SHA is required.","example":"octo-org/octo-repo/.github/workflows/deploy.yaml@main","type":"string"},"type":"array"},"visibility":{"description":"Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories.","enum":["selected","all","private"],"type":"string"}},"required":["name"],"type":"object"}}},"required":true}}

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


operation_id: actions/list-github-hosted-runners-in-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/hosted-runners
method: GET
summary: List GitHub-hosted runners in a group for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists the GitHub-hosted runners in an organization group.

  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/runner-group-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: actions/list-repo-access-to-self-hosted-runner-group-in-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
method: GET
summary: List repository access to a self-hosted runner group in an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists the repositories with access to a self-hosted runner group configured in an 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/runner-group-id"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

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":"number"}},"required":["total_count","repositories"],"type":"object"}}},"description":"Response"}}


operation_id: actions/set-repo-access-to-self-hosted-runner-group-in-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories
method: PUT
summary: Set repository access for a self-hosted runner group in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Replaces the list of repositories that have access to a self-hosted runner group configured in an 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/runner-group-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[32,91]}}},"schema":{"properties":{"selected_repository_ids":{"description":"List of repository IDs that can access the runner group.","items":{"description":"Unique identifier of the repository.","type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: actions/add-repo-access-to-self-hosted-runner-group-in-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
method: PUT
summary: Add repository access to a self-hosted runner group in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to the list of repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-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/runner-group-id"},{"$ref":"#/components/parameters/repository-id"}],"requestBody":null}


operation_id: actions/remove-repo-access-to-self-hosted-runner-group-in-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}
method: DELETE
summary: Remove repository access to a self-hosted runner group in an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from the list of selected repositories that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an organization](#create-a-self-hosted-runner-group-for-an-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/runner-group-id"},{"$ref":"#/components/parameters/repository-id"}],"requestBody":null}


operation_id: actions/list-self-hosted-runners-in-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
method: GET
summary: List self-hosted runners in a group for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists self-hosted runners that are in a specific organization group.

  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/runner-group-id"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: actions/set-self-hosted-runners-in-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/runners
method: PUT
summary: Set self-hosted runners in a group for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Replaces the list of self-hosted runners that are part of an organization runner group.

  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/runner-group-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"runners":[9,2]}}},"schema":{"properties":{"runners":{"description":"List of runner IDs to add to the runner group.","items":{"description":"Unique identifier of the runner.","type":"integer"},"type":"array"}},"required":["runners"],"type":"object"}}},"required":true}}


operation_id: actions/add-self-hosted-runner-to-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
method: PUT
summary: Add a self-hosted runner to a group for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Adds a self-hosted runner to a runner group configured 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/runner-group-id"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}


operation_id: actions/remove-self-hosted-runner-from-group-for-org
path: /orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}
method: DELETE
summary: Remove a self-hosted runner from a group for an organization
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group.

  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/runner-group-id"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}


operation_id: actions/list-self-hosted-runners-for-org
path: /orgs/{org}/actions/runners
method: GET
summary: List self-hosted runners for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all self-hosted runners configured in an organization.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"description":"The name of a self-hosted runner.","in":"query","name":"name","schema":{"type":"string"},"style":"form"},{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: actions/list-runner-applications-for-org
path: /orgs/{org}/actions/runners/downloads
method: GET
summary: List runner applications for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists binaries for the runner application that you can download and run.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint.  If the repository is private, the `repo` scope is also required.

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


operation_id: actions/generate-runner-jitconfig-for-org
path: /orgs/{org}/actions/runners/generate-jitconfig
method: POST
summary: Create configuration for a just-in-time runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Generates a configuration that can be passed to the runner application at startup.

  The authenticated user must have admin access to the organization.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["self-hosted","X64","macOS","no-gpu"],"name":"New runner","runner_group_id":1,"work_folder":"_work"}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to add to the runner. **Minimum items**: 1. **Maximum items**: 100.","items":{"type":"string"},"maxItems":100,"minItems":1,"type":"array"},"name":{"description":"The name of the new runner.","type":"string"},"runner_group_id":{"description":"The ID of the runner group to register the runner to.","type":"integer"},"work_folder":{"default":"_work","description":"The working directory to be used for job execution, relative to the runner install directory.","type":"string"}},"required":["name","runner_group_id","labels"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"$ref":"#/components/responses/actions_runner_jitconfig"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}


operation_id: actions/create-registration-token-for-org
path: /orgs/{org}/actions/runners/registration-token
method: POST
summary: Create a registration token for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns a token that you can pass to the `config` script. The token expires after one hour.

  For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to configure your self-hosted runner:

  ```
  ./config.sh --url https://github.com/octo-org --token TOKEN
  ```

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/authentication-token"}},"schema":{"$ref":"#/components/schemas/authentication-token"}}},"description":"Response"}}


operation_id: actions/create-remove-token-for-org
path: /orgs/{org}/actions/runners/remove-token
method: POST
summary: Create a remove token for an organization
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Returns a token that you can pass to the `config` script to remove a self-hosted runner from an organization. The token expires after one hour.

  For example, you can replace `TOKEN` in the following example with the registration token provided by this endpoint to remove your self-hosted runner from an organization:

  ```
  ./config.sh remove --token TOKEN
  ```

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/authentication-token-2"}},"schema":{"$ref":"#/components/schemas/authentication-token"}}},"description":"Response"}}


operation_id: actions/get-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}
method: GET
summary: Get a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific self-hosted runner configured in an organization.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


operation_id: actions/delete-self-hosted-runner-from-org
path: /orgs/{org}/actions/runners/{runner_id}
method: DELETE
summary: Delete a self-hosted runner from an organization
output_schema: {"204":{"description":"Response"},"422":{"$ref":"#/components/responses/validation_failed_simple"}}
auth_scheme_ref: GitHubBearerToken
description:
  Forces the removal of a self-hosted runner from an organization. You can use this endpoint to completely remove the runner when the machine you were using no longer exists.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":null}


operation_id: actions/list-labels-for-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}/labels
method: GET
summary: List labels for a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Lists all labels for a self-hosted runner configured in an organization.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

output_schema:
  {"200":{"$ref":"#/components/responses/actions_runner_labels"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/set-custom-labels-for-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}/labels
method: PUT
summary: Set custom labels for a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Remove all previous custom labels and set the new custom labels for a specific
  self-hosted runner configured in an organization.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/runner-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["gpu","accelerated"]}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels.","items":{"type":"string"},"maxItems":100,"minItems":0,"type":"array"}},"required":["labels"],"type":"object"}}},"required":true}}

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


operation_id: actions/add-custom-labels-to-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}/labels
method: POST
summary: Add custom labels to a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Adds custom labels to a self-hosted runner configured in an organization.

  Authenticated users must have admin access to the organization to use this endpoint.

  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/runner-id"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"labels":["gpu","accelerated"]}}},"schema":{"properties":{"labels":{"description":"The names of the custom labels to add to the runner.","items":{"type":"string"},"maxItems":100,"minItems":1,"type":"array"}},"required":["labels"],"type":"object"}}},"required":true}}

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


operation_id: actions/remove-all-custom-labels-from-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}/labels
method: DELETE
summary: Remove all custom labels from a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Remove all custom labels from a self-hosted runner configured in an
  organization. Returns the remaining read-only labels from the runner.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

output_schema:
  {"200":{"$ref":"#/components/responses/actions_runner_labels_readonly"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: actions/remove-custom-label-from-self-hosted-runner-for-org
path: /orgs/{org}/actions/runners/{runner_id}/labels/{name}
method: DELETE
summary: Remove a custom label from a self-hosted runner for an organization
auth_scheme_ref: GitHubBearerToken
description:
  Remove a custom label from a self-hosted runner configured
  in an organization. Returns the remaining labels from the runner.

  This endpoint returns a `404 Not Found` status if the custom label is not
  present on the runner.

  Authenticated users must have admin access to the organization to use this endpoint.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


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

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


operation_id: actions/get-org-public-key
path: /orgs/{org}/actions/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.

  The authenticated user must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to use this endpoint. If the repository is private, OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

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


operation_id: actions/get-org-secret
path: /orgs/{org}/actions/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.

  The authenticated user must have collaborator access to a repository to create, update, or read secrets

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}

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


operation_id: actions/create-or-update-org-secret
path: /orgs/{org}/actions/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)."

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/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/actions/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/actions/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/actions/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/actions/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":["encrypted_value","key_id","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: actions/delete-org-secret
path: /orgs/{org}/actions/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.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}


operation_id: actions/list-selected-repos-for-org-secret
path: /orgs/{org}/actions/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`.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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


operation_id: actions/set-selected-repos-for-org-secret
path: /orgs/{org}/actions/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/actions/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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 [Add selected repository to an organization secret](https://docs.github.com/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/actions/secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: actions/add-selected-repo-to-org-secret
path: /orgs/{org}/actions/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`. For more information about setting the visibility, see [Create or
  update an organization secret](https://docs.github.com/rest/actions/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/secret-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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: actions/remove-selected-repo-from-org-secret
path: /orgs/{org}/actions/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/actions/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/secret-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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: actions/list-org-variables
path: /orgs/{org}/actions/variables
method: GET
summary: List organization variables
auth_scheme_ref: GitHubBearerToken
description:
  Lists all organization variables.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


operation_id: actions/create-org-variable
path: /orgs/{org}/actions/variables
method: POST
summary: Create an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Creates an organization variable that you can reference in a GitHub Actions workflow.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","selected_repository_ids":[1296269,1296280],"value":"octocat","visibility":"selected"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"selected_repository_ids":{"description":"An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.","items":{"type":"integer"},"type":"array"},"value":{"description":"The value of the variable.","type":"string"},"visibility":{"description":"The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.","enum":["all","private","selected"],"type":"string"}},"required":["name","value","visibility"],"type":"object"}}},"required":true}}

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


operation_id: actions/get-org-variable
path: /orgs/{org}/actions/variables/{name}
method: GET
summary: Get an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific variable in an organization.

  The authenticated user must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}

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


operation_id: actions/delete-org-variable
path: /orgs/{org}/actions/variables/{name}
method: DELETE
summary: Delete an organization variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an organization variable using the variable name.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the`admin:org` scope to 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/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}


operation_id: actions/update-org-variable
path: /orgs/{org}/actions/variables/{name}
method: PATCH
summary: Update an organization variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Updates an organization variable that you can reference in a GitHub Actions workflow.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","selected_repository_ids":[1296269,1296280],"value":"octocat","visibility":"selected"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"selected_repository_ids":{"description":"An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.","items":{"type":"integer"},"type":"array"},"value":{"description":"The value of the variable.","type":"string"},"visibility":{"description":"The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.","enum":["all","private","selected"],"type":"string"}},"type":"object"}}},"required":true}}


operation_id: actions/list-selected-repos-for-org-variable
path: /orgs/{org}/actions/variables/{name}/repositories
method: GET
summary: List selected repositories for an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Lists all repositories that can access an organization variable
  that is available to selected repositories.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-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"},"409":{"description":"Response when the visibility of the variable is not set to `selected`"}}


operation_id: actions/set-selected-repos-for-org-variable
path: /orgs/{org}/actions/variables/{name}/repositories
method: PUT
summary: Set selected repositories for an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Replaces all repositories for an organization variable that is available
  to selected repositories. Organization variables that are available to selected
  repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[64780797]}}},"schema":{"properties":{"selected_repository_ids":{"description":"The IDs of the repositories that can access the organization variable.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

output_schema:
  {"204":{"description":"Response"},"409":{"description":"Response when the visibility of the variable is not set to `selected`"}}


operation_id: actions/add-selected-repo-to-org-variable
path: /orgs/{org}/actions/variables/{name}/repositories/{repository_id}
method: PUT
summary: Add selected repository to an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to an organization variable that is available to selected repositories.
  Organization variables that are available to selected repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/variable-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"409":{"description":"Response when the visibility of the variable is not set to `selected`"}}


operation_id: actions/remove-selected-repo-from-org-variable
path: /orgs/{org}/actions/variables/{name}/repositories/{repository_id}
method: DELETE
summary: Remove selected repository from an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from an organization variable that is
  available to selected repositories. Organization variables that are available to
  selected repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"Response"},"409":{"description":"Response when the visibility of the variable is not set to `selected`"}}


operation_id: agents/get-org-public-key
path: /orgs/{org}/agents/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.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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


operation_id: agents/get-org-secret
path: /orgs/{org}/agents/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.

  The authenticated user must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/secret-name"}],"requestBody":null}

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


operation_id: agents/create-or-update-org-secret
path: /orgs/{org}/agents/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)."

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/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/agents/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/agents/secrets#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/agents/secrets#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/agents/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":["encrypted_value","key_id","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: agents/delete-org-secret
path: /orgs/{org}/agents/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.

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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: 121 characters]


operation_id: agents/set-selected-repos-for-org-secret
path: /orgs/{org}/agents/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/agents/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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 [Add selected repository to an organization secret](https://docs.github.com/rest/agents/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/agents/secrets#remove-selected-repository-from-an-organization-secret) endpoints.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}


operation_id: agents/add-selected-repo-to-org-secret
path: /orgs/{org}/agents/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`. For more information about setting the visibility, see [Create or
  update an organization secret](https://docs.github.com/rest/agents/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/secret-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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: agents/remove-selected-repo-from-org-secret
path: /orgs/{org}/agents/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/agents/secrets#create-or-update-an-organization-secret).

  Authenticated users must have collaborator access to a repository to create, update, or read secrets.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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: agents/list-org-variables
path: /orgs/{org}/agents/variables
method: GET
summary: List organization variables
auth_scheme_ref: GitHubBearerToken
description:
  Lists all agent variables available in an organization.
  Returned variables include their values.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


operation_id: agents/create-org-variable
path: /orgs/{org}/agents/variables
method: POST
summary: Create an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Creates an organization agent variable that you can reference in a GitHub Actions workflow.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","selected_repository_ids":[1296269,1296280],"value":"octocat","visibility":"selected"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"selected_repository_ids":{"description":"An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.","items":{"type":"integer"},"type":"array"},"value":{"description":"The value of the variable.","type":"string"},"visibility":{"description":"The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.","enum":["all","private","selected"],"type":"string"}},"required":["name","value","visibility"],"type":"object"}}},"required":true}}

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


operation_id: agents/get-org-variable
path: /orgs/{org}/agents/variables/{name}
method: GET
summary: Get an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific agent variable in an organization.

  The authenticated user must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":null}

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


operation_id: agents/delete-org-variable
path: /orgs/{org}/agents/variables/{name}
method: DELETE
summary: Delete an organization variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an organization agent variable using the variable name.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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: 123 characters]


operation_id: agents/update-org-variable
path: /orgs/{org}/agents/variables/{name}
method: PATCH
summary: Update an organization variable
output_schema: {"204":{"description":"Response"}}
auth_scheme_ref: GitHubBearerToken
description:
  Updates an organization agent variable that you can reference in a GitHub Actions workflow.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"name":"USERNAME","selected_repository_ids":[1296269,1296280],"value":"octocat","visibility":"selected"}}},"schema":{"properties":{"name":{"description":"The name of the variable.","type":"string"},"selected_repository_ids":{"description":"An array of repository ids that can access the organization variable. You can only provide a list of repository ids when the `visibility` is set to `selected`.","items":{"type":"integer"},"type":"array"},"value":{"description":"The value of the variable.","type":"string"},"visibility":{"description":"The type of repositories in the organization that can access the variable. `selected` means only the repositories specified by `selected_repository_ids` can access the variable.","enum":["all","private","selected"],"type":"string"}},"type":"object"}}},"required":true}}


operation_id: agents/list-selected-repos-for-org-variable
path: /orgs/{org}/agents/variables/{name}/repositories
method: GET
summary: List selected repositories for an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Lists all repositories that can access an organization agent variable
  that is available to selected repositories.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-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"},"409":{"description":"Response when the visibility of the variable is not set to `selected`"}}


operation_id: agents/set-selected-repos-for-org-variable
path: /orgs/{org}/agents/variables/{name}/repositories
method: PUT
summary: Set selected repositories for an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Replaces all repositories for an organization agent variable that is available
  to selected repositories. Organization variables that are available to selected
  repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/variable-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"selected_repository_ids":[64780797]}}},"schema":{"properties":{"selected_repository_ids":{"description":"The IDs of the repositories that can access the organization variable.","items":{"type":"integer"},"type":"array"}},"required":["selected_repository_ids"],"type":"object"}}},"required":true}}

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


operation_id: agents/add-selected-repo-to-org-variable
path: /orgs/{org}/agents/variables/{name}/repositories/{repository_id}
method: PUT
summary: Add selected repository to an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Adds a repository to an organization agent variable that is available to selected repositories.
  Organization variables that are available to selected repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth tokens and personal access tokens (classic) need the `admin:org` scope to 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/org"},{"$ref":"#/components/parameters/variable-name"},{"in":"path","name":"repository_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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


operation_id: agents/remove-selected-repo-from-org-variable
path: /orgs/{org}/agents/variables/{name}/repositories/{repository_id}
method: DELETE
summary: Remove selected repository from an organization variable
auth_scheme_ref: GitHubBearerToken
description:
  Removes a repository from an organization agent variable that is
  available to selected repositories. Organization variables that are available to
  selected repositories have their `visibility` field set to `selected`.

  Authenticated users must have collaborator access to a repository to create, update, or read variables.

  OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. If the repository is private, the `repo` scope is also required.

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

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


operation_id: orgs/create-artifact-deployment-record
path: /orgs/{org}/artifacts/metadata/deployment-record
method: POST
summary: Create an artifact deployment record
auth_scheme_ref: GitHubBearerToken
description:
  Create or update deployment records for an artifact associated
  with an organization.
  This endpoint allows you to record information about a specific
  artifact, such as its name, digest, environments, cluster, and
  deployment.
  The deployment name has to be uniqe within a cluster (i.e a
  combination of logical, physical environment and cluster) as it
  identifies unique deployment.
  Multiple requests for the same combination of logical, physical
  environment, cluster and deployment name will only create one
  record, successive request will update the existing record.
  This allows for a stable tracking of a deployment where the actual
  deployed artifact can change over time.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"cluster":"moda-1","deployment_name":"deployment-pod","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","logical_environment":"prod","name":"awesome-image","physical_environment":"pacific-east","status":"deployed","tags":{"data-access":"sensitive"}}}},"schema":{"properties":{"cluster":{"description":"The deployment cluster.","maxLength":128,"type":"string"},"deployment_name":{"description":"The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a cluster, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\n","maxLength":256,"type":"string"},"digest":{"description":"The hex encoded digest of the artifact.","maxLength":71,"minLength":71,"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"github_repository":{"description":"The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.","example":"my-github-repo","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9.\\-_]+$","type":"string"},"logical_environment":{"description":"The stage of the deployment.","maxLength":128,"minLength":1,"type":"string"},"name":{"description":"The name of the artifact.","example":"libfoo","maxLength":256,"minLength":1,"type":"string"},"physical_environment":{"description":"The physical region of the deployment.","maxLength":128,"type":"string"},"return_records":{"default":true,"description":"If true, the endpoint will return the created or updated record in the response body.\n","type":"boolean"},"runtime_risks":{"description":"A list of runtime risks associated with the deployment.","items":{"enum":["critical-resource","internet-exposed","lateral-movement","sensitive-data"],"type":"string"},"maxItems":4,"type":"array","uniqueItems":true},"status":{"description":"The status of the artifact. Can be either deployed or decommissioned.","enum":["deployed","decommissioned"],"type":"string"},"tags":{"additionalProperties":{"type":"string"},"description":"The tags associated with the deployment.","maxProperties":5,"type":"object"},"version":{"description":"The artifact version.","example":"1.2.3","maxLength":100,"minLength":1,"type":"string","x-multi-segment":true}},"required":["name","digest","status","logical_environment","deployment_name"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact-deployment-record-list"}},"schema":{"properties":{"deployment_records":{"items":{"$ref":"#/components/schemas/artifact-deployment-record"},"type":"array"},"total_count":{"description":"The number of deployment records created","type":"integer"}},"required":["total_count"],"type":"object"}}},"description":"Artifact deployment record stored successfully."},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/set-cluster-deployment-records
path: /orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}
method: POST
summary: Set cluster deployment records
auth_scheme_ref: GitHubBearerToken
description:
  Set deployment records for a given cluster.
  If proposed records in the 'deployments' field have identical 'cluster', 'logical_environment',
  'physical_environment', and 'deployment_name' values as existing records, the existing records will be updated.
  If no existing records match, new records will be created.
  Note: Artifacts are uniquely identified by the combination of their repository and digest fields. If two entries in the deployments
  array resolve to the same repository and have identical digest fields but differing name and version fields, the endpoint will use
  the artifact name and version from the record processed first, since a single artifact (identified by repository and digest) can
  only have one name and version.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The cluster name.","in":"path","name":"cluster","required":true,"schema":{"maxLength":128,"minLength":1,"pattern":"^[a-zA-Z0-9._-]+$","type":"string"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"deployments":[{"deployment_name":"deployment-pod","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","name":"awesome-image","runtime_risks":["sensitive-data"],"status":"deployed","tags":{"owning-team":"platform"},"version":"2.1.0"}],"logical_environment":"prod","physical_environment":"pacific-east"}}},"schema":{"properties":{"deployments":{"description":"The list of deployments to record.","items":{"properties":{"deployment_name":{"description":"The unique identifier for the deployment represented by the new record. To accommodate differing\ncontainers and namespaces within a record set, the following format is recommended:\n{namespaceName}-{deploymentName}-{containerName}.\nThe deployment_name must be unique across all entries in the deployments array.\n","maxLength":256,"minLength":1,"type":"string"},"digest":{"description":"The hex encoded digest of the artifact.","maxLength":71,"minLength":71,"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"github_repository":{"description":"The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.","example":"my-github-repo","maxLength":100,"pattern":"^[A-Za-z0-9.\\-_]+$","type":"string"},"name":{"description":"The name of the artifact.","maxLength":256,"minLength":1,"type":"string"},"runtime_risks":{"description":"A list of runtime risks associated with the deployment.","items":{"enum":["critical-resource","internet-exposed","lateral-movement","sensitive-data"],"type":"string"},"maxItems":4,"type":"array","uniqueItems":true},"status":{"default":"deployed","description":"The deployment status of the artifact.","enum":["deployed","decommissioned"],"type":"string"},"tags":{"additionalProperties":{"type":"string"},"description":"Key-value pairs to tag the deployment record.","type":"object"},"version":{"description":"The artifact version.","example":"1.2.3","maxLength":100,"type":"string","x-multi-segment":true}},"required":["name","deployment_name","digest"],"type":"object"},"maxItems":1000,"type":"array"},"logical_environment":{"description":"The stage of the deployment.","maxLength":128,"minLength":1,"type":"string"},"physical_environment":{"description":"The physical region of the deployment.","maxLength":128,"type":"string"},"return_records":{"default":true,"description":"If true, the endpoint will return the set records in the response body\n","type":"boolean"}},"required":["logical_environment","deployments"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact-deployment-record-list"}},"schema":{"properties":{"deployment_records":{"items":{"$ref":"#/components/schemas/artifact-deployment-record"},"type":"array"},"total_count":{"description":"The number of deployment records created","type":"integer"}},"required":["total_count"],"type":"object"}}},"description":"Deployment records created or updated successfully.\n"},"403":{"content":{"application/json":{"examples":{"insufficient_repo_permissions":{"value":{"message":{"cause":"artifact metadata write permission required on one or more repositories","repositories":[123,345]}}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"examples":{"not_found":{"value":{"message":{"cause":"One or more repositories do not exist","repositories":["repoA","repoB"]}}}},"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Resource not found"}}


operation_id: orgs/create-artifact-storage-record
path: /orgs/{org}/artifacts/metadata/storage-record
method: POST
summary: Create artifact metadata storage record
auth_scheme_ref: GitHubBearerToken
description:
  Create metadata storage records for artifacts associated with an organization.
  This endpoint will create a new artifact storage record on behalf of any artifact matching the provided digest and
  associated with a repository owned by the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"artifact_url":"https://reg.example.com/artifactory/bar/libfoo-1.2.3","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","name":"libfoo","registry_url":"https://reg.example.com/artifactory/","repository":"bar","status":"active","version":"1.2.3"}}},"schema":{"properties":{"artifact_url":{"description":"The URL where the artifact is stored.","example":"https://reg.example.com/artifactory/bar/libfoo-1.2.3","format":"uri","maxLength":152,"pattern":"^https://","type":"string"},"digest":{"description":"The digest of the artifact (algorithm:hex-encoded-digest).","example":"sha256:0ecbaa601dba202129058746c7d8e3f282d0efb5fff0...","maxLength":71,"minLength":71,"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"github_repository":{"description":"The name of the GitHub repository associated with the artifact. This should be used\nwhen there are no provenance attestations available for the artifact. The repository\nmust belong to the organization specified in the path parameter.\n\nIf a provenance attestation is available for the artifact, the API will use\nthe repository information from the attestation instead of this parameter.","example":"my-github-repo","maxLength":100,"minLength":1,"pattern":"^[A-Za-z0-9.\\-_]+$","type":"string"},"name":{"description":"The name of the artifact.","example":"libfoo","maxLength":256,"minLength":1,"type":"string"},"path":{"description":"The path of the artifact.","example":"com/github/bar/libfoo-1.2.3","format":"uri","maxLength":512,"type":"string"},"registry_url":{"description":"The base URL of the artifact registry.","example":"https://reg.example.com/artifactory/","format":"uri","maxLength":256,"minLength":1,"pattern":"^https://","type":"string"},"repository":{"description":"The repository name within the registry.","example":"bar","maxLength":128,"type":"string"},"return_records":{"default":true,"description":"If true, the endpoint will return the created record in the response body.\n","type":"boolean"},"status":{"default":"active","description":"The status of the artifact (e.g., active, inactive).","enum":["active","eol","deleted"],"example":"active","type":"string"},"version":{"description":"The artifact version.","example":"1.2.3","maxLength":100,"minLength":1,"type":"string","x-multi-segment":true}},"required":["name","digest","registry_url"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"storage_records":[{"artifact_url":"https://reg.example.com/artifactory/bar/libfoo-1.2.3","created_at":"2023-10-01T12:00:00Z","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","name":"libfoo","registry_url":"https://reg.example.com/artifactory/","repository":"bar","status":"active","updated_at":"2023-10-01T12:00:00Z"}],"total_count":1}}},"schema":{"properties":{"storage_records":{"items":{"properties":{"artifact_url":{"nullable":true,"type":"string"},"created_at":{"type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"registry_url":{"type":"string"},"repository":{"nullable":true,"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},"type":"array"},"total_count":{"example":1,"type":"integer"}},"required":["total_count"],"type":"object"}}},"description":"Artifact metadata storage record stored successfully."},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: orgs/list-artifact-deployment-records
path: /orgs/{org}/artifacts/{subject_digest}/metadata/deployment-records
method: GET
summary: List artifact deployment records
description: List deployment records for an artifact metadata associated with an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/subject-digest"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/artifact-deployment-record-list"}},"schema":{"properties":{"deployment_records":{"items":{"$ref":"#/components/schemas/artifact-deployment-record"},"type":"array"},"total_count":{"description":"The number of deployment records for this digest and organization","example":3,"type":"integer"}},"type":"object"}}},"description":"Successful response"}}


operation_id: orgs/list-artifact-storage-records
path: /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records
method: GET
summary: List artifact storage records
auth_scheme_ref: GitHubBearerToken
description:
  List artifact storage records with a given subject digest for repositories owned by an organization.

  Results are filtered by the authenticated user's permissions; records for repositories the user cannot read are omitted. Fine-grained access tokens require the `artifact-metadata:read` permission.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`.","example":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","in":"path","name":"subject_digest","required":true,"schema":{"maxLength":71,"minLength":71,"pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"storage_records":[{"artifact_url":"https://reg.example.com/artifactory/bar/libfoo-1.2.3","created_at":"2023-10-01T12:00:00Z","digest":"sha256:1bb1e949e55dcefc6353e7b36c8897d2a107d8e8dca49d4e3c0ea8493fc0bc72","name":"libfoo-1.2.3","registry_url":"https://reg.example.com/artifactory/","repository":"bar","status":"active","updated_at":"2023-10-01T12:00:00Z"}]}}},"schema":{"properties":{"storage_records":{"items":{"properties":{"artifact_url":{"type":"string"},"created_at":{"type":"string"},"digest":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"registry_url":{"type":"string"},"repository":{"type":"string"},"status":{"type":"string"},"updated_at":{"type":"string"}},"type":"object"},"type":"array"},"total_count":{"description":"The number of storage records for this digest and organization","example":3,"type":"integer"}},"type":"object"}}},"description":"Response"}}


operation_id: orgs/list-attestations-bulk
path: /orgs/{org}/attestations/bulk-list
method: POST
summary: List attestations by bulk subject digests
auth_scheme_ref: GitHubBearerToken
description:
  List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization.

  The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.

  **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/bulk-subject-digest-body"},"withPredicateType":{"$ref":"#/components/examples/bulk-subject-digest-body-with-predicate-type"}},"schema":{"properties":{"predicate_type":{"description":"Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types.","type":"string"},"subject_digests":{"description":"List of subject digests to fetch attestations for.","items":{"type":"string"},"maxItems":1024,"minItems":1,"type":"array"}},"required":["subject_digests"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/list-attestations-bulk"}},"schema":{"properties":{"attestations_subject_digests":{"additionalProperties":{"items":{"properties":{"bundle_url":{"type":"string"},"repository_id":{"type":"integer"}},"type":"object"},"nullable":true,"type":"array"},"description":"Mapping of subject digest to bundles.","type":"object"},"page_info":{"description":"Information about the current page.","properties":{"has_next":{"description":"Indicates whether there is a next page.","type":"boolean"},"has_previous":{"description":"Indicates whether there is a previous page.","type":"boolean"},"next":{"description":"The cursor to the next page.","type":"string"},"previous":{"description":"The cursor to the previous page.","type":"string"}},"type":"object"}},"type":"object"}}},"description":"Response"}}


operation_id: orgs/delete-attestations-bulk
path: /orgs/{org}/attestations/delete-request
method: POST
summary: Delete attestations in bulk
description: Delete artifact attestations in bulk by either subject digests or unique ID.
output_schema: {"200":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"by-attestation-ids":{"summary":"Delete by attestation IDs","value":{"attestation_ids":[111,222]}},"by-subject-digests":{"summary":"Delete by subject digests","value":{"subject_digests":["sha256:abc123","sha512:def456"]}}},"schema":{"description":"The request body must include either `subject_digests` or `attestation_ids`, but not both.","oneOf":[{"properties":{"subject_digests":{"description":"List of subject digests associated with the artifact attestations to delete.","items":{"type":"string"},"maxItems":1024,"minItems":1,"type":"array"}},"required":["subject_digests"]},{"properties":{"attestation_ids":{"description":"List of unique IDs associated with the artifact attestations to delete.","items":{"type":"integer"},"maxItems":1024,"minItems":1,"type":"array"}},"required":["attestation_ids"]}],"type":"object"}}},"required":true}}


operation_id: orgs/delete-attestations-by-subject-digest
path: /orgs/{org}/attestations/digest/{subject_digest}
method: DELETE
summary: Delete attestations by subject digest
description: Delete an artifact attestation by subject digest.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Subject Digest","in":"path","name":"subject_digest","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true}],"requestBody":null}

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


operation_id: orgs/list-attestation-repositories
path: /orgs/{org}/attestations/repositories
method: GET
summary: List attestation repositories
auth_scheme_ref: GitHubBearerToken
description:
  List repositories owned by the provided organization that have created at least one attested artifact
  Results will be sorted in ascending order by repository ID

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/org"},{"description":"Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types.","in":"query","name":"predicate_type","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/list-attestation-repositories"}},"schema":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"Response"}}


operation_id: orgs/delete-attestations-by-id
path: /orgs/{org}/attestations/{attestation_id}
method: DELETE
summary: Delete attestations by ID
description: Delete an artifact attestation by unique ID that is associated with a repository owned by an org.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"},{"description":"Attestation ID","in":"path","name":"attestation_id","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":null}

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


operation_id: orgs/list-attestations
path: /orgs/{org}/attestations/{subject_digest}
method: GET
summary: List attestations
auth_scheme_ref: GitHubBearerToken
description:
  List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.

  The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.

  **Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/pagination-before"},{"$ref":"#/components/parameters/pagination-after"},{"$ref":"#/components/parameters/org"},{"description":"The parameter should be set to the attestation's subject's SHA256 digest, in the form `sha256:HEX_DIGEST`.","in":"path","name":"subject_digest","required":true,"schema":{"type":"string"},"style":"simple","x-multi-segment":true},{"description":"Optional filter for fetching attestations with a given predicate type.\nThis option accepts `provenance`, `sbom`, `release`, or freeform text\nfor custom predicate types.","in":"query","name":"predicate_type","schema":{"type":"string"},"style":"form"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/list-attestations"}},"schema":{"properties":{"attestations":{"items":{"properties":{"bundle_url":{"type":"string"},"initiator":{"type":"string"},"repository_id":{"type":"integer"}},"type":"object"},"type":"array"}},"type":"object"}}},"description":"Response"}}


operation_id: orgs/list-blocked-users
path: /orgs/{org}/blocks
method: GET
summary: List users blocked by an organization
description: List the users blocked by an organization.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 158 characters]

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


