/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Disconnect GitHub

Disconnect GitHub

Move a GitHub project back into Syntext, copying the repository's pages in, or cancel a pending link.

POST/v1/projects/{projectId}/source/github/disconnectTry it
Session token

Make a GitHub project a project written in Syntext again. The pages in the repository's docs folder, its syntext.json and its images are copied into Syntext as a new revision, so you keep editing in the browser from where the repository left off. The live site doesn't change — it keeps the deploy it has until you next publish.

Note

Requires the admin or owner role and a session JWT. The repository and its files are not changed.

No request body.

Response — 200 OK

NameDescription
revision:object | null
The new revision (source: "github-snapshot"), or null when Syntext already held the same files.
commitSha:string | null
The repository commit the pages were copied from.
files:object
Pages, config files and images copied in, and files in Syntext that the repository no longer had (deleted in the new revision; still in history).
skipped:object[]
Repository files that couldn't come in, with the reason — for example a page over 1 MB, an image over 5 MB, or an SVG that failed sanitising.
unpublishedChanges:boolean
true when the live site was built from a different commit. Publish to bring it up to the copied pages.
cancelled:object
Present when the call cancelled a link that hadn't finished — a pending pull request, or a failed move. Nothing is copied; pullRequest names the pull request, which stays open on GitHub.

Error Responses

StatusCodeWhen
403forbiddenYou're not an admin or owner
409not_linkedThe project isn't linked to a GitHub repository
409branch_not_foundThe project's branch no longer exists, so its pages can't be copied. Restore it, or choose another branch first
413content_too_largeThe repository's docs are over 200 MB
413too_many_filesThe repository's docs hold more than 2,000 files
502github_errorGitHub refused a request
Was this page helpful? Yes No
Request
bashJavaScriptPythonGoRubyPHPJavaC#bash
curl -X POST https://api.syntext.dev/v1/projects/3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c/source/github/disconnect \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."
Responseapplication/json
200OK
{
"data": {
"contentSource": "hosted",
"revision": { "id": "2a9d4f1c-8e3b-4c7a-9f2e-6b1d5c8a3e40", "number": 15 },
"commitSha": "9d4e1b7c3a5f8e2d6b0c4a9f1e7d3b5c8a2f6e0d",
"files": { "pages": 18, "config": 1, "images": 6, "deleted": 0 },
"skipped": [],
"liveSite": "unchanged",
"unpublishedChanges": false
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext