📡 API Reference
Base URL: https://gitdeploy.my.id
v1 REST
POST /api/deploy multipart/form-data
Deploy project files to a GitHub repository. Creates the repo if it doesn't exist. Supports nested folders via webkitRelativePath. Token is never stored — discarded after request.

Parameters

Field Type Required Description
X-GitHub-Token (header) string required GitHub personal access token. Needs repo scope. Never stored.
repoName string required Repository name. Created automatically if it doesn't exist.
files[] file[] required One or more files. Supports subfolders via filename (e.g. src/index.js).
branch string optional Target branch. Default: main. Created if not exists.
commitMessage string optional Git commit message. Default: Deploy via GitDeploy.
description string optional Repository description (used on creation).
private boolean optional Create as private repository. Default: false.

Code Examples

# Deploy with cURL (supports subfolder paths via filename)
curl -X POST https://gitdeploy.my.id/api/deploy \
  -H "X-GitHub-Token: ghp_yourPersonalAccessToken" \
  -F "repoName=my-project" \
  -F "branch=main" \
  -F "commitMessage=feat: initial deploy" \
  -F "description=My awesome project" \
  -F "private=false" \
  -F "files=@./index.html;filename=index.html" \
  -F "files=@./src/app.js;filename=src/app.js" \
  -F "files=@./src/css/style.css;filename=src/css/style.css"

# Success response:
{
  "success": true,
  "repoName": "my-project",
  "branch": "main",
  "commitSha": "abc123...",
  "filesDeployed": 3,
  "repoUrl": "https://github.com/user/my-project",
  "commitUrl": "https://github.com/user/my-project/commit/abc123"
}
⚡ Try it out
DELETE /api/repos/:repoName PAT Required
Permanently delete a repository. Requires a GitHub personal access token with delete_repo scope via X-GitHub-Token header. Login not required — token is discarded immediately after.
curl -X DELETE https://gitdeploy.my.id/api/repos/my-project \
  -H "X-GitHub-Token: ghp_yourPersonalAccessToken"

# Response: { "success": true, "deleted": true, "repoName": "my-project" }
⚡ Try it out
⚠️ This permanently deletes the repository and cannot be undone.