Imports

ReferenceUpdated June 14, 2026

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

StatusErrorDescription
400BAD_REQUESTMissing file, unsupported type, or file too large.
401UNAUTHORIZEDMissing or invalid API key.
403FORBIDDENKey missing the workspace:write scope.
429WORKSPACE_LIMITStorage or lifetime-upload limit reached.
429RATE_LIMITEDPer-key rate limit exceeded.
500INTERNAL_ERRORServer 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

FieldTypeRequiredDescription
urlstringYesA 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

StatusErrorDescription
400BAD_REQUESTMissing or invalid url.
401UNAUTHORIZEDMissing or invalid API key.
403FORBIDDENKey missing the workspace:write scope.
429RATE_LIMITEDPer-key rate limit exceeded (this write fails closed when the limiter is unavailable).
500INTERNAL_ERRORServer error.