Import a website from its URL into a draft
Starts an import job that copies a website into a draft site at {slug}, creating the site. When you already own {slug} the import is refused (409 slug_taken_self) unless you send onSlugTaken: merge, which adds or updates the pages on that site. The call answers 202 straight away. Poll GET /api/v1/sites/{slug}/jobs/{id} with job.id until status is succeeded or failed, or watch GET /api/v1/sites/{slug}/import-status. Use the slug in the response from then on: it can differ from the one you sent.
Send only sourceUrl to import the whole site: Dotsy finds the pages from the sitemap and the home page links. Everything lands in the draft and nothing is live until you publish. Guest tokens cannot import; use an account key.
Request
- Base URL: https://api.dotsy.ai
- URL: https://api.dotsy.ai/api/v1/sites/{slug}/import/url
- Auth: HTTP bearer
Path parameters
Site slug or site id (UUID). An old slug answers 301/308 and a site id 307 to the canonical slug path.
Headers
Org id or slug to act as for this request (session/MCP user actors only — ignored for pga_ keys). Validated against the caller's own memberships (id match first, then slug); 403 if not a member. Takes precedence over session.activeOrganizationId and the auto-provisioned home-workspace fallback.
Request body
Example request
{
"sourceUrl": "https://example.com",
"pages": [
{
"url": "/about",
"key": "about.html"
}
],
"segments": [
{
"pathPrefix": "/blog"
}
],
"skipHosts": [
"cdn.example-analytics.com"
]
}Response
The import is queued.
Example response
{
"publicUrl": "https://acme-studio.dotsy.site/"
}Changes
No recorded changes to this operation across all 1 revision of this API.