v1

latestOpenAPI 3.0.32026-07-1310423153.4 KB
Repositories

Create or update a file

Creates or updates a file in the repository. The content must be base64 encoded.

put/repos/{owner}/{repo}/contents/{path}

Path parameters

ownerstring required

Owner of the repository

repostring required

Name of the repository

pathstring required

Path of the file to create or update

Request body

messagestring required

Commit message

contentstring required

Base64-encoded file content

branchstring

Branch to commit to. Defaults to the repository's default branch.

Response

File created or updated successfully.