Get GitHub Link
Where a project's pages live, and where a move to GitHub stands.
Where the project's pages live — in Syntext or in a GitHub repository — and, when a move between them has started, where it stands.
Requires the admin or owner role and a session JWT; API keys are refused with 401. This applies to every /source/github endpoint: they change where a project's content lives.
Moving a project written in Syntext to GitHub and back takes four endpoints:
| Endpoint | Description |
|---|---|
GET /source/github | Where the pages live; finishes a link whose pull request was merged |
POST /source/github/preview | What linking a repository would do. Never writes |
POST /source/github/connect | Link: push the pages, open a pull request, or use the repository's pages |
POST /source/github/disconnect | Unlink: copy the repository's pages back into Syntext |
Path Parameters
projectIdResponse
contentSourcehosted, github or upload.repoUrlbranchnull otherwise.docsPath"" for its root), on a GitHub project. null otherwise.syncgithubSync. state is pushing, pending_merge, linked, pr_closed or failed. null when the project never used the flow.While a pull request is pending, this checks it on GitHub. If it was merged, the project switches to GitHub and builds the merge commit — so the link finishes even if GitHub's merge webhook was missed. If it was closed unmerged, state becomes pr_closed and the project stays in Syntext.
Error Responses
403 Forbidden
forbidden — you're not an admin or owner of the workspace, or not a member.
404 Not Found
The project doesn't exist.