Dry-runs a directory import — enumerates the integration's contacts and returns an aggregate report, writing nothing.
Reads the whole contact base of the given integration config through its `IParticipantDirectorySource`, runs each contact through the same environment resolver the live approve gate uses, and aggregates the result — how many contacts would affiliate with an environment, the standalone-vs-chain split, per-attribute coverage (e.g. how many carry a branch), and a sample of contacts that would stay unaffiliated. Use it to gauge data quality before running a real import.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The tenant identifier
Query Parameters
The tenant integration config to enumerate (e.g. the TexterChat connection).
uuidThe provider/integration key to import from. Defaults to texterchat.
"texterchat"Response Body
curl -X GET "https://api.fruxon.com/v1/tenants/string/directory/importPreview"{
"provider": "string",
"totalContacts": 0,
"contactsWithEnvironment": 0,
"contactsUnaffiliated": 0,
"contactsWithStableId": 0,
"distinctEnvironments": 0,
"standaloneEnvironments": 0,
"chainedEnvironments": 0,
"distinctChains": 0,
"slotPresence": {},
"labelCounts": {},
"sampleUnaffiliatedAddresses": [
"string"
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Enqueues a real directory import and returns the job to poll
A full import can sweep up to 100k contacts (each creating a participant + environment), which far exceeds a single HTTP request budget — so this does not run the sweep inline. It enqueues a job and returns `202 Accepted` with the run; a background worker then enumerates the integration's contacts, gets-or-creates each contact's environment, and creates a participant (External audience) where none already exists at its address — so a re-run is safe and creates no duplicates. Poll `GET directory/importRuns/{importRun}` for progress and the final counters. Only one import per `(provider, integrationConfigId)` may be in flight; a second request returns `409 Conflict` until the first finishes. Run the dry-run preview first and review the report before importing.
Gets a directory import run by id — poll it to track progress and read the final counters.
Use this endpoint after `POST directory/import` returns `202 Accepted`. It reads the durable import job row for the current tenant and returns the current lifecycle status plus counters captured by the background worker. Pending and running imports have progress metadata only; completed imports include participant-created/existing/failed counts and the bounded failure sample, while failed imports include the captured error message for operator triage.