Analyze matched segment column mapping
const url = 'https://dev-api.infiniteaudience.ai/v1/match/example/analyze';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev-api.infiniteaudience.ai/v1/match/example/analyze \ --header 'Authorization: Bearer <token>'Streams a bounded schema sample from csv/json/jsonl/Avro input (raw or gzip), analyzes the column structure using AI inference, and returns a mapping of your source columns to standard identity attributes. Takes a segment_id (returned by POST /v1/match/file) — no audience wrapper required. Call this after uploading your file to preview how columns will be interpreted before the match runs.
Response attributes to watch:
-
columns[].confidence: values below 0.6 indicate uncertain mappings that are worth verifying before the match runs. -
columns[].warning: an attribute-level concern flagged by the analyzer (e.g. ambiguous column name or missing country codes on phone numbers). -
unmapped_columns: columns that could not be mapped and will be excluded from identity resolution. If a critical identity attribute (email, phone, last_name) appears here, the match will have reduced accuracy or may fail entirely. -
recommendations: suggestions for improving match quality.
If mappings are incorrect: rename the affected columns in your file to match standard identity attribute names (email, phone, email_sha256, phone_sha256, first_name, middle_name, last_name, name_suffix, address_1, address_2, city, state, zip, dob, iag_person_id) and re-upload. The match workflow will re-analyze automatically.
Analysis gate: unless the segment was created/refreshed with hitl: true, the platform always runs its own column analysis automatically as part of the match workflow, and by the time this endpoint can return real data the upload has already triggered that automatic resolution — calling it does not pause or gate anything in that case, it’s a read-only preview only. If no usable identity attributes can be resolved, the segment transitions to failed and error_message describes which columns could not be mapped.
With hitl: true: the segment’s upload is staged rather than resolving automatically, so this endpoint reads the staged file and genuinely nothing has started yet — review the response, then call POST /v1/segments/{id}/mappings to confirm (starts resolution) or POST /v1/segments/{id}/mappings/cancel to abort.
Requires ‘discovery’ scope.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The segment_id of the matched segment (from POST /v1/match/file).
Responses
Section titled “Responses”Column mapping analysis.
object
object
object
Example
{ "segment_id": "seg_abc123", "analysis": { "columns": [ { "source_column": "Email Address", "mapped_to": "email", "inferred_type": "STRING", "confidence": 0.98, "warning": null }, { "source_column": "Mobile", "mapped_to": "phone", "inferred_type": "STRING", "confidence": 0.84, "warning": "Phone numbers lack country codes — US assumed" } ], "unmapped_columns": [], "recommendations": [ "Add country codes to phone numbers for higher match rates" ] }}Invalid request — malformed body, missing required attribute, or failed validation. See error and message for details.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Bad Request", "code": "MISSING_SEGMENTS", "message": "segment_ids is required for filter audiences."}Missing or invalid Bearer token. Obtain one via POST /v1/auth/token. When a token was supplied but rejected, code distinguishes TOKEN_EXPIRED (the token’s lifetime has passed — request a new one via POST /v1/auth/token and retry) from TOKEN_INVALID (malformed or revoked — re-authenticate).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Unauthorized: Missing or invalid Authorization header"}{ "error": "Unauthorized", "code": "TOKEN_EXPIRED", "message": "Your session has expired. Please sign in again."}Token is valid but lacks the required scope for this endpoint. Check the endpoint description for the required scope (discovery, purchase, or account).
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "SCOPE_REQUIRED", "message": "This endpoint requires the purchase scope."}Resource not found or not accessible to the calling org.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Audience not found"}Resource state conflicts with the request. For upload analysis this includes FILE_NOT_YET_UPLOADED.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examplegenerated
{ "error": "example", "message": "example", "code": "example", "request_id": "example"}Request is structurally valid but the resource is in a state that prevents the operation (e.g. expired, pending, or not yet uploaded). See error and code for the specific reason.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examples
{ "error": "Audience expired", "code": "AUDIENCE_EXPIRED", "message": "This audience version expired. Run a refresh to create a new deliverable version."}{ "error": "Audience not ready", "code": "AUDIENCE_PENDING", "message": "This audience is still being processed. Poll GET /v1/audiences/{id} until status is active."}Unexpected server failure.
object
Stable machine-readable error code (e.g. INVALID_STATUS_TRANSITION, BILLING_INSUFFICIENT_BALANCE). Always present.
Human-readable explanation of the error.
Alternate machine-readable code — present on some endpoints as an alias for error for backward compatibility.
Opaque support/debug identifier when available.
Examplegenerated
{ "error": "example", "message": "example", "code": "example", "request_id": "example"}