> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api.qdrant.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api.qdrant.tech/_mcp/server.

# Upsert points

PUT http://localhost:6333/collections/{collection_name}/points
Content-Type: application/json

Performs the insert + update action on specified points. Any point with an existing \{id} will be overwritten.

Reference: https://api.qdrant.tech/api-reference/points/upsert-points

## Authentication

- `api-key` header (required) — API Key authentication via header

## Servers

- `http://localhost:6333` (http, default)
- `https://localhost:6333` (https)

## Request

### Path parameters

- `collection_name` (string, required) — Name of the collection to update from

### Query parameters

- `wait` (boolean, optional) — If true, wait for changes to actually happen
- `ordering` (enum, optional) — define ordering guarantees for the operation
  - Allowed values: `weak`, `medium`, `strong`

### Body (application/json)

This endpoint expects a PointInsertOperations.

- `PointInsertOperations`

## Response

### 200

successful operation

- `time` (double, optional) — Time spent to process this request
- `status` (string, optional)
- `result` (UpdateResult, optional)

## Types

### PointsBatch

- `batch` (Batch, required)
- `shard_key` (PointsBatchShardKey, optional)

### PointsList

- `points` (list of PointStruct, required)
- `shard_key` (PointsListShardKey, optional)

### UpdateResult

- `status` (enum, required) — `Acknowledged` - Request is saved to WAL and will be process in a queue. `Completed` - Request is completed, changes are actual.
  - Allowed values: `acknowledged`, `completed`
- `operation_id` (uint64, optional, nullable) — Sequential number of the operation

### Batch

- `ids` (list of ExtendedPointId, required)
- `vectors` (BatchVectorStruct, required)
- `payloads` (list of BatchPayloadsItems, optional, nullable)

### PointsBatchShardKey

### PointStruct

- `id` (ExtendedPointId, required) — Type, used for specifying point ID in user interface
- `vector` (VectorStruct, required) — Full vector data per point separator with single and multiple vector modes
- `payload` (PointStructPayload, optional) — Payload values (optional)

### PointsListShardKey

### ExtendedPointId

Type, used for specifying point ID in user interface

### BatchVectorStruct

### BatchPayloadsItems

### VectorStruct

Full vector data per point separator with single and multiple vector modes

### PointStructPayload

Payload values (optional)

## Examples

**Request**

```json
{
  "batch": {
    "ids": [
      1
    ],
    "vectors": {}
  }
}
```

**Response**

```json
{
  "time": 1.1,
  "status": "string",
  "result": {
    "status": "acknowledged",
    "operation_id": 1
  }
}
```

**SDK Code**

```rust
use qdrant_client::qdrant::{PointStruct, UpsertPointsBuilder};
use qdrant_client::{Qdrant, Payload};
use serde_json::json;

let client = Qdrant::from_url("http://localhost:6334").build()?;

client
    .upsert_points(
        UpsertPointsBuilder::new(
            "{collection_name}",
            vec![
                PointStruct::new(
                    1,
                    vec![0.9, 0.1, 0.1],
                    Payload::try_from(json!(
                        {"color": "red"}
                    ))
                    .unwrap(),
                ),
                PointStruct::new(
                    2,
                    vec![0.1, 0.9, 0.1],
                    Payload::try_from(json!(
                        {"color": "green"}
                    ))
                    .unwrap(),
                ),
                PointStruct::new(
                    3,
                    vec![0.1, 0.1, 0.9],
                    Payload::try_from(json!(
                        {"color": "blue"}
                    ))
                    .unwrap(),
                ),
            ],
        )
        .wait(true),
    )
    .await?;

```

```csharp
using Qdrant.Client;
using Qdrant.Client.Grpc;

var client = new QdrantClient("localhost", 6334);

await client.UpsertAsync(
  collectionName: "{collection_name}",
  points: new List<PointStruct>
  {
    new()
    {
      Id = 1,
      Vectors = new[] { 0.9f, 0.1f, 0.1f },
      Payload = { ["city"] = "red" }
    },
    new()
    {
      Id = 2,
      Vectors = new[] { 0.1f, 0.9f, 0.1f },
      Payload = { ["city"] = "green" }
    },
    new()
    {
      Id = 3,
      Vectors = new[] { 0.1f, 0.1f, 0.9f },
      Payload = { ["city"] = "blue" }
    }
  }
);

```

```java
import static io.qdrant.client.PointIdFactory.id;
import static io.qdrant.client.VectorFactory.vector;
import static io.qdrant.client.VectorsFactory.namedVectors;

import java.util.List;
import java.util.Map;

import io.qdrant.client.QdrantClient;
import io.qdrant.client.QdrantGrpcClient;

import io.qdrant.client.grpc.Points.PointStruct;

QdrantClient client = new QdrantClient(
                QdrantGrpcClient.newBuilder("localhost", 6334, false).build());

client
    .upsertAsync(
        "{collection_name}",
        List.of(
            PointStruct.newBuilder()
                .setId(id(1))
                .setVectors(
                    namedVectors(
                        Map.of(
                            "image",
                            vector(List.of(0.9f, 0.1f, 0.1f, 0.2f)),
                            "text",
                            vector(List.of(0.4f, 0.7f, 0.1f, 0.8f, 0.1f, 0.1f, 0.9f, 0.2f)))))
                .build(),
            PointStruct.newBuilder()
                .setId(id(2))
                .setVectors(
                    namedVectors(
                        Map.of(
                            "image",
                            List.of(0.2f, 0.1f, 0.3f, 0.9f),
                            "text",
                            List.of(0.5f, 0.2f, 0.7f, 0.4f, 0.7f, 0.2f, 0.3f, 0.9f))))
                .build()))
    .get();

```

```typescript
import { QdrantClient } from "@qdrant/js-client-rest";

const client = new QdrantClient({ host: "localhost", port: 6333 });

client.upsert("{collection_name}", {
  points: [
    {
      id: 1,
      payload: { color: "red" },
      vector: [0.9, 0.1, 0.1],
    },
    {
      id: 2,
      payload: { color: "green" },
      vector: [0.1, 0.9, 0.1],
    },
    {
      id: 3,
      payload: { color: "blue" },
      vector: [0.1, 0.1, 0.9],
    },
  ],
});

```

```python
from qdrant_client import QdrantClient, models

client = QdrantClient(url="http://localhost:6333")

client.upsert(
    collection_name="{collection_name}",
    points=[
        models.PointStruct(
            id=1,
            payload={
                "color": "red",
            },
            vector=[0.9, 0.1, 0.1],
        ),
        models.PointStruct(
            id=2,
            payload={
                "color": "green",
            },
            vector=[0.1, 0.9, 0.1],
        ),
        models.PointStruct(
            id=3,
            payload={
                "color": "blue",
            },
            vector=[0.1, 0.1, 0.9],
        ),
    ],
)

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:6333/collections/collection_name/points"

	payload := strings.NewReader("{\n  \"batch\": {\n    \"ids\": [\n      1\n    ],\n    \"vectors\": {}\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:6333/collections/collection_name/points")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"batch\": {\n    \"ids\": [\n      1\n    ],\n    \"vectors\": {}\n  }\n}"

response = http.request(request)
puts response.read_body
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'http://localhost:6333/collections/collection_name/points', [
  'body' => '{
  "batch": {
    "ids": [
      1
    ],
    "vectors": {}
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```swift
import Foundation

let headers = [
  "api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["batch": [
    "ids": [1],
    "vectors": []
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:6333/collections/collection_name/points")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```