Imports
Imports
Import business information into workspace_details from a document or a company URL. Both operations are async and free (rate limited), and merge their findings into the workspace details only — they do not regenerate documents (see Regenerate for that).
Both require the workspace:write scope. They return 202 with a job descriptor — poll GET /api/v1/jobs/:id. See Conventions → Async jobs.
Import details from a document
POST /api/v1/workspace/imports/document · scope workspace:write · (async)
Upload a business document (.txt, .md, .csv, .pdf, .docx, ≤ 10 MB) as multipart/form-data. The file is stored and an extraction job merges discovered fields into workspace_details.
Example request
curl -X POST "https://app.machfive.io/api/v1/workspace/imports/document" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@./company-overview.pdf"Response (202 Accepted)
{
"id": "job-uuid",
"type": "workspace.import.document",
"status": "pending",
"progress": null,
"result": null,
"error": null,
"created_at": "2026-06-14T12:00:00.000Z",
"updated_at": "2026-06-14T12:00:00.000Z"
}On completion the job's result is { "status": "completed", "fields_updated": N }.
Error responses
| Status | Error | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing file, unsupported type, or file too large. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the workspace:write scope. |
| 429 | WORKSPACE_LIMIT | Storage or lifetime-upload limit reached. |
| 429 | RATE_LIMITED | Per-key rate limit exceeded. |
| 500 | INTERNAL_ERROR | Server error. |
Import details from a URL
POST /api/v1/workspace/imports/url · scope workspace:write · (async)
Runs company research on a URL and merges the findings into workspace_details only (no document regeneration).
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | A valid http(s) URL (max 2000 chars). |
Example request
curl -X POST "https://app.machfive.io/api/v1/workspace/imports/url" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "url": "https://acme.com" }'Response (202 Accepted)
{ "id": "job-uuid", "type": "workspace.import.url", "status": "pending", "result": null, "error": null, "created_at": "...", "updated_at": "..." }On completion the job's result is { "parsed": <boolean> } — true when the research findings were parsed and merged into workspace_details, or false when company research succeeded but parsing produced no merged fields.
Error responses
| Status | Error | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing or invalid url. |
| 401 | UNAUTHORIZED | Missing or invalid API key. |
| 403 | FORBIDDEN | Key missing the workspace:write scope. |
| 429 | RATE_LIMITED | Per-key rate limit exceeded (this write fails closed when the limiter is unavailable). |
| 500 | INTERNAL_ERROR | Server error. |