Create an import
Start an import session and queue the prepare step. Send `multipart/form-data` with a `file` field to import a spreadsheet, or JSON to import a Notion data…
Start an import session and queue the prepare step. Send multipart/form-data with a file field to import a spreadsheet, or JSON to import a Notion data source. The response carries the queued state; poll the import to follow it.
When the prepare step cannot be queued the session is still created and prepareQueueError explains why. Retry it with the prepare endpoint rather than creating a second session.
Authorization
bearerAuth In: header
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/imports" \ -H "Content-Type: application/json" \ -d '{ "sourceType": "notion", "notionIntegrationId": "9f1c2d3e-4b5a-6789-abcd-ef0123456789", "notionConnectionId": "conn_01HZY8Q4R2", "notionDataSourceId": "12a34b56-78c9-40de-9f01-234567890abc", "sourceLabel": "Security Q&A database", "mapping": { "question": "Question", "answer": "Answer" }, "defaults": { "access_level": "restricted" } }'{ "id": "550e8400-e29b-41d4-a716-446655440000", "state": "queued_prepare", "nextUrl": "/knowledge-base/imports/550e8400-e29b-41d4-a716-446655440000", "prepareEventId": "01HZY8Q4R2XKJ7M3N5P6"}How is this guide?