---
title: "Import source batch ids from a CSV"
method: POST
path: "/v1/documents/batch-metadata/import"
tags: ["Documents"]
---

# Import source batch ids from a CSV

`POST /v1/documents/batch-metadata/import`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/documents/batch-metadata/import`
- Auth: HTTP bearer

Sets the source batch id on existing documents from a CSV upload (`file`, up to 20 MB). Answers how many documents were updated and which named ones were not found. 403 for a person whose document visibility a rule narrows, because the import matches against every document of the workspace. Requires the `documents:write` scope. The key's person must be an Admin of the workspace, as in the web app; in a workspace whose model configuration Talonic manages this answers 403 `insufficient_role`.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: CSV with a header row.

## Response `201`

OK

- object
  - `updated` integer
  - `not_found` string[]

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `429`: Daily rate limit exceeded.

## Changes

- **2026-11-26** `622d429de7ea`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/documents/batch-metadata/import/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
