Seeds a pending doc with a default version + a product_documentation section, persists a repository resource, and kicks off the GenerateFromRepository pipeline. docgen pulls the repo via the GitHub installation token resolved server-side.
POST
/control-plane/api/v1/v1/documentation/{organization_id}/{documentation_id}/initialize-from-repository
Authentication
API Key (BearerAuth)
Header:
Authorization
Path Parameters
organization_idstringrequired
Organization ID
documentation_idstringrequired
Documentation ID
Request Body
Repository import input
Required
branchstring
installation_idstringrequired
pathstring
path_typestring
full_repo | folder | file
repository_idstringrequired
section_namestring
version_idstring
Example:
{
"branch": "string",
"installation_id": "string",
"path": "string",
"path_type": "string",
"repository_id": "string",
"section_name": "string",
"version_id": "string"
}Responses
200
OK
Response Fields:
documentation(object)progress(object)section_id(string)version_id(string)
Example:
{
"documentation": {
"audience": "public",
"config": {
"assistant": {
"enabled": true,
"floating": true
},
"favicon_url": "string",
"footer": {
"copyright": "string",
"enabled": true,
"links": [
"..."
],
"powered_by_gitdocai": true
},
"kb": {
"enabled": true,
"hero_description": "string",
"hero_placeholder": "string",
"hero_title": "string",
"icon": "string",
"name": "string",
"popular_articles": [
"..."
],
"popular_title": "string",
"search_suggestions": [
"..."
],
"show_categories": true
},
"navbar": [
{
"icon": "...",
"label": "...",
"style": "...",
"url": "..."
}
],
"seo": {
"default_description": "string",
"default_og_image": "string",
"google_analytics_id": "string",
"site_title": "string",
"title_template": "string"
},
"theme": {
"dark": {
"accent_color": "...",
"bg_color": "...",
"logo_url": "...",
"text_color": "..."
},
"default": {},
"font_family": "string",
"heading_font": "string",
"light": {
"accent_color": "...",
"bg_color": "...",
"logo_url": "...",
"text_color": "..."
},
"modes": [
"..."
],
"preset": {},
"show_name": true
}
},
"created_at": "string",
"description": "string",
"has_pending_changes": true,
"id": "string",
"name": "string",
"organization_id": "string",
"published_at": "string",
"slug": "string"
},
"progress": {
"completed_at": "string",
"completed_pages": 0,
"created_at": "string",
"current_page": "string",
"current_phase": "loading",
"documentation_id": "string",
"error_message": "string",
"failed_resources": "string",
"id": "string",
"message": "string"
},
"section_id": "string",
"version_id": "string"
}400
Bad Request
Example:
{
"key": "value"
}500
Internal Server Error
Example:
{
"key": "value"
}