---
title: "Run PII expansion"
method: POST
path: "/v1/pii-expansion"
tags: ["pii-expansion"]
---

# Run PII expansion

`POST /v1/pii-expansion`

Create a PII-expansion job and wait for an inline result when `responseMode` is `sync`. If the job does not finish before the inline timeout, or when `responseMode` is `async`, the API returns a persisted job envelope. Every response includes `X-Job-Id` for later lookup.

## Request body

- PiiExpansionRunRequest — Run endpoint payload for PII expansion.
  - `depth` 'standard' | 'deep'
  - `maxCandidates` integer
  - `responseMode` 'sync' | 'async'
  - `seeds` PiiExpansionSeeds — Supported seed types for v1 identity expansion.
    - `emails` string[]
    - `phones` string[]
    - `usernames` string[]
  - `subject` PiiExpansionSubject, required — Subject details supported by v1 PII expansion.
    - `aliases` string[]
    - `name` string, required

## Response `200`

Normalized identity and related social-candidate results when completed inline, otherwise a job envelope.

- union
  - PiiExpansionResult — Inline or final PII expansion result payload.
    - `capability` 'pii_expansion'
    - `items` PiiExpansionItem[]
      - `confidenceCategory` 'likely' | 'uncertain', required
      - `emails` string[]
      - `fullName` string, required
      - `id` string, required
      - `label` string, required
      - `matchRationale` string[]
      - `matchedInputs` MatchedInputReference[]
        - `inputType` 'name' | 'alias' | 'adverse_term' | 'keyword' | 'region' | 'email' | 'phone' | 'address' | 'username' | 'domain' | 'location' | 'employer' | 'social_url' | 'seed_url' | 'date_of_birth' | 'place_of_birth' | 'age' | 'gender' | 'drivers_license_state' | 'employment_role' | 'employment_department' | 'employment_location' | 'employment_status', required
        - `value` string, required
      - `normalizedAttributes` SanitizedNormalizedAttributes — Sanitized, connector-agnostic normalized attributes.
        - `addresses` string[]
        - `dates` string[]
        - `domains` string[]
        - `emails` string[]
        - `keywords` string[]
        - `locations` string[]
        - `names` string[]
        - `organizations` string[]
        - `phones` string[]
        - `profileHandles` string[]
        - `usernames` string[]
      - `phones` string[]
      - `riskFlags` string[]
      - `safeMetadata` object
      - `summary` string, required
      - `type` 'identity_candidate'
      - `usernames` string[]
    - `limit` integer
    - `nextCursor` string, nullable
    - `total` integer, nullable
    - `warnings` ApiWarning[]
      - `code` string, required
      - `message` string, required
  - JobEnvelopePiiExpansionResult
    - `capability` 'web_search' | 'pii_expansion' | 'social_profile_analysis', required
    - `completedAt` string, date-time, nullable
    - `error` ApiError — Standard API error payload.
      - `code` string, required
      - `message` string, required
      - `retryable` boolean
    - `expiresAt` string, date-time, nullable
    - `jobId` string, required
    - `progress` JobProgress — Progress metadata for long-running jobs.
      - `completedSteps` integer
      - `message` string, nullable
      - `stage` string, required
      - `totalSteps` integer, nullable
    - `result` PiiExpansionResult — Inline or final PII expansion result payload.
      - `capability` 'pii_expansion'
      - `items` PiiExpansionItem[]
        - `confidenceCategory` 'likely' | 'uncertain', required
        - `emails` string[]
        - `fullName` string, required
        - `id` string, required
        - `label` string, required
        - `matchRationale` string[]
        - `matchedInputs` MatchedInputReference[]
          - `inputType` 'name' | 'alias' | 'adverse_term' | 'keyword' | 'region' | 'email' | 'phone' | 'address' | 'username' | 'domain' | 'location' | 'employer' | 'social_url' | 'seed_url' | 'date_of_birth' | 'place_of_birth' | 'age' | 'gender' | 'drivers_license_state' | 'employment_role' | 'employment_department' | 'employment_location' | 'employment_status', required
          - `value` string, required
        - `normalizedAttributes` SanitizedNormalizedAttributes — Sanitized, connector-agnostic normalized attributes.
          - `addresses` string[]
          - `dates` string[]
          - `domains` string[]
          - `emails` string[]
          - `keywords` string[]
          - `locations` string[]
          - `names` string[]
          - `organizations` string[]
          - `phones` string[]
          - `profileHandles` string[]
          - `usernames` string[]
        - `phones` string[]
        - `riskFlags` string[]
        - `safeMetadata` object
        - `summary` string, required
        - `type` 'identity_candidate'
        - `usernames` string[]
      - `limit` integer
      - `nextCursor` string, nullable
      - `total` integer, nullable
      - `warnings` ApiWarning[]
        - `code` string, required
        - `message` string, required
    - `resultUrl` string, nullable
    - `startedAt` string, date-time, nullable
    - `status` 'queued' | 'running' | 'completed' | 'failed' | 'expired', required
    - `streamUrl` string, nullable
    - `submittedAt` string, date-time, required
    - `summary` JobSummary — Summary counters for a completed or running job.
      - `itemsFound` integer
      - `itemsReturned` integer
    - `warnings` ApiWarning[]
      - `code` string, required
      - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/intraceai/apis/intelligence-api.md) · [All operations](https://skmtc.net/intraceai/apis/intelligence-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/intraceai/intelligence-api/revisions/c0216eef7380/schema)
