BizKitHub
DocsAPI ReferencePost/bff/post/git-import
postPostAdmin BFF

/bff/post/git-import

Downloads the repository tarball, parses every .md file, and upserts them as posts in the caller organisation. Matching key is the frontmatter id (content__post.external_id) with code as a fallback; unmatched files become new posts (visibility defaults to private). Files without an H1 title, without a body, or referencing a non-existent category are skipped and reported per-file in the response. The whole import aborts only when two files inside the repo carry the same frontmatter id.

PostpostBffPostGit-import

Parameters

JSON body

Request body

application/json
repoUrlstringRequired

Public GitHub repository URL — accepts the plain repo URL, an /tree/{branch} URL, or a .git suffix.

Exampleshttps://github.com/acme/docshttps://github.com/acme/docs/tree/main
branchstringOptional

Branch override. When omitted, the branch parsed from the URL wins, else GitHub default.

Examplemain

Response schema

1 status code documented

200Success

This response returns no JSON body.

Response example

application/json
{
  "success": true
}

Request example

POST /bff/post/git-import

post
curl -X POST "https://api.bizkithub.com/bff/post/git-import" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "repoUrl": "https://github.com/acme/docs",
  "branch": "main"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key