---
title: "Import your website"
method: POST
path: "/org/website-import"
tags: ["Website Import"]
---

# Import your website

`POST /org/website-import`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/website-import`
- Auth: API key in header `X-API-Key`

Starts an import of your organization's website: it fetches your home page plus up to 19 more of your pages, ingests each one into your knowledge base as a document under a folder named `Website`, and generates a brand kit from what it read if your organization does not have one yet. Pages are chosen from the ones your home page links to and the ones in your sitemap: when there are more than 19, an AI model picks the pages most likely to answer what people most often ask about a business like yours — what you offer, pricing, who it is for, how it works, and common questions — and skips blog posts and near-duplicates. A brand kit that already has content is never overwritten — the import still runs, and reports `brand_kit_generated: false` with `brand_kit_skip_reason: already_populated`.

The site imported is the website on file for your organization, not a value you pass — this request takes no body. When several websites are on file, the most recently added one is used; see `GET /org/me` for the current list and `PUT /org/me` to change it. With no usable website on file the call returns `422`.

Returns immediately with a run to poll — the import itself continues in the background and typically finishes within a minute. Only one import can be in flight per organization: triggering while one is running returns `409` carrying that run, so a duplicate call becomes "poll this one" rather than an error. Requires the GEO product.

## Response `202`

The import was accepted and is now running. Poll the status endpoint.

- WebsiteImportRunResponse: One website import. The same shape describes a run that is still going and one that has finished; the fields only a finished run has are absent while it runs.
  - `run_id` string, uuid, required
  - `status` 'queued' | 'running' | 'completed' | 'failed', required: Lifecycle state. `queued` and `running` mean the import is still in flight; `completed` and `failed` are final and never change.
  - `source_url` string, required: The website this import read, resolved from your organization's website on file.
  - `pages_fetched` integer, required: Pages successfully read from the site, including the home page. `0` until the fetch stage finishes.
  - `pages_ingested` integer, required: Pages written into the knowledge base as new documents. Lower than `pages_fetched` when a page's content was already in the knowledge base unchanged — the normal case when re-importing the same site — or when an individual page could not be stored. The import only fails outright if no page at all could be stored.
  - `brand_kit_generated` boolean, required: Whether this import wrote a brand kit. `false` both while the import is still running and when generation was deliberately skipped — `brand_kit_skip_reason` distinguishes the two.
  - `selection_method` 'all' | 'llm' | 'heuristic': How the pages beyond the home page were chosen. `all`: the site had 19 or fewer candidate pages, so every one was imported. `llm`: an AI model chose the most valuable pages. `heuristic`: the AI selection failed and a keyword ranker chose instead. Absent until page selection has run.
  - `candidates_found` integer: Candidate pages found across your home page's links and your sitemap, after excluding login, legal, cart, asset and translated pages. Absent until page selection has run.
  - `candidates_considered` integer: How many candidates the selector considered, after trimming large sites to at most 5 pages per section and 150 overall. Absent until page selection has run.
  - `sitemap_found` boolean: Whether a sitemap was found and read. Absent until page selection has run.
  - `brand_kit_skip_reason` 'already_populated': Why brand kit generation was skipped. Present only on a finished import that skipped it; a skip is a success, not a failure.
  - `error_code` 'NO_WEBSITE' | 'HOMEPAGE_FETCH_FAILED' | 'INGESTION_FAILED' | 'GENERATION_FAILED' | 'FEATURE_UNAVAILABLE' | 'INTERNAL_ERROR': Why the import failed. Present only on a `failed` import. `NO_WEBSITE`: no usable website was on file. `HOMEPAGE_FETCH_FAILED`: the home page could not be read. `INGESTION_FAILED`: every page failed to reach the knowledge base. `GENERATION_FAILED`: the brand kit could not be generated. `FEATURE_UNAVAILABLE`: website import is not available for this deployment. `INTERNAL_ERROR`: an unexpected failure.
  - `error_message` string: A human-readable description of the failure. Present only on a `failed` import.
  - `created_at` string, date-time, required: When the import was requested.
  - `started_at` string, date-time: When the import began working. Absent until it leaves `queued`.
  - `completed_at` string, date-time: When the import reached `completed` or `failed`. Absent while it is still in flight.

## Other responses

- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `403`: The API key is authenticated but not permitted to access this resource.
- `409`: An import is already running for this organization. `current` is that run — poll it rather than retrying the trigger.
- `422`: No usable website is on file for this organization. Set one with `PUT /org/me` and trigger again.
- `503`: The service is temporarily unavailable — retry later.

---

[API](https://skmtc.dev/senso/apis/senso-org-api.md) - [All operations](https://skmtc.dev/senso/apis/senso-org-api/llms.txt) - [OpenAPI document](https://skmtc.dev/senso/apis/senso-org-api/revisions/d789b4fcbe84?raw)
