Skip to main content
POST
Start an ad-hoc detection

Path Parameters

workspaceId
string<uuid>
required

Workspace identifier.

Body

application/json

Request payload to start an ad-hoc detection over a document, naming its policies directly rather than through a pipeline.

Analyzes the document against the given policies (authored or one-shot) and returns the detection holding the findings for review before redaction.

Request payload to start an ad-hoc detection over a document, naming its policies directly rather than through a pipeline.

Analyzes the document against the given policies (authored or one-shot) and returns the detection holding the findings for review before redaction.

documentId
string<uuid>
required

The document to analyze.

policyIds
string<uuid>[]
required

The policies to run against, by id. At least one is required.

Required array length: 1 - 64 elements
retentionOverride
object

Retention override for the outputs this detection produces. Absent falls back to the workspace retention baseline.

scope
object

Per-document scope (languages, jurisdictions, document labels).

Response

Response type for a detection.

A detection is addressed by its own opaque id; the owning pipeline and workspace handles are carried for context. Redacted outputs are not here — a detection produces many redactions, each fetched from its redactions endpoint.

Response type for a detection.

A detection is addressed by its own opaque id; the owning pipeline and workspace handles are carried for context. Redacted outputs are not here — a detection produces many redactions, each fetched from its redactions endpoint.

id
string
required

Opaque identifier of the detection.

Pattern: ^detection_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
inputDocumentId
string<uuid>
required

Source document this detection analyzes.

metadata
object
required

Non-encrypted metadata for filtering/display.

startedAt
string<date-time>
required

When the detection started.

status
required

Current detection status.

The detections are available to fetch from the detection's analysis endpoint once this reaches complete.

Allowed value: "pending"
triggerType
required

How the detection was triggered.

Allowed value: "user"
triggeredBy
object
required

Account that triggered the detection.

workspaceHandle
string
required

URL-safe workspace handle. Display-only.

Required string length: 3 - 32
Pattern: ^[a-z0-9]+(?:-[a-z0-9]+)*$
workspaceId
string<uuid>
required

Unique identifier of the workspace.

completedAt
string<date-time>

When the detection completed analysis.

error
string

Human-readable failure reason, present only when the detection failed.

inputDocumentName
string

Display name of the source document, for showing the detection without a separate file lookup. None if the file was removed (e.g. by retention).

pipelineId
string<uuid>

Unique identifier of the pipeline this detection belongs to; absent for an ad-hoc detection.