Create Data Policy
Create a new data policy to define field transformation rules, lookup cascades, and normalization logic for resolution runs.
Create a new data policy in your workspace. The policy starts at version 1 with no fields or rules. After creation, use the fields and rules endpoints to define the output contract and transformation logic. Policies are not active until they contain at least one field and one rule.
The policy name should be descriptive enough to distinguish it from other policies in the workspace. Use the optional description field to document the policy purpose, the types of documents it targets, and the normalization strategies it employs.
POST
/v1/data-policiesResponse
Response fields (201 Created)
idstringData policy UUID.
namestringPolicy name.
descriptionstring | nullPolicy description.
versionintegerInitial version, always 1.
created_atstringISO 8601 creation timestamp.
updated_atstringISO 8601 last update timestamp.
curl
Response (201 Created)
{
"id": "p1a2b3c4-e5f6-7890-abcd-ef1234567890",
"name": "Invoice Normalization",
"description": "Standardize currency codes, country names, and date formats",
"version": 1,
"created_at": "2024-10-01T09:00:00.000Z",
"updated_at": "2024-10-01T09:00:00.000Z"
}Errors
Error responses
400bad_requestInvalid request body or missing required fields.
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.