Skip to main content

Add GitHub HTTPS Git Configuration

POST/organizations/git

Configure GitHub HTTPS settings for an organization by associating a GitHub App and repository.

Request Body
organizationIdstringrequired
UUID of the organization.
gitUrlstringrequired
Full HTTPS Git URL.
branchNamestringrequired
Branch to sync with (e.g. "main").
githubAppIdstringrequired
GitHub App ID.
githubAppInstallationIdstringrequired
GitHub App installation ID.
githubAppPrivateKeystringrequired
GitHub App private key in PEM format.
Error Responses
400
Workspace is archived, no admin user found, git connection test failed, or request body validation failure.
403
External API disabled, missing EXTERNAL_API license, or invalid Authorization header.
Request
curl -X POST "https://{your-domain}/api/ext/organizations/git" -H "Authorization: Basic <access_token>" -H "Content-Type: application/json" -d '{
"organizationId": "45892c81-c1f0-48c6-8875-c2e4fca516f8",
"gitUrl": "https://github.com/username/repository.git",
"branchName": "main",
"githubAppId": "123456",
"githubAppInstallationId": "78910",
"githubAppPrivateKey": "-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----"
}'

Response: 201