Enrichment
Person Enrichment
Trigger and retrieve contact enrichment (phone numbers or emails) for a specific person
POST
This endpoint manages the enrichment process for a person’s contact information. Use the POST method to trigger a new enrichment and the GET method to check the status of an existing enrichment request.
Long-Running Operation
This endpoint supports a maximum execution time of 800 seconds (~13
minutes). Enrichment involves calling multiple external providers which can
take time to process.
Credit Consumption
Trigger Enrichment
POST /api/v1/operations/enrichment/{personId}
Triggers the enrichment process for a person’s phone numbers or email
addresses. If a pending or completed enrichment already exists, returns the
existing enrichment without consuming additional credits.
Path Parameters
The unique identifier (UUID) of the person to enrich. Example:
550e8400-e29b-41d4-a716-446655440000Query Parameters
The type of contact information to enrich. Allowed values:
phones |
emails - phones - Enrich phone numbers for the person - emails - Enrich
email addresses for the personResponse
The unique identifier (UUID) of the enrichment record.
ISO 8601 timestamp of when the enrichment was created.
ISO 8601 timestamp of when the enrichment was last updated.
The UUID of the person being enriched (matches the
personId path parameter).The type of entity being enriched. Always
person for this endpoint.The field being enriched. Either
phones or emails.The current status of the enrichment request. Possible values: -
pending- Enrichment is in progress -
finished- Enrichment completed successfully -failed- Enrichment failed due to an error -timeout- Enrichment exceeded the maximum processing time -cancelled- Enrichment was cancelled
Error message if the enrichment failed.
null for successful or pending
enrichments.Indicates whether contact data was found during enrichment. -
true - Data
was found and added to the person - false - No data was found - null -
Enrichment is pending or status unknownThe Clerk user ID of the user who triggered the enrichment.
The organization ID associated with this enrichment.
Reference to the global enrichment record if data was cached from a previous
enrichment.
Reference to the credit transaction if credits were consumed for this
enrichment.
Get Enrichment Status
GET /api/v1/operations/enrichment/{personId}
Retrieves the current status of an enrichment request for a person.
Path Parameters
The unique identifier (UUID) of the person whose enrichment status to
retrieve. Example:
550e8400-e29b-41d4-a716-446655440000Query Parameters
The type of contact enrichment to check. Allowed values:
phones |
emailsResponse
Returns the same enrichment object structure as the POST method.Error Codes
| Status Code | Error Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | Missing or invalid personId or field parameter |
401 | UNAUTHORIZED | Missing or invalid authentication token |
402 | INSUFFICIENT_CREDITS | Organization does not have enough credits for the enrichment |
404 | NOT_FOUND | Enrichment not found (GET only) |
500 | INTERNAL_ERROR | Server error during enrichment processing |
Enrichment Behavior
Idempotency
The POST endpoint is idempotent for active enrichments:- If a pending or finished enrichment exists for the same person and field, it returns the existing enrichment without consuming credits
- If a failed, timeout, or cancelled enrichment exists, a new enrichment is created
Asynchronous Processing
Enrichment runs asynchronously after the initial response:- POST immediately returns with a
pendingstatus - The enrichment process runs in the background
- Use GET to poll for completion status
Timeout Handling
Enrichments that remain inpending status beyond the maximum age are automatically marked as timeout when queried via GET.
Notes
- Authentication is required via Clerk (both user and organization must be authenticated)
- Each enrichment consumes credits based on the field type (
enrichment_emailorenrichment_phone) - Enriched data is cached globally to avoid redundant API calls for the same person
- The endpoint reuses existing enrichments to minimize credit consumption