DocsREST API

GitHub agent API

App status, installations, project connections, runs and the GitHub webhook.

On this page

The GitHub App is not configured on the hosted instance, so the routes that need it answer 501 github_not_configured there, and GET /v1/github/app returns { "configured": false }. The code has been tested against an in-memory GitHub only. Overview: GitHub agent.

All routes except the app status and the webhook need a session token. Errors: 501 github_not_configured when the instance has no GitHub App, 403 permission_missing, 404 not_found, 409 conflict, 400 invalid_request.

App status

GET /v1/github/app (no authentication)

{ "configured": true, "slug": "generic-translation", "installUrl": "https://github.com/apps/generic-translation/installations/new" }

When not configured: { "configured": false }.

Installations

List

GET /v1/orgs/:orgId/github/installations (viewer)

[
  {
    "installationId": 4412345,
    "account": { "login": "acme", "type": "Organization" },
    "repos": [{ "fullName": "acme/web", "defaultBranch": "main", "private": true }],
    "suspended": false
  }
]

When the App is configured, the repository list is refreshed from GitHub on each call.

POST /v1/orgs/:orgId/github/installations (admin). The dashboard calls this after GitHub redirects back from the install page.

{ "installationId": 4412345 }

Returns the installation object above (201 the first time, 200 if it was already linked to this organization). Errors: 404 if GitHub does not know the installation; 409 conflict if another organization has linked it; 403 permission_missing if the installation was not created or changed in the last 24 hours and is not yet linked.

Project connection

Read

GET /v1/projects/:projectId/github (viewer)

{
  "configured": true,
  "connection": {
    "repo": "acme/web",
    "installationId": 4412345,
    "baseBranch": "main",
    "configPath": "generic-translation.config.json",
    "trigger": "push",
    "branchPrefix": "generic-translation/",
    "autoMerge": false,
    "publish": false
  }
}

connection is absent when the project is not connected.

Connect or change

PUT /v1/projects/:projectId/github (admin)

{ "repo": "acme/web", "installationId": 4412345, "trigger": "push", "autoMerge": false }

repo and installationId are required. baseBranch defaults to the repository’s default branch, configPath to generic-translation.config.json (a relative path without ..), trigger to push (push or manual), branchPrefix to generic-translation/ (letters, digits, ., _, -, /), autoMerge and publish to false. The installation must be linked to the project’s organization, and the repository must be visible to it (404 otherwise). Returns the same shape as GET.

Disconnect

DELETE /v1/projects/:projectId/github (admin). Returns { "ok": true } and marks queued or running runs as failed with the error Disconnected. 404 if there was no connection.

Runs

Start a run

POST /v1/projects/:projectId/github/run (member, session only). Returns 202 { "runId": "…" }. 409 conflict if the project is not connected. If a run is already queued, its id is returned.

List runs

GET /v1/projects/:projectId/github/runs?limit= (viewer). Newest first.

[
  {
    "id": "…",
    "status": "completed",
    "trigger": "manual",
    "commitSha": "9fceb02…",
    "branch": "generic-translation/main",
    "prUrl": "https://github.com/acme/web/pull/12",
    "prNumber": 12,
    "stats": { "sourceFiles": 41, "files": 0, "locales": 2, "messages": 118, "translations": 236, "missing": 0, "changedFiles": 2, "warnings": [] },
    "createdAt": "2026-11-30T10:00:00.000Z",
    "updatedAt": "2026-11-30T10:01:30.000Z",
    "completedAt": "2026-11-30T10:01:30.000Z"
  }
]

status is queued, running, completed, failed or no_changes. trigger is manual or push. prUrl, error and completedAt appear only when set. A run stopped by the billing gate has status: "failed" and an error starting with credits_insufficient.

Webhook

POST /webhooks/github: called by GitHub, not by you. The X-Hub-Signature-256 header is verified with the App’s webhook secret; a bad signature returns 400 invalid_signature, and a missing secret returns 501 github_not_configured. Deliveries are de-duplicated by X-GitHub-Delivery. Handled events: ping, installation, installation_repositories and push; anything else is acknowledged and ignored.

Something wrong or unclear on this page? Open an issue.

Type to search the documentation.