Genbase
ApiRepository

Commit changes

POST
/repository/{repo_name}/commit

Authorization

AuthorizationRequiredBearer <token>

JWT Token for authenticated users (obtained via /auth/jwt/login).

In: header

Request Body

application/jsonRequired
commit_messageRequiredstring
author_namestring
author_emailstring
Format: "email"

Path Parameters

repo_nameRequiredstring

Repository name (usually the module_id)

curl -X POST "http://localhost:8000/repository/string/commit" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "commit_message": "string",
    "author_name": "string",
    "author_email": "user@example.com"
  }'

Successful Response - Commit Details

{
  "status": "string",
  "message": "string",
  "committed": true,
  "commit_hash": "string",
  "commit_message": "string",
  "files_changed": [
    "string"
  ]
}