imports.run
Owner only: import customers (and one service address each) from a CSV with the mapping the owner confirmed. mode all_or_nothing (default) writes nothing if any row fails; per_row writes the good rows and reports the rest. dry_run true checks without writing.
| Who | Agents can call this |
| REST | POST /v1/imports/run |
| MCP tool | imports_run |
| Writes | yes, send an Idempotency-Key |
| Area | Imports, custom fields, tags and search |
When to use it
Owner only: import customers (and one service address each) from a CSV with the mapping the owner confirmed. mode all_or_nothing (default) writes nothing if any row fails; per_row writes the good rows and reports the rest.
What to tell the owner
Say what you did in plain words and what happens next.
Input
| Field | Type | Required |
|---|---|---|
shop_id | string (uuid) | yes |
csv | string | yes |
mapping | array | yes |
mapping[].column | string | yes |
mapping[].field | string (one of name, first_name, last_name, is_company, company_name, email, phone, lead_source, tags, notes, external_id, property.line1, property.line2, property.locality, property.region, property.postal_code, property.full_address, billing.line1, billing.line2, billing.locality, billing.region, billing.postal_code, billing.country, skip) | yes |
mode | string (one of all_or_nothing, per_row) | no |
dry_run | boolean | no |
source | string | no |
on_match | string (one of skip, update) | no |
preview_hash | string (sha256) | no |
Example
POST https://doingwork.work/v1/imports/run
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"csv": "...",
"mapping": [
{
"column": "...",
"field": "name"
}
]
}Output
JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.
Errors
| Code | Status | What to do |
|---|---|---|
invalid_input, invalid_token, rate_limited | Can happen on any call. See errors. |