> ## Documentation Index
> Fetch the complete documentation index at: https://wrtntechnologies.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Upsert data

This page shows you how to upsert documents into an index.

```bash theme={null}
AIMP_PROJECT_API_KEY="YOUR_API_KEY"

curl -X POST \
  "https://{baseUrl}/{apiVersion}/projects/{project_id}/indexes/{index_name}/docs/upsert" \
  -H 'content-type: application/json
  -H 'x-api-key: $AIMP_PROJECT_API_KEY' \
  -d '{
    "docs": [
      {
        "id": "33201222",
        "url": "https://en.wikipedia.org/wiki/AIMP",
        "title": "AIMP",
        "text": "AIMP is a freeware audio player for Windows, Android and Linux (through Wine) ... "
      },
      {
        "url": "https://en.wikipedia.org/wiki/Winamp",
        "title": "Winamp",
        "text": "Winamp is a media player for Windows, macOS and Android, originally developed by Justin Frankel and Dmitry Boldyrev by their company Nullsoft, which they later sold to AOL, who sold to Radionomy in January 2014."
      }
    ]
  }'
```

Each document implicitly contains an `id` field in order to uniquely identify a document.
A unique string value is auto-generated by the system if `id` field is not provided in an upsert request.
If you want to overwrite the entire document, you can do so by providing the `id` field in the document.

AIMP currently does not support a partial update operation.

## Upsert limits

| Metric                       | Limit |
| ---------------------------- | ----- |
| Max payload size             | 6MB   |
| Max length for a document ID | ??    |
| Max vector dimensions        | 4,096 |

When upserting larger amounts of data, it is recommended to use
[bulk-upsert](/guides/data/bulk-upsert-data) operation.
