---
title: "Import data into existing account-level collection"
method: POST
path: "/v1/collections/{collectionId}/import"
tags: ["Collections"]
---

# Import data into existing account-level collection

`POST /v1/collections/{collectionId}/import`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/collections/{collectionId}/import`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/collections/:collectionId/import/post.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Upload a CSV file containing the collection of string values that should be
attached as payload for collection.

The file should be sent as multipart data.

The import **replaces** the initial content of the collection.

The CSV file **must** only contain the following column:

- `item`: the values in your collection.

A collection is limited to 500,000 items.

## Example

```
item
Adidas
Nike
Asics
```

> [!note] Before sending a request to this endpoint, ensure the data in the
> CSV to import is different from the data currently stored in the collection.

## Path parameters

- `collectionId` integer, required

## Request body `multipart/form-data`

- object
  - `upFile` string, binary: The CSV file containing the data that is being imported.

## Response `200`

OK

- Import
  - `id` integer, required: The internal ID of this entity.
  - `created` string, date-time, required: The time this entity was created.
  - `accountId` integer, required: The ID of the account that owns this entity.
  - `userId` integer, required: The ID of the user associated with this entity.
  - `entity` string, required: The name of the entity that was imported.
  - `amount` integer, required: The number of values that were imported.

## Other responses

- `400`: Bad request
- `401`: Unauthorized

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
