Skip to main content
POST
Scan a domain into a setup draft

Authorizations

Authorization
string
header
required

Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.

Body

application/json
domain
string

Domain or URL to scan. Defaults to the workspace's own company domain.

Required string length: 1 - 255
Example:

"octolens.com"

force
boolean

Ignore a reusable draft and the 7-day domain cache; scan again.

Response

200 response

id
string
required

draft_… id.

Example:

"draft_k3v9x0q2m1"

domain
string
required
status
enum<string>
required

Where the draft is in the setup engine. The scan moves scanning → scanned (or failed).

Available options:
scanning,
scanned,
proposing,
measuring,
sampling,
ready,
needs_narrowing,
failed,
applied
profile
object | null
required

What the domain scan learned about the company. Every field the wizard renders is editable.

degraded
object[]
required
scanSteps
object[]
required
cached
boolean
required

True when the profile came from the domain cache.

reused
boolean
required

True when an existing draft (same owner + domain, < 24 h) was returned.

skillVersion
string
required
appliedOrganizationId
string | null
required
expiresAt
string
required

ISO-8601.

createdAt
string
required
updatedAt
string
required