Skip to main content
POST
Add a Docs7 site

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required.

Path Parameters

teamspaceId
string<uuid>
required

Teamspace id.

Body

application/json
repoUrl
string<uri>
required
Example:

"https://github.com/acme/docs"

docsPath
string
required

Docs folder; . for the root.

Example:

"."

branch
string

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

Required string length: 1 - 255
context7Index
boolean

Also index the repository in Context7.

hosting
enum<string>

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.

Available options:
on,
off
slug
string

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

Required string length: 3 - 40
Pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
customDomain
string

Owner or admin.

customDomainPath
string

Required with proxy routing. Owner or admin.

customDomainRouting
enum<string>

Required with customDomain. Owner or admin.

Available options:
dns,
proxy
setupId
string

The setup ID from the Docs7 Add page's agent prompt. The Add page uses it to follow this site and its first build.

Pattern: ^[a-z0-9]{8,32}$

Response

The new site

data
object
required

A Docs7 site built from a GitHub repository.

deploymentId
string<uuid> | null

The first build, when one started.