Apply diff patch to repository
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”Owner of the repo
Name of the repo
Request Body
Section titled “ Request Body ”UpdateFileOptions options for updating files
Note: author and committer are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)
object
Identity for a person’s identity like an author or committer
object
Branch (optional) to base this file from. if not given, the default branch is used
Identity for a person’s identity like an author or committer
object
Content must be base64 encoded
CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
object
(optional) will do a force-push if the new branch already exists
From_path (optional) is the path of the original file which will be moved/renamed to the path in the URL
Message (optional) for the commit of this file. if not supplied, a default message will be used
New_branch (optional) will make a new branch from branch before creating the file
Sha is the SHA for the file that already exists
Add a Signed-off-by trailer by the committer at the end of the commit log message.
Example generated
{ "author": { "email": "hello@example.com", "name": "example" }, "branch": "example", "committer": { "email": "hello@example.com", "name": "example" }, "content": "example", "dates": { "author": "2026-04-15T12:00:00Z", "committer": "2026-04-15T12:00:00Z" }, "force_overwrite_new_branch": true, "from_path": "example", "message": "example", "new_branch": "example", "sha": "example", "signoff": true}Responses
Section titled “ Responses ”FileResponse
FileResponse contains information about a repo’s file
object
object
object
object
object
object
ContentsResponse contains information about a repo’s entry’s (dir, file, symlink, submodule) metadata and content
object
FileLinksResponse contains the links for a repo’s file
object
content is populated when type is file, otherwise null
encoding is populated when type is file, otherwise null
submodule_git_url is populated when type is submodule, otherwise null
target is populated when type is symlink, otherwise null
type will be file, dir, symlink, or submodule
PayloadCommitVerification represents the GPG verification of a commit
object
PayloadUser represents the author or committer of a commit
object
Full name of the commit author
Example generated
{ "commit": { "author": { "date": "example", "email": "hello@example.com", "name": "example" }, "committer": { "date": "example", "email": "hello@example.com", "name": "example" }, "created": "2026-04-15T12:00:00Z", "html_url": "example", "message": "example", "parents": [ { "created": "2026-04-15T12:00:00Z", "sha": "example", "url": "example" } ], "sha": "example", "tree": { "created": "2026-04-15T12:00:00Z", "sha": "example", "url": "example" }, "url": "example" }, "content": { "_links": { "git": "example", "html": "example", "self": "example" }, "content": "example", "download_url": "example", "encoding": "example", "git_url": "example", "html_url": "example", "last_commit_sha": "example", "last_commit_when": "2026-04-15T12:00:00Z", "name": "example", "path": "example", "sha": "example", "size": 1, "submodule_git_url": "example", "target": "example", "type": "example", "url": "example" }, "verification": { "payload": "example", "reason": "example", "signature": "example", "signer": { "email": "hello@example.com", "name": "example", "username": "example" }, "verified": true }}APINotFound is a not found error response
object
Example generated
{ "errors": [ "example" ], "message": "example", "url": "example"}QuotaExceeded
Headers
Section titled “ Headers ”APIRepoArchivedError is an error that is raised when an archived repo should be modified
object
Example generated
{ "message": "example", "url": "example"}