---
title: "Create Import History Endpoint"
method: POST
path: "/imports/history"
tags: ["imports"]
---

# Create Import History Endpoint

`POST /imports/history`

Create import history record to store generic tabular dataframe data.

This endpoint is called after bulk upload completion to store the complete
import record with the original parsed data (BibTeX, CSV, etc.) in a
standardized dataframe format.

Args:
    import_history_create: Import history creation data
    db: Database session
    current_user: Authenticated user

Returns:
    ImportHistoryResponse with created record information

Raises:
    HTTPException: If workspace doesn't exist or creation fails

## Request body

- ImportHistoryCreate — Request schema for creating import history record.
  - `workspace_id` string, uuid, required — Target workspace ID
  - `filename` string, required — Import filename (.bib, .csv, etc.)
  - `data` object, required — Tabular dataframe data converted from BibTeX file
  - `metadata` object, nullable — Import metadata including ImportStatus and associated files for each reference

## Response `201`

Successful Response

- ImportHistoryCreateResponse — Response schema for import history creation (without user object).
  - `id` string, uuid, required — Import history record ID
  - `workspace_id` string, uuid, required — Workspace ID
  - `filename` string, required — Import filename
  - `created_at` string, date-time, required — Creation timestamp

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Unprocessable Content
- `500` — Internal Server Error

---

[API](https://skmtc.net/hf/apis/extralit-v1.md) · [All operations](https://skmtc.net/hf/apis/extralit-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hf/extralit-v1/revisions/3ebd7ae94c89/schema)
