Skip to main content
POST

Authorizations

Authorization
string
header
required

User-principal OAuth 2.0 Bearer authentication. Send a user-scoped Auth0 access token (audience = the app API audience) as Authorization: Bearer <jwt>. The request resolves to the user's identity and is authorized by their Role on the {companyId} in the path — the same role-based permissions the web app enforces. This is the path the MCP connector uses to act on a user's behalf; endpoints that accept it list both BearerAuth and ApiKeyAuth.

Path Parameters

companyId
string<uuid>
required

Company identifier

Body

application/json

One record to import. data is stored as an import row exactly as sent, before anything else can fail; the transformations and guards then run against it, and the entity is created or updated.

entityType
enum<string>
required

The entity type to import, in PascalCase. Policies and policy transactions cannot be imported.

Available options:
Event,
Exposure,
Quote,
Submission,
Person,
Organization
data
object
required

The source data. The entity lives under its entity key, the entity type in camelCase (data.submission for a Submission). Every other top-level key is ancillary data, such as data.broker, that transformations can read by name and that is never written to the entity.

transformations
object

How data.<entityKey> becomes an entity in this company's field model: one entry per field reference id (camelCase). Each value is either a JEXL expression string that reads the data's top-level keys by name (submission.name, broker.email), or a mapping for a list of child objects: { "mapOver": "<data path>", "values": { "<childKey>": "<expression>" } }. Inside values, bare names and me are the current element, parent is the object holding the list and root is the whole data. A child value may itself be a mapping; its mapOver path reads the current scope (for example me.locations). A { "values": { ... } } constructor without mapOver builds one object in the surrounding scope and can contain mapped lists. At every depth, root remains the original data.

Every field of data.<entityKey> without a transformation is kept as sent. A transformed entity with an id updates that entity; otherwise one is created. Keys the company's field model does not declare are dropped before an entity write. Policy jobs instead construct the whole-policy or single-transaction command envelope; envelope keys are validated by that contract.

guards
object[]

Conditions that must hold for the write to proceed, evaluated against the transformed entity, reading its fields by bare name. Only a strict true passes, and a condition that cannot be evaluated fails. They run in addition to the company's own entity invariants.

importBatch
string | null

Your key grouping requests for later review, such as one load's name. Stored on the import row, and as the attemptBatch of the attempt this request records. Omit it or send null for none; a blank key is refused.

Response

The row was stored and an attempt recorded. Whether the entity was written is the attempt's writeResult.

The stored import row's id and the attempt this request recorded.

importRowId
string<uuid>
required

The import row storing data as sent. Read it with Get Import Row; a failed import is fixed by retrying this row, not by sending the data again.

importAttempt
object
required

One import attempt: a single transform → guard → write pass over an import row. An import request records the first attempt on its row, and each retryImport records another. Attempts are stored whether or not the write happened.

The attempt is recorded before its first step runs, with every result null, and each step's result is stored on it as the step completes: transformationResult and action, then guardResult, then writeResult. The import and retryImport responses answer with the finished attempt.

writeResult is stored in the same transaction as the entity write, so the two commit together or not at all. An attempt whose guardResult passed and whose writeResult is null wrote no entity: it is still in progress, or it crashed before its write committed. Its import row can be retried; the retry cannot create a second entity alongside one the crashed attempt wrote.