Skip to main content
PUT
Create or update a file

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Owner of the repository

repo
string
required

Name of the repository

path
string
required

Path of the file to create or update

Body

application/json
message
string
required

Commit message

content
string
required

Base64-encoded file content

branch
string

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

Response

File created or updated successfully.

content
object
commit
object