# endpoints

operation_id: codespaces/delete-for-authenticated-user
path: /user/codespaces/{codespace_name}
method: DELETE
summary: Delete a codespace for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a user's codespace.

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

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


operation_id: codespaces/update-for-authenticated-user
path: /user/codespaces/{codespace_name}
method: PATCH
summary: Update a codespace for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint.

  If you specify a new machine type it will be applied the next time your codespace is started.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"machine":"standardLinux"}}},"schema":{"properties":{"display_name":{"description":"Display name for this codespace","type":"string"},"machine":{"description":"A valid machine to transition this codespace to.","type":"string"},"recent_folders":{"description":"Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in.","items":{"type":"string"},"type":"array"}},"type":"object"}}}}}

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


operation_id: codespaces/export-for-authenticated-user
path: /user/codespaces/{codespace_name}/exports
method: POST
summary: Export a codespace for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored.

  If changes cannot be pushed to the codespace's repository, they will be pushed to a new or previously-existing fork instead.

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

output_schema:
  {"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/user-export-details"}},"schema":{"$ref":"#/components/schemas/codespace-export-details"}}},"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"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/get-export-details-for-authenticated-user
path: /user/codespaces/{codespace_name}/exports/{export_id}
method: GET
summary: Get details about a codespace export
auth_scheme_ref: GitHubBearerToken
description:
  Gets information about an export of a codespace.

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

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

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


operation_id: codespaces/codespace-machines-for-authenticated-user
path: /user/codespaces/{codespace_name}/machines
method: GET
summary: List machine types for a codespace
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  List the machine types a codespace can transition to use.

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

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


operation_id: codespaces/publish-for-authenticated-user
path: /user/codespaces/{codespace_name}/publish
method: POST
summary: Create a repository from an unpublished codespace
auth_scheme_ref: GitHubBearerToken
description:
  Publishes an unpublished codespace, creating a new repository and assigning it to the codespace.

  The codespace's token is granted write permissions to the repository, allowing the user to push their changes.

  This will fail for a codespace that is already published, meaning it has an associated repository.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"private":false,"repository":"monalisa-octocat-hello-world-g4wpq6h95q"}}},"schema":{"properties":{"name":{"description":"A name for the new repository.","type":"string"},"private":{"default":false,"description":"Whether the new repository should be private.","type":"boolean"}},"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace-with-full-repository"}},"schema":{"$ref":"#/components/schemas/codespace-with-full-repository"}}},"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: codespaces/start-for-authenticated-user
path: /user/codespaces/{codespace_name}/start
method: POST
summary: Start a codespace for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Starts a user's codespace.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/codespace"}},"schema":{"$ref":"#/components/schemas/codespace"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"400":{"$ref":"#/components/responses/bad_request"},"401":{"$ref":"#/components/responses/requires_authentication"},"402":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Payment required"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"409":{"$ref":"#/components/responses/conflict"},"500":{"$ref":"#/components/responses/internal_error"}}


operation_id: codespaces/stop-for-authenticated-user
path: /user/codespaces/{codespace_name}/stop
method: POST
summary: Stop a codespace for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/codespace-name"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Stops a user's codespace.

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

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


operation_id: packages/list-docker-migration-conflicting-packages-for-authenticated-user
path: /user/docker/conflicts
method: GET
summary: Get list of conflicting packages during Docker migration for authenticated-user
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all packages that are owned by the authenticated user within the user's namespace, and that encountered a conflict during a Docker migration.

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

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


operation_id: users/set-primary-email-visibility-for-authenticated-user
path: /user/email/visibility
method: PATCH
summary: Set primary email visibility for the authenticated user
description: Sets the visibility for your primary email addresses.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example setting the primary email address to private","value":{"visibility":"private"}}},"schema":{"properties":{"visibility":{"description":"Denotes whether an email is publicly visible.","enum":["public","private"],"type":"string"}},"required":["visibility"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/email-items-3"}},"schema":{"items":{"$ref":"#/components/schemas/email"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/list-emails-for-authenticated-user
path: /user/emails
method: GET
summary: List email addresses for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists all of your email addresses, and specifies which one is visible
  to the public.

  OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use 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/email-items-2"}},"schema":{"items":{"$ref":"#/components/schemas/email"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/add-email-for-authenticated-user
path: /user/emails
method: POST
summary: Add an email address for the authenticated user
description: OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example adding multiple email addresses","value":{"emails":["octocat@github.com","mona@github.com","octocat@octocat.org"]}}},"schema":{"oneOf":[{"example":{"emails":["octocat@github.com","mona@github.com"]},"properties":{"emails":{"description":"Adds one or more email addresses to your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.","example":[],"items":{"example":"username@example.com","type":"string"},"minItems":1,"type":"array"}},"required":["emails"],"type":"object"},{"items":{"example":"username@example.com","type":"string"},"minItems":1,"type":"array"},{"type":"string"}]}}}}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/email-items"}},"schema":{"items":{"$ref":"#/components/schemas/email"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/delete-email-for-authenticated-user
path: /user/emails
method: DELETE
summary: Delete an email address for the authenticated user
description: OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Example deleting multiple email accounts","value":{"emails":["octocat@github.com","mona@github.com"]}}},"schema":{"oneOf":[{"description":"Deletes one or more email addresses from your GitHub account. Must contain at least one email address. **Note:** Alternatively, you can pass a single email address or an `array` of emails addresses directly, but we recommend that you pass an object using the `emails` key.","example":{"emails":["octocat@github.com","mona@github.com"]},"properties":{"emails":{"description":"Email addresses associated with the GitHub user account.","items":{"example":"username@example.com","type":"string"},"minItems":1,"type":"array"}},"required":["emails"],"type":"object"},{"items":{"example":"username@example.com","type":"string"},"minItems":1,"type":"array"},{"type":"string"}]}}}}}

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


operation_id: users/list-followers-for-authenticated-user
path: /user/followers
method: GET
summary: List followers of the authenticated user
description: Lists the people following the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 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","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: users/check-person-is-followed-by-authenticated
path: /user/following/{username}
method: GET
summary: Check if a person is followed by the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"204":{"description":"if the person is followed by the authenticated user"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"if the person is not followed by the authenticated user"}}


operation_id: users/follow
path: /user/following/{username}
method: PUT
summary: Follow a user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"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 verbs](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."

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

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


operation_id: users/unfollow
path: /user/following/{username}
method: DELETE
summary: Unfollow a user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.

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


operation_id: users/list-gpg-keys-for-authenticated-user
path: /user/gpg_keys
method: GET
summary: List GPG keys for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the current user's GPG keys.

  OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use 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/gpg-key-items"}},"schema":{"items":{"$ref":"#/components/schemas/gpg-key"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/create-gpg-key-for-authenticated-user
path: /user/gpg_keys
method: POST
summary: Create a GPG key for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Adds a GPG key to the authenticated user's GitHub account.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"armored_public_key":"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQINBFnZ2ZIBEADQ2Z7Z7\n-----END PGP PUBLIC KEY BLOCK-----","name":"Octocat's GPG Key"}}},"schema":{"properties":{"armored_public_key":{"description":"A GPG key in ASCII-armored format.","type":"string"},"name":{"description":"A descriptive name for the new key.","type":"string"}},"required":["armored_public_key"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/gpg-key"}},"schema":{"$ref":"#/components/schemas/gpg-key"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/get-gpg-key-for-authenticated-user
path: /user/gpg_keys/{gpg_key_id}
method: GET
summary: Get a GPG key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/gpg-key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  View extended details for a single GPG key.

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

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


operation_id: users/delete-gpg-key-for-authenticated-user
path: /user/gpg_keys/{gpg_key_id}
method: DELETE
summary: Delete a GPG key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/gpg-key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a GPG key from the authenticated user's GitHub account.

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

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


operation_id: apps/list-installations-for-authenticated-user
path: /user/installations
method: GET
summary: List app installations accessible to the user access token
auth_scheme_ref: GitHubBearerToken
description:
  Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.

  The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

  You can find the permissions for the installation under the `permissions` key.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/base-installation-for-auth-user-paginated"}},"schema":{"properties":{"installations":{"items":{"$ref":"#/components/schemas/installation"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","installations"],"type":"object"}}},"description":"You can find the permissions for the installation under the `permissions` key.","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/list-installation-repos-for-authenticated-user
path: /user/installations/{installation_id}/repositories
method: GET
summary: List repositories accessible to the user access token
auth_scheme_ref: GitHubBearerToken
description:
  List repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access for an installation.

  The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

  The access the user has to each repository is included in the hash under the `permissions` key.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/installation-id"},{"$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":{"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":{"type":"string"},"total_count":{"type":"integer"}},"required":["total_count","repositories"],"type":"object"}}},"description":"The access the user has to each repository is included in the hash under the `permissions` key.","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: apps/add-repo-to-installation-for-authenticated-user
path: /user/installations/{installation_id}/repositories/{repository_id}
method: PUT
summary: Add a repository to an app installation
auth_scheme_ref: GitHubBearerToken
description:
  Add a single repository to an installation. The authenticated user must have admin access to the repository.

  This endpoint only works for PATs (classic) with the `repo` scope.

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

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


operation_id: apps/remove-repo-from-installation-for-authenticated-user
path: /user/installations/{installation_id}/repositories/{repository_id}
method: DELETE
summary: Remove a repository from an app installation
auth_scheme_ref: GitHubBearerToken
description:
  Remove a single repository from an installation. The authenticated user must have admin access to the repository. The installation must have the `repository_selection` of `selected`.

  This endpoint only works for PATs (classic) with the `repo` scope.

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

output_schema:
  {"204":{"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"description":"Returned when the application is installed on `all` repositories in the organization, or if this request would remove the last repository that the application has access to in the organization."}}


operation_id: interactions/get-restrictions-for-authenticated-user
path: /user/interaction-limits
method: GET
summary: Get interaction restrictions for your public repositories
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Shows which type of GitHub user can interact with your public repositories and when the restriction expires.

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


operation_id: interactions/set-restrictions-for-authenticated-user
path: /user/interaction-limits
method: PUT
summary: Set interaction restrictions for your public repositories
auth_scheme_ref: GitHubBearerToken
description:
  Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user.

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

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


operation_id: issues/list-for-authenticated-user
path: /user/issues
method: GET
summary: List user account issues assigned to the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  List issues across owned and member repositories assigned to the authenticated user.

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

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

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

input_schema:
  {"parameters":[{"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"},{"$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"}}


operation_id: users/list-public-ssh-keys-for-authenticated-user
path: /user/keys
method: GET
summary: List public SSH keys for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the public SSH keys for the authenticated user's GitHub account.

  OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use 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/key-items"}},"schema":{"items":{"$ref":"#/components/schemas/key"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/create-public-ssh-key-for-authenticated-user
path: /user/keys
method: POST
summary: Create a public SSH key for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Adds a public SSH key to the authenticated user's GitHub account.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"key":"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234","title":"ssh-rsa AAAAB3NzaC1yc2EAAA"}}},"schema":{"properties":{"key":{"description":"The public SSH key to add to your GitHub account.","pattern":"^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) ","type":"string"},"title":{"description":"A descriptive name for the new key.","example":"Personal MacBook Air","type":"string"}},"required":["key"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/key"}},"schema":{"$ref":"#/components/schemas/key"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/get-public-ssh-key-for-authenticated-user
path: /user/keys/{key_id}
method: GET
summary: Get a public SSH key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  View extended details for a single public SSH key.

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

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


operation_id: users/delete-public-ssh-key-for-authenticated-user
path: /user/keys/{key_id}
method: DELETE
summary: Delete a public SSH key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Removes a public SSH key from the authenticated user's GitHub account.

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

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


operation_id: apps/list-subscriptions-for-authenticated-user
path: /user/marketplace_purchases
method: GET
summary: List subscriptions for the authenticated user
description: Lists the active subscriptions for the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 characters]

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


operation_id: apps/list-subscriptions-for-authenticated-user-stubbed
path: /user/marketplace_purchases/stubbed
method: GET
summary: List subscriptions for the authenticated user (stubbed)
description: Lists the active subscriptions for the authenticated user.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 characters]

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


operation_id: orgs/list-memberships-for-authenticated-user
path: /user/memberships/orgs
method: GET
summary: List organization memberships for the authenticated user
description: Lists all of the authenticated user's organization memberships.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"description":"Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships.","in":"query","name":"state","schema":{"enum":["active","pending"],"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/org-membership-items"}},"schema":{"items":{"$ref":"#/components/schemas/org-membership"},"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: orgs/get-membership-for-authenticated-user
path: /user/memberships/orgs/{org}
method: GET
summary: Get an organization membership for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization.

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


operation_id: orgs/update-membership-for-authenticated-user
path: /user/memberships/orgs/{org}
method: PATCH
summary: Update an organization membership for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"state":"active"}}},"schema":{"properties":{"state":{"description":"The state that the membership should be in. Only `\"active\"` will be accepted.","enum":["active"],"type":"string"}},"required":["state"],"type":"object"}}},"required":true}}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-membership-2"}},"schema":{"$ref":"#/components/schemas/org-membership"}}},"description":"The user's organization invitation was accepted synchronously."},"202":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/org-membership-2"}},"schema":{"$ref":"#/components/schemas/org-membership"}}},"description":"The acceptance of the user's organization invitation is being processed asynchronously."},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: migrations/list-for-authenticated-user
path: /user/migrations
method: GET
summary: List user migrations
description: Lists all migrations a user has started.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 characters]

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/migration-items"}},"schema":{"items":{"$ref":"#/components/schemas/migration"},"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: migrations/start-for-authenticated-user
path: /user/migrations
method: POST
summary: Start a user migration
description: Initiates the generation of a user migration archive.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"lock_repositories":true,"repositories":["octocat/Hello-World"]}}},"schema":{"properties":{"exclude":{"description":"Exclude attributes from the API response to improve performance","example":["repositories"],"items":{"description":"Allowed values that can be passed to the exclude param.","enum":["repositories"],"example":"repositories","type":"string"},"type":"array"},"exclude_attachments":{"description":"Do not include attachments in the migration","example":true,"type":"boolean"},"exclude_git_data":{"description":"Indicates whether the repository git data should be excluded from the migration.","example":true,"type":"boolean"},"exclude_metadata":{"description":"Indicates whether metadata should be excluded and only git source should be included for the migration.","example":true,"type":"boolean"},"exclude_owner_projects":{"description":"Indicates whether projects owned by the organization or users should be excluded.","example":true,"type":"boolean"},"exclude_releases":{"description":"Do not include releases in the migration","example":true,"type":"boolean"},"lock_repositories":{"description":"Lock the repositories being migrated at the start of the migration","example":true,"type":"boolean"},"org_metadata_only":{"default":false,"description":"Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags).","example":true,"type":"boolean"},"repositories":{"items":{"description":"Repository path, owner and name","example":"acme/widgets","type":"string"},"type":"array"}},"required":["repositories"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/migration-2"}},"schema":{"$ref":"#/components/schemas/migration"}}},"description":"Response"},"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: migrations/get-status-for-authenticated-user
path: /user/migrations/{migration_id}
method: GET
summary: Get a user migration status
auth_scheme_ref: GitHubBearerToken
description:
  Fetches a single user migration. The response includes the `state` of the migration, which can be one of the following values:

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

  Once the migration has been `exported` you can [download the migration archive](https://docs.github.com/rest/migrations/users#download-a-user-migration-archive).

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/migration-id"},{"in":"query","name":"exclude","schema":{"items":{"type":"string"},"type":"array"},"style":"form"}],"requestBody":null}

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


operation_id: migrations/get-archive-for-authenticated-user
path: /user/migrations/{migration_id}/archive
method: GET
summary: Download a user migration archive
input_schema: {"parameters":[{"$ref":"#/components/parameters/migration-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Fetches the URL to download the migration archive as a `tar.gz` file. Depending on the resources your repository uses, the migration archive can contain JSON files with data for these objects:

  *   attachments
  *   bases
  *   commit\_comments
  *   issue\_comments
  *   issue\_events
  *   issues
  *   milestones
  *   organizations
  *   projects
  *   protected\_branches
  *   pull\_request\_reviews
  *   pull\_requests
  *   releases
  *   repositories
  *   review\_comments
  *   schema
  *   users

  The archive will also contain an `attachments` directory that includes all attachment files uploaded to GitHub.com and a `repositories` directory that contains the repository's Git data.

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


operation_id: migrations/delete-archive-for-authenticated-user
path: /user/migrations/{migration_id}/archive
method: DELETE
summary: Delete a user migration archive
input_schema: {"parameters":[{"$ref":"#/components/parameters/migration-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/migrations/users#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/migrations/users#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted.

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


operation_id: migrations/unlock-repo-for-authenticated-user
path: /user/migrations/{migration_id}/repos/{repo_name}/lock
method: DELETE
summary: Unlock a user repository
auth_scheme_ref: GitHubBearerToken
description:
  Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/migrations/users#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/repos/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked.

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

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


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

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


operation_id: orgs/list-for-authenticated-user
path: /user/orgs
method: GET
summary: List organizations for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  List organizations for the authenticated user.

  For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with `read:org` scope, you can publicize your organization membership with `user` scope, etc.). Therefore, this API requires at least `user` or `read:org` scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a `403 Forbidden` response.

  > [!NOTE]
  > Requests using a fine-grained access token will receive a `200 Success` response with an empty list.

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

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":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"}}


operation_id: packages/list-packages-for-authenticated-user
path: /user/packages
method: GET
summary: List packages for the authenticated user's namespace
auth_scheme_ref: GitHubBearerToken
description:
  Lists packages owned by the authenticated user within the user's namespace.

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

input_schema:
  {"parameters":[{"description":"The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.","in":"query","name":"package_type","required":true,"schema":{"enum":["npm","maven","rubygems","docker","nuget","container"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/package-visibility"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

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


operation_id: packages/get-package-for-authenticated-user
path: /user/packages/{package_type}/{package_name}
method: GET
summary: Get a package for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package for a package owned by the authenticated user.

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

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

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


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

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

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

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


operation_id: packages/restore-package-for-authenticated-user
path: /user/packages/{package_type}/{package_name}/restore
method: POST
summary: Restore a package for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Restores a package owned by the authenticated user.

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

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

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

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


operation_id: packages/get-all-package-versions-for-package-owned-by-authenticated-user
path: /user/packages/{package_type}/{package_name}/versions
method: GET
summary: List package versions for a package owned by the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists package versions for a package owned by the authenticated user.

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

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

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


operation_id: packages/get-package-version-for-authenticated-user
path: /user/packages/{package_type}/{package_name}/versions/{package_version_id}
method: GET
summary: Get a package version for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package version for a package owned by the authenticated user.

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

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

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


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

  The authenticated user must have admin permissions in the organization to use this endpoint.

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

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

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


operation_id: packages/restore-package-version-for-authenticated-user
path: /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
method: POST
summary: Restore a package version for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Restores a package version owned by the authenticated user.

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

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

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

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


operation_id: users/list-public-emails-for-authenticated-user
path: /user/public_emails
method: GET
summary: List public email addresses for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists your publicly visible email address, which you can set with the
  [Set primary email visibility for the authenticated user](https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)
  endpoint.

  OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use 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/email-items-2"}},"schema":{"items":{"$ref":"#/components/schemas/email"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: repos/list-for-authenticated-user
path: /user/repos
method: GET
summary: List repositories for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.

  The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

input_schema:
  {"parameters":[{"description":"Limit results to repositories with the specified visibility.","in":"query","name":"visibility","schema":{"default":"all","enum":["all","public","private"],"type":"string"},"style":"form"},{"description":"Comma-separated list of values. Can include:  \n * `owner`: Repositories that are owned by the authenticated user.  \n * `collaborator`: Repositories that the user has been added to as a collaborator.  \n * `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.","in":"query","name":"affiliation","schema":{"default":"owner,collaborator,organization_member","type":"string"},"style":"form"},{"description":"Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**.","in":"query","name":"type","schema":{"default":"all","enum":["all","owner","public","private","member"],"type":"string"},"style":"form"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"full_name","enum":["created","updated","pushed","full_name"],"type":"string"},"style":"form"},{"description":"The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/since-repo-date"},{"$ref":"#/components/parameters/before-repo-date"}],"requestBody":null}

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/repository-items-default-response"}},"schema":{"items":{"$ref":"#/components/schemas/repository"},"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: repos/create-for-authenticated-user
path: /user/repos
method: POST
summary: Create a repository for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new repository for the authenticated user.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"This is your first repo!","homepage":"https://github.com","is_template":true,"name":"Hello-World","private":false}}},"schema":{"properties":{"allow_auto_merge":{"default":false,"description":"Whether to allow Auto-merge to be used on pull requests.","example":false,"type":"boolean"},"allow_merge_commit":{"default":true,"description":"Whether to allow merge commits for pull requests.","example":true,"type":"boolean"},"allow_rebase_merge":{"default":true,"description":"Whether to allow rebase merges for pull requests.","example":true,"type":"boolean"},"allow_squash_merge":{"default":true,"description":"Whether to allow squash merges for pull requests.","example":true,"type":"boolean"},"auto_init":{"default":false,"description":"Whether the repository is initialized with a minimal README.","type":"boolean"},"delete_branch_on_merge":{"default":false,"description":"Whether to delete head branches when pull requests are merged","example":false,"type":"boolean"},"description":{"description":"A short description of the repository.","type":"string"},"gitignore_template":{"description":"The desired language or platform to apply to the .gitignore.","example":"Haskell","type":"string"},"has_discussions":{"default":false,"description":"Whether discussions are enabled.","example":true,"type":"boolean"},"has_downloads":{"default":true,"description":"Whether downloads are enabled.","example":true,"type":"boolean"},"has_issues":{"default":true,"description":"Whether issues are enabled.","example":true,"type":"boolean"},"has_projects":{"default":true,"description":"Whether projects are enabled.","example":true,"type":"boolean"},"has_wiki":{"default":true,"description":"Whether the wiki is enabled.","example":true,"type":"boolean"},"homepage":{"description":"A URL with more information about the repository.","type":"string"},"is_template":{"default":false,"description":"Whether this repository acts as a template that can be used to generate new repositories.","example":true,"type":"boolean"},"license_template":{"description":"The license keyword of the open source license for this repository.","example":"mit","type":"string"},"merge_commit_message":{"description":"The default value for a merge commit message.\n\n- `PR_TITLE` - default to the pull request's title.\n- `PR_BODY` - default to the pull request's body.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","PR_TITLE","BLANK"],"type":"string"},"merge_commit_title":{"description":"Required when using `merge_commit_message`.\n\nThe default value for a merge commit title.\n\n- `PR_TITLE` - default to the pull request's title.\n- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).","enum":["PR_TITLE","MERGE_MESSAGE"],"type":"string"},"name":{"description":"The name of the repository.","example":"Team Environment","type":"string"},"private":{"default":false,"description":"Whether the repository is private.","type":"boolean"},"squash_merge_commit_message":{"description":"The default value for a squash merge commit message:\n\n- `PR_BODY` - default to the pull request's body.\n- `COMMIT_MESSAGES` - default to the branch's commit messages.\n- `BLANK` - default to a blank commit message.","enum":["PR_BODY","COMMIT_MESSAGES","BLANK"],"type":"string"},"squash_merge_commit_title":{"description":"Required when using `squash_merge_commit_message`.\n\nThe default value for a squash merge commit title:\n\n- `PR_TITLE` - default to the pull request's title.\n- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).","enum":["PR_TITLE","COMMIT_OR_PR_TITLE"],"type":"string"},"team_id":{"description":"The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.","type":"integer"}},"required":["name"],"type":"object"}}},"required":true}}

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


operation_id: repos/list-invitations-for-authenticated-user
path: /user/repository_invitations
method: GET
summary: List repository invitations for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  When authenticating as a user, this endpoint will list all currently open repository invitations for that user.

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

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


operation_id: repos/decline-invitation-for-authenticated-user
path: /user/repository_invitations/{invitation_id}
method: DELETE
summary: Decline a repository invitation
input_schema: {"parameters":[{"$ref":"#/components/parameters/invitation-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"},"409":{"$ref":"#/components/responses/conflict"}}


operation_id: repos/accept-invitation-for-authenticated-user
path: /user/repository_invitations/{invitation_id}
method: PATCH
summary: Accept a repository invitation
input_schema: {"parameters":[{"$ref":"#/components/parameters/invitation-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"},"409":{"$ref":"#/components/responses/conflict"},"451":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/list-social-accounts-for-authenticated-user
path: /user/social_accounts
method: GET
summary: List social accounts for the authenticated user
description: Lists all of your social accounts.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 characters]

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


operation_id: users/add-social-account-for-authenticated-user
path: /user/social_accounts
method: POST
summary: Add social accounts for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Add one or more social accounts to the authenticated user's profile.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Adding multiple social accounts","value":{"account_urls":["https://facebook.com/GitHub","https://www.youtube.com/@GitHub"]}}},"schema":{"example":{"account_urls":["https://www.linkedin.com/company/github/","https://twitter.com/github"]},"properties":{"account_urls":{"description":"Full URLs for the social media profiles to add.","example":[],"items":{"example":"https://twitter.com/github","type":"string"},"type":"array"}},"required":["account_urls"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/social-account-items"}},"schema":{"items":{"$ref":"#/components/schemas/social-account"},"type":"array"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/delete-social-account-for-authenticated-user
path: /user/social_accounts
method: DELETE
summary: Delete social accounts for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Deletes one or more social accounts from the authenticated user's profile.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"summary":"Deleting multiple social accounts","value":{"account_urls":["https://facebook.com/GitHub","https://www.youtube.com/@GitHub"]}}},"schema":{"example":{"account_urls":["https://www.linkedin.com/company/github/","https://twitter.com/github"]},"properties":{"account_urls":{"description":"Full URLs for the social media profiles to delete.","example":[],"items":{"example":"https://twitter.com/github","type":"string"},"type":"array"}},"required":["account_urls"],"type":"object"}}},"required":true}}

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


operation_id: users/list-ssh-signing-keys-for-authenticated-user
path: /user/ssh_signing_keys
method: GET
summary: List SSH signing keys for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists the SSH signing keys for the authenticated user's GitHub account.

  OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use 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/ssh-signing-key-items"}},"schema":{"items":{"$ref":"#/components/schemas/ssh-signing-key"},"type":"array"}}},"description":"Response","headers":{"Link":{"$ref":"#/components/headers/link"}}},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/create-ssh-signing-key-for-authenticated-user
path: /user/ssh_signing_keys
method: POST
summary: Create a SSH signing key for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Creates an SSH signing key for the authenticated user's GitHub account.

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

input_schema:
  {"parameters":[],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"key":"2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234","title":"ssh-rsa AAAAB3NzaC1yc2EAAA"}}},"schema":{"properties":{"key":{"description":"The public SSH key to add to your GitHub account. For more information, see \"[Checking for existing SSH keys](https://docs.github.com/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys).\"","pattern":"^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) |^(sk-ssh-ed25519|sk-ecdsa-sha2-nistp256)@openssh.com ","type":"string"},"title":{"description":"A descriptive name for the new key.","example":"Personal MacBook Air","type":"string"}},"required":["key"],"type":"object"}}},"required":true}}

output_schema:
  {"201":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/ssh-signing-key"}},"schema":{"$ref":"#/components/schemas/ssh-signing-key"}}},"description":"Response"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/get-ssh-signing-key-for-authenticated-user
path: /user/ssh_signing_keys/{ssh_signing_key_id}
method: GET
summary: Get an SSH signing key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/ssh-signing-key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Gets extended details for an SSH signing key.

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

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


operation_id: users/delete-ssh-signing-key-for-authenticated-user
path: /user/ssh_signing_keys/{ssh_signing_key_id}
method: DELETE
summary: Delete an SSH signing key for the authenticated user
input_schema: {"parameters":[{"$ref":"#/components/parameters/ssh-signing-key-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Deletes an SSH signing key from the authenticated user's GitHub account.

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

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


operation_id: activity/list-repos-starred-by-authenticated-user
path: /user/starred
method: GET
summary: List repositories starred by the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories the authenticated user has starred.

  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.star+json`**: Includes a timestamp of when the star was created.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/repository-items-default-response"}},"schema":{"items":{"$ref":"#/components/schemas/repository"},"type":"array"}},"application/vnd.github.v3.star+json":{"examples":{"alternative-response-with-star-creation-timestamps":{"$ref":"#/components/examples/starred-repository-items-alternative-response-with-star-creation-timestamps"}},"schema":{"items":{"$ref":"#/components/schemas/starred-repository"},"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: activity/check-repo-is-starred-by-authenticated-user
path: /user/starred/{owner}/{repo}
method: GET
summary: Check if a repository is starred by the authenticated user
description: Whether the authenticated user has starred the repository.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 116 characters]

output_schema:
  {"204":{"description":"Response if this repository is starred by you"},"304":{"$ref":"#/components/responses/not_modified"},"401":{"$ref":"#/components/responses/requires_authentication"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/basic-error"}}},"description":"Not Found if this repository is not starred by you"}}


operation_id: activity/list-watched-repos-for-authenticated-user
path: /user/subscriptions
method: GET
summary: List repositories watched by the authenticated user
description: Lists repositories the authenticated user is watching.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 119 characters]

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


operation_id: teams/list-for-authenticated-user
path: /user/teams
method: GET
summary: List teams for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  List all of the teams across all of the organizations to which the authenticated
  user belongs.

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

  When using a fine-grained personal access token, the resource owner of the token must be a single organization, and the response will only include the teams from that organization.

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"$ref":"#/components/examples/team-full-items"}},"schema":{"items":{"$ref":"#/components/schemas/team-full"},"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: users/get-by-id
path: /user/{account_id}
method: GET
summary: Get a user using their ID
input_schema: {"parameters":[{"$ref":"#/components/parameters/account-id"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.

  If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.

  The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).

  The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/public-user-default-response"},"response-with-git-hub-plan-information":{"$ref":"#/components/examples/public-user-response-with-git-hub-plan-information"}},"schema":{"discriminator":{"mapping":{"private":"#/components/schemas/private-user","public":"#/components/schemas/public-user"},"propertyName":"user_view_type"},"oneOf":[{"$ref":"#/components/schemas/private-user"},{"$ref":"#/components/schemas/public-user"}]}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


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

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


operation_id: users/list
path: /users
method: GET
summary: List users
auth_scheme_ref: GitHubBearerToken
description:
  Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.

  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 users.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/since-user"},{"$ref":"#/components/parameters/per-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":{"example":"<https://api.github.com/users?since=135>; rel=\"next\"","schema":{"type":"string"},"style":"simple"}}},"304":{"$ref":"#/components/responses/not_modified"}}


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

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

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


operation_id: users/get-by-username
path: /users/{username}
method: GET
summary: Get a user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Provides publicly available information about someone with a GitHub account.

  If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.

  The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).

  The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default-response":{"$ref":"#/components/examples/public-user-default-response"},"response-with-git-hub-plan-information":{"$ref":"#/components/examples/public-user-response-with-git-hub-plan-information"}},"schema":{"discriminator":{"mapping":{"private":"#/components/schemas/private-user","public":"#/components/schemas/public-user"},"propertyName":"user_view_type"},"oneOf":[{"$ref":"#/components/schemas/private-user"},{"$ref":"#/components/schemas/public-user"}]}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: users/list-attestations-bulk
path: /users/{username}/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 a user.

  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/username"}],"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: users/delete-attestations-bulk
path: /users/{username}/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/username"}],"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: users/delete-attestations-by-subject-digest
path: /users/{username}/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/username"},{"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: users/delete-attestations-by-id
path: /users/{username}/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 a user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"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: users/list-attestations
path: /users/{username}/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 a user.

  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/username"},{"description":"Subject 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"},"201":{"content":{"application/json":{"examples":{"default":{}},"schema":{"$ref":"#/components/schemas/empty-object"}}},"description":"Response"},"204":{"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


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

  Only Spaces that are readable by the authenticated user are returned. This includes the user's own spaces, and public user spaces when accessing another user's spaces.

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

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

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


operation_id: copilot-spaces/create-for-user
path: /users/{username}/copilot-spaces
method: POST
summary: Create a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Creates a new Copilot Space owned by a user. Only the authenticated user can create spaces for their own account.

  Users can create personal Copilot Spaces for their individual use.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Personal space for development assistance","general_instructions":"Help me with React development patterns and best practices","name":"My Development Space","resources_attributes":[{"metadata":{"file_path":"src/components/App.js","repository_id":789012},"resource_type":"github_file"},{"metadata":{"name":"Development Notes","text":"Focus on clean code principles and modern React patterns"},"resource_type":"free_text"}]}}},"schema":{"properties":{"base_role":{"default":"no_access","description":"The base role that determines default permissions for the space.\n- `no_access`: No default access (default)\n- `reader`: Makes the space publicly readable\nNote: User spaces do not support writer or admin base roles.","enum":["reader","no_access"],"type":"string"},"description":{"description":"A description of the Copilot Space.","example":"Personal space for development assistance","type":"string"},"general_instructions":{"description":"General instructions for the Copilot Space.","example":"Help me with React development patterns and best practices","maxLength":4000,"type":"string"},"name":{"description":"The name of the Copilot Space.","example":"My Development Space","type":"string"},"resources_attributes":{"description":"Resources to attach to the space.","items":{"properties":{"metadata":{"description":"Metadata specific to the resource type.","properties":{"file_path":{"description":"File path for file resources.","type":"string"},"name":{"description":"Name for the resource.","type":"string"},"number":{"description":"Issue or PR number.","type":"integer"},"repository_id":{"description":"Repository ID for repository or file resources.","type":"integer"},"text":{"description":"Text content for free text resources.","type":"string"}},"type":"object"},"resource_type":{"description":"The type of resource.","enum":["repository","github_file","free_text","github_issue","github_pull_request","media_content","uploaded_text_file"],"type":"string"}},"type":"object"},"type":"array"}},"required":["name"],"type":"object"}}},"required":true}}

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


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

  Private user spaces require the authenticated user to be the owner of the space.
  Public user spaces are accessible to any authenticated user.

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

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

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


operation_id: copilot-spaces/update-for-user
path: /users/{username}/copilot-spaces/{space_number}
method: PUT
summary: Set a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Updates a Copilot Space owned by a user. Only the authenticated user can update spaces for their own account.

  Users can update their personal Copilot Spaces.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"description":"Updated personal space for development assistance","general_instructions":"Updated instructions to help me with React development patterns and best practices","name":"Updated Development Space","resources_attributes":[{"metadata":{"file_path":"src/components/UpdatedApp.js","repository_id":789012},"resource_type":"github_file"},{"_destroy":true,"id":123},{"id":456,"metadata":{"name":"Updated Development Notes","text":"Updated focus on clean code principles and modern React patterns"},"resource_type":"free_text"}]}}},"schema":{"properties":{"base_role":{"description":"The base role that determines default permissions for the space. Changing this field requires admin permissions.\n- `no_access`: No default access (default)\n- `reader`: Makes the space publicly readable\nNote: User spaces do not support writer or admin base roles.","enum":["reader","no_access"],"type":"string"},"description":{"description":"A description of the Copilot Space.","example":"Updated personal space for development assistance","type":"string"},"general_instructions":{"description":"General instructions for the Copilot Space.","example":"Updated instructions to help me with React development patterns and best practices","maxLength":4000,"type":"string"},"name":{"description":"The name of the Copilot Space.","example":"Updated Development Space","type":"string"},"resources_attributes":{"description":"Resources to attach to the space.","items":{"properties":{"metadata":{"description":"Metadata specific to the resource type.","properties":{"file_path":{"description":"File path for file resources.","type":"string"},"name":{"description":"Name for the resource.","type":"string"},"number":{"description":"Issue or PR number.","type":"integer"},"repository_id":{"description":"Repository ID for repository or file resources.","type":"integer"},"text":{"description":"Text content for free text resources.","type":"string"}},"type":"object"},"resource_type":{"description":"The type of resource.","enum":["repository","github_file","free_text","github_issue","github_pull_request","media_content","uploaded_text_file"],"type":"string"}},"type":"object"},"type":"array"}},"type":"object"}}},"required":true}}

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


operation_id: copilot-spaces/delete-for-user
path: /users/{username}/copilot-spaces/{space_number}
method: DELETE
summary: Delete a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Deletes a Copilot Space owned by a user. The authenticated user must be the owner of the space.

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

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

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

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


operation_id: copilot-spaces/list-collaborators-for-user
path: /users/{username}/copilot-spaces/{space_number}/collaborators
method: GET
summary: List collaborators for a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Lists all collaborators for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

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

  Team collaborators are not supported for user-owned Copilot Spaces.

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

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

output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":{"collaborators":[{"actor_type":"User","avatar_url":"https://github.com/images/error/octocat_happy.gif","bio":"There once was...","blog":"https://github.com/blog","company":"GitHub","created_at":"2008-01-14T04:33:35Z","email":"octocat@github.com","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers":20,"followers_url":"https://api.github.com/users/octocat/followers","following":0,"following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"","hireable":false,"html_url":"https://github.com/octocat","id":12345,"location":"San Francisco","login":"octocat","name":"The Octocat","node_id":"MDQ6VXNlcjEyMzQ1","organizations_url":"https://api.github.com/users/octocat/orgs","public_gists":1,"public_repos":2,"received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","role":"writer","site_admin":false,"starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","twitter_username":"octocat","type":"User","updated_at":"2008-01-14T04:33:35Z","url":"https://api.github.com/users/octocat","user_view_type":"public"},{"actor_type":"User","avatar_url":"https://github.com/images/error/other_user.gif","bio":null,"blog":"","company":null,"created_at":"2010-01-14T04:33:35Z","email":null,"events_url":"https://api.github.com/users/github-user/events{/privacy}","followers":10,"followers_url":"https://api.github.com/users/github-user/followers","following":5,"following_url":"https://api.github.com/users/github-user/following{/other_user}","gists_url":"https://api.github.com/users/github-user/gists{/gist_id}","gravatar_id":"","hireable":null,"html_url":"https://github.com/github-user","id":67890,"location":null,"login":"github-user","name":"GitHub User","node_id":"MDQ6VXNlcjY3ODkw","organizations_url":"https://api.github.com/users/github-user/orgs","public_gists":0,"public_repos":5,"received_events_url":"https://api.github.com/users/github-user/received_events","repos_url":"https://api.github.com/users/github-user/repos","role":"reader","site_admin":false,"starred_url":"https://api.github.com/users/github-user/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/github-user/subscriptions","twitter_username":null,"type":"User","updated_at":"2010-01-14T04:33:35Z","url":"https://api.github.com/users/github-user","user_view_type":"public"}]}}},"schema":{"properties":{"collaborators":{"description":"The list of collaborators for this Copilot Space.","items":{"$ref":"#/components/schemas/copilot-space-collaborator"},"type":"array"}},"required":["collaborators"],"type":"object"}}},"description":"Response"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: copilot-spaces/add-collaborator-for-user
path: /users/{username}/copilot-spaces/{space_number}/collaborators
method: POST
summary: Add a collaborator to a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Adds a collaborator to a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

  Team collaborators are not supported for user-owned Copilot Spaces.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"}],"requestBody":{"content":{"application/json":{"examples":{"default":{"value":{"actor_identifier":"octocat","actor_type":"User","role":"writer"}}},"schema":{"properties":{"actor_identifier":{"description":"The username of the collaborator. The numeric user ID is also accepted.","type":"string"},"actor_type":{"description":"The type of actor (must be `User` for user-owned spaces; `Team` will be rejected).","enum":["User","Team"],"type":"string"},"role":{"description":"The role to grant to the collaborator.","enum":["reader","writer","admin"],"type":"string"}},"required":["actor_type","actor_identifier","role"],"type":"object"}}},"required":true}}

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


operation_id: copilot-spaces/update-collaborator-for-user
path: /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
method: PUT
summary: Set a collaborator role for a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Updates the role of a collaborator for a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

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

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

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


operation_id: copilot-spaces/remove-collaborator-for-user
path: /users/{username}/copilot-spaces/{space_number}/collaborators/{actor_type}/{actor_identifier}
method: DELETE
summary: Remove a collaborator from a Copilot Space for a user
auth_scheme_ref: GitHubBearerToken
description:
  Removes a collaborator from a specific Copilot Space owned by a user. The authenticated user must be the owner of the space or have admin access to the space.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"description":"The unique identifier of the Copilot Space.","in":"path","name":"space_number","required":true,"schema":{"type":"integer"},"style":"simple"},{"description":"The type of actor (must be `User` for user-owned spaces; `Team` will be rejected).","in":"path","name":"actor_type","required":true,"schema":{"enum":["User","Team"],"type":"string"},"style":"simple"},{"description":"The username of the collaborator. The numeric user ID is also accepted.","in":"path","name":"actor_identifier","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

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


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

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

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

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


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

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

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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


operation_id: packages/list-docker-migration-conflicting-packages-for-user
path: /users/{username}/docker/conflicts
method: GET
summary: Get list of conflicting packages during Docker migration for user
input_schema: {"parameters":[{"$ref":"#/components/parameters/username"}],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
description:
  Lists all packages that are in a specific user's namespace, that the requesting user has access to, and that encountered a conflict during Docker migration.

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

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


operation_id: activity/list-events-for-authenticated-user
path: /users/{username}/events
method: GET
summary: List events for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  If you are authenticated as the given user, you will see your private events. Otherwise, you'll only see public events. _Optional_: use the fine-grained token with following permission set to view private events: "Events" user permissions (read).

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

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


operation_id: activity/list-org-events-for-authenticated-user
path: /users/{username}/events/orgs/{org}
method: GET
summary: List organization events for the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  This is the user's organization dashboard. You must be authenticated as the user to view this.

  > [!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/username"},{"$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/user-org-events-items"}},"schema":{"items":{"$ref":"#/components/schemas/event"},"type":"array"}}},"description":"Response"}}


operation_id: activity/list-public-events-for-user
path: /users/{username}/events/public
method: GET
summary: List public events for a user
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 139 characters]

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

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


operation_id: users/check-following-for-user
path: /users/{username}/following/{target_user}
method: GET
summary: Check if a user follows another user
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"in":"path","name":"target_user","required":true,"schema":{"type":"string"},"style":"simple"}],"requestBody":null}

output_schema:
  {"204":{"description":"if the user follows the target user"},"404":{"description":"if the user does not follow the target user"}}


operation_id: gists/list-for-user
path: /users/{username}/gists
method: GET
summary: List gists for a user
description: Lists public gists for the specified user:
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"$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"}}},"422":{"$ref":"#/components/responses/validation_failed"}}


operation_id: users/list-gpg-keys-for-user
path: /users/{username}/gpg_keys
method: GET
summary: List GPG keys for a user
description: Lists the GPG keys for a user. This information is accessible by anyone.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 163 characters]

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


operation_id: users/get-context-for-user
path: /users/{username}/hovercard
method: GET
summary: Get contextual information for a user
auth_scheme_ref: GitHubBearerToken
description:
  Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.

    The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository).

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"description":"Identifies which additional information you'd like to receive about the person's hovercard. Can be `organization`, `repository`, `issue`, `pull_request`. **Required** when using `subject_id`.","in":"query","name":"subject_type","schema":{"enum":["organization","repository","issue","pull_request"],"type":"string"},"style":"form"},{"description":"Uses the ID for the `subject_type` you specified. **Required** when using `subject_type`.","in":"query","name":"subject_id","schema":{"type":"string"},"style":"form"}],"requestBody":null}

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


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

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

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


operation_id: users/list-public-keys-for-user
path: /users/{username}/keys
method: GET
summary: List public keys for a user
description: Lists the _verified_ public SSH keys for a user. This is accessible by anyone.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 163 characters]

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


operation_id: orgs/list-for-user
path: /users/{username}/orgs
method: GET
summary: List organizations for a user
auth_scheme_ref: GitHubBearerToken
description:
  List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.

  This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/orgs/orgs#list-organizations-for-the-authenticated-user) API instead.

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

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":{"$ref":"#/components/headers/link"}}}}


operation_id: packages/list-packages-for-user
path: /users/{username}/packages
method: GET
summary: List packages for a user
auth_scheme_ref: GitHubBearerToken
description:
  Lists all packages in a user's namespace for which the requesting user has access.

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

input_schema:
  {"parameters":[{"description":"The type of supported package. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry.","in":"query","name":"package_type","required":true,"schema":{"enum":["npm","maven","rubygems","docker","nuget","container"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/package-visibility"},{"$ref":"#/components/parameters/username"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per-page"}],"requestBody":null}

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


operation_id: packages/get-package-for-user
path: /users/{username}/packages/{package_type}/{package_name}
method: GET
summary: Get a package for a user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package metadata for a public package owned by a user.

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

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

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


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

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

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

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

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


operation_id: packages/restore-package-for-user
path: /users/{username}/packages/{package_type}/{package_name}/restore
method: POST
summary: Restore a package for a user
auth_scheme_ref: GitHubBearerToken
description:
  Restores an entire package for a user.

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

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

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

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

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


operation_id: packages/get-all-package-versions-for-package-owned-by-user
path: /users/{username}/packages/{package_type}/{package_name}/versions
method: GET
summary: List package versions for a package owned by a user
auth_scheme_ref: GitHubBearerToken
description:
  Lists package versions for a public package owned by a specified user.

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

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

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


operation_id: packages/get-package-version-for-user
path: /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}
method: GET
summary: Get a package version for a user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a specific package version for a public package owned by a specified user.

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

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

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


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

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

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

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

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


operation_id: packages/restore-package-version-for-user
path: /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore
method: POST
summary: Restore package version for a user
auth_scheme_ref: GitHubBearerToken
description:
  Restores a specific package version for a user.

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

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

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

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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


operation_id: activity/list-received-events-for-user
path: /users/{username}/received_events
method: GET
summary: List events received by the authenticated user
auth_scheme_ref: GitHubBearerToken
description:
  These are events that you've received by watching repositories and following users. If you are authenticated as the
  given user, you will see private events. Otherwise, you'll only see public events.

  > [!NOTE]
  > This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h.

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

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


operation_id: activity/list-received-public-events-for-user
path: /users/{username}/received_events/public
method: GET
summary: List public events received by a user
auth_scheme_ref: GitHubBearerToken
description:
[cell repeats an earlier one in this file: 139 characters]

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

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


operation_id: repos/list-for-user
path: /users/{username}/repos
method: GET
summary: List repositories for a user
description: Lists public repositories for the specified user.
auth_scheme_ref: GitHubBearerToken
input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"description":"Limit results to repositories of the specified type.","in":"query","name":"type","schema":{"default":"owner","enum":["all","owner","member"],"type":"string"},"style":"form"},{"description":"The property to sort the results by.","in":"query","name":"sort","schema":{"default":"full_name","enum":["created","updated","pushed","full_name"],"type":"string"},"style":"form"},{"description":"The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`.","in":"query","name":"direction","schema":{"enum":["asc","desc"],"type":"string"},"style":"form"},{"$ref":"#/components/parameters/per-page"},{"$ref":"#/components/parameters/page"}],"requestBody":null}

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


operation_id: billing/get-github-billing-ai-credit-usage-report-user
path: /users/{username}/settings/billing/ai_credit/usage
method: GET
summary: Get billing AI credit usage report for a user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of AI credit usage for a user.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"$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-model"},{"$ref":"#/components/parameters/billing-usage-report-product"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_ai_credit_usage_report_user"},"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-premium-request-usage-report-user
path: /users/{username}/settings/billing/premium_request/usage
method: GET
summary: Get billing premium request usage report for a user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of premium request usage for a user.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"$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-model"},{"$ref":"#/components/parameters/billing-usage-report-product"}],"requestBody":null}

output_schema:
  {"200":{"$ref":"#/components/responses/billing_premium_request_usage_report_user"},"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-user
path: /users/{username}/settings/billing/usage
method: GET
summary: Get billing usage report for a user
auth_scheme_ref: GitHubBearerToken
description:
  Gets a report of the total usage for a user.

  **Note:** This endpoint is only available to users with access to the enhanced billing platform.

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"$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_user"},"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-user
path: /users/{username}/settings/billing/usage/summary
method: GET
summary: Get billing usage summary for a user
auth_scheme_ref: GitHubBearerToken
description:
  > [!NOTE]
  > This endpoint is in public preview and is subject to change.

  Gets a summary report of usage for a user.

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

input_schema:
  {"parameters":[{"$ref":"#/components/parameters/username"},{"$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_user"},"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: users/list-social-accounts-for-user
path: /users/{username}/social_accounts
method: GET
summary: List social accounts for a user
description: Lists social media accounts for a user. This endpoint is accessible by anyone.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 163 characters]

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


operation_id: users/list-ssh-signing-keys-for-user
path: /users/{username}/ssh_signing_keys
method: GET
summary: List SSH signing keys for a user
description: Lists the SSH signing keys for a user. This operation is accessible by anyone.
auth_scheme_ref: GitHubBearerToken
input_schema:
[cell repeats an earlier one in this file: 163 characters]

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


operation_id: activity/list-repos-starred-by-user
path: /users/{username}/starred
method: GET
summary: List repositories starred by a user
auth_scheme_ref: GitHubBearerToken
description:
  Lists repositories a user has starred.

  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.star+json`**: Includes a timestamp of when the star was created.

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

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


operation_id: meta/get-all-versions
path: /versions
method: GET
summary: Get all API versions
description: Get all supported GitHub API versions.
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"application/json":{"examples":{"default":{"value":["2021-01-01","2021-06-01","2022-01-01"]}},"schema":{"items":{"example":"2021-01-01","format":"date","type":"string"},"type":"array"}}},"description":"Response"},"404":{"$ref":"#/components/responses/not_found"}}


operation_id: meta/get-zen
path: /zen
method: GET
summary: Get the Zen of GitHub
description: Get a random sentence from the Zen of GitHub
input_schema: {"parameters":[],"requestBody":null}
auth_scheme_ref: GitHubBearerToken
output_schema:
  {"200":{"content":{"text/plain":{"examples":{"default":{"summary":"Example response","value":"Responsive is better than fast"}},"schema":{"type":"string"}}},"description":"Response"}}


