KintsugiKintsugi
API reference / Create an import and get a single-file upload URL

Create an import and get a single-file upload URL

POST/imports/initiate

Create an import row for one file and return a presigned URL to PUT its bytes to; check uploadMode for how to deliver the file. Set importType to PRODUCT_UPDATES for a product bulk-update .xlsx workbook. Requires file upload v2 for the target organization.

Authorization

Api-KeystringRequired

Your secret API key. Include it with every request.

Headers

Api-Versiondate

Release date, as YYYY-MM-DD. Defaults to 2026-07-21.

Organization-Idstring

Target organization id (Organization-Id selector).

Connection-Idstring

Target connection id; resolves to its organization.

Entity-Idstring

Platform entity id; resolves to a connection's organization.

Entity-Sourcestring

Optional source to disambiguate an Entity-Id.

Body

fileNamestringRequired

Original file name of the upload.

sizeintegerRequired

Declared file size in bytes.

contentTypestring

MIME type of the file to upload.

sourcestringRequired

Import source (a connector name, or IMPORT for a manual upload).

userIdstringRequired

Caller-supplied id of the person or process performing the upload, for audit trails.

directionPublicTransactionDirectionEnum

SALE or PURCHASE for the whole file; blank per-row direction cells take this value.

Available options:SALEPURCHASE
importTypePublicImportTypeEnum

TRANSACTIONS (default) for a sales/purchase CSV. PRODUCT_UPDATES for a product bulk-update workbook: fileName must end in .xlsx and contentType must be the Excel workbook MIME type.

Available options:TRANSACTIONSPRODUCT_UPDATES

Response

importIdstringRequired

Id of the created import.

uploadUrlstringRequired

URL to PUT the file bytes to; a path on this API when uploadMode is local_internal.

expiresAtstringRequired

When uploadUrl expires.

uploadModestringRequired

How to deliver the file. presigned sends it to the returned URL directly. local_internal only appears in local development: send it to the returned path on this API with your credential.

Available options:presignedlocal_internal
200

Successful Response

400

The request was invalid.

401

Authentication failed or was missing.

403

The credential is not permitted for this request.

404

The requested resource was not found.

409

The request conflicts with existing state.

422

The request failed validation.

cURL
POST /imports/initiate
-H "Api-Key: ***"
-H "Api-Version: 2026-07-21"
{
"fileName": "certificate.pdf",
"size": 20,
"contentType": "text/csv",
"source": "API",
"userId": "3f6c2b1e-8a4d-4c2e-9b1f-2d7e5a6c9f10",
"direction": "SALE",
"importType": "TRANSACTIONS"
}
Response
{
"importId": "impt_2mNpQr7Ls8f3k",
"uploadUrl": "https://www.example.com",
"expiresAt": "2026-07-28T12:00:00Z",
"uploadMode": "presigned"
}
Create an import and get a single-file upload URL (2026-07-21) | Kintsugi API Reference