| title |
Save file |
| section |
api |
| sidebar |
true |
Create or update a UTF-8 file, commit, and create the next release tag.
| Field |
Type |
Description |
creator_user_id |
string |
Owner |
payment_request_id |
string |
Payment request |
relative_path |
string |
Path inside repo, e.g. docs/spec.md |
content |
string |
File body (UTF-8) |
message |
string? |
Optional commit message |
{
"path": "docs/spec.md",
"commit_sha": "…",
"version_tag": "v2"
}
curl -sS -X PUT "$BASE/repositories/file" \
-H "Authorization: Bearer $TOKEN" \
-H "X-User-Id: user-1" \
-H "Content-Type: application/json" \
-d '{
"creator_user_id":"user-1",
"payment_request_id":"pr-100",
"relative_path":"invoice.md",
"content":"# Invoice\nTotal: 100",
"message":"Add invoice"
}'