Docs7 Sites

Add a Docs7 site

Changed on

Connect a GitHub repository. Docs7 checks that both the Docs7 GitHub App and the caller's own GitHub account can read the repository. The caller must have connected GitHub in the Context7 dashboard once (the dashboard stores the GitHub authorization); without it the answer is 400 github_access_missing. hosting chooses whether Docs7 publishes the docs ("on", first build starts) or the site is added for the agents only ("off"); without it, a docsPath with docs.json or mint.json is published and any other is added for the agents only. Developers can set only repoUrl, branch, docsPath, context7Index and hosting. Docs7 Free includes 3 sites and public repositories only.

post/v2/teamspaces/{teamspaceId}/sites

Request

  • Base URL
    https://context7.com/api
  • URL
    https://context7.com/api/v2/teamspaces/{teamspaceId}/sites
  • Auth
    HTTP bearer

Path parameters

teamspaceIdstring uuid required

Teamspace id.

Request body

repoUrlstring uri required
branchstring

Production branch. Default: the repository's default branch.

docsPathstring required

Docs folder; . for the root.

context7Indexboolean

Also index the repository in Context7.

hosting'on' | 'off'

on publishes the docs and needs docs.json or mint.json in docsPath; without one the answer is 400 docs_config_missing, and its message names the folders that have one. off adds the repository for the agents only. Default: on when docsPath has a config, else off.

slugstring

First label of the platform hostname. Default: owner-repo. Owner or admin.

customDomainstring

Owner or admin.

customDomainPathstring

Required with proxy routing. Owner or admin.

customDomainRouting'dns' | 'proxy'

Required with customDomain. Owner or admin.

Example request

{
  "repoUrl": "https://github.com/acme/docs",
  "docsPath": "."
}

Response

The new site

deploymentIdstring uuid nullable

The first build, when one started.

Example response

{
  "data": {
    "platformHostname": "acme-docs.docs7.io",
    "context7LibraryName": "/acme/docs"
  }
}

Changes