Skip to main content
post/v2/teamspaces/{teamspaceId}/sites
Request example
Response
post/v2/teamspaces/{teamspaceId}/sites

Authorization

Authorizationstringheaderrequired#
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

teamspaceIdstringrequired#
Teamspace id.

Body

application/json
repoUrlstringrequired#

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

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

Length: 1–255

docsPathstringrequired#
Docs folder; . for the root.

Example:"."

context7Indexboolean#
Also index the repository in Context7.
hostingenum<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.
Options:onoff
slugstring#
First label of the platform hostname. Default: owner-repo. Owner or admin.

Length: 3–40Pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

customDomainstring#
Owner or admin.
customDomainPathstring#
Required with proxy routing. Owner or admin.
customDomainRoutingenum<string>#
Required with customDomain. Owner or admin.
Options:dnsproxy
setupIdstring#
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}$

Responses

application/json
The new site
dataobjectrequired#
A Docs7 site built from a GitHub repository.
deploymentIdstring#
The first build, when one started.