Skip to main content
PATCH
/
v1
/
flow
/
vectordb
/
{database_id}
/
metadata
Update chunk metadata
curl --request PATCH \
  --url https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "file_ids": [
    "file_789",
    "file_012"
  ],
  "chunk_ids": [
    "chunk_789",
    "chunk_012"
  ]
}
'
import requests

url = "https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata"

payload = {
"metadata": {},
"file_ids": ["file_789", "file_012"],
"chunk_ids": ["chunk_789", "chunk_012"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metadata: {},
file_ids: ['file_789', 'file_012'],
chunk_ids: ['chunk_789', 'chunk_012']
})
};

fetch('https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [

],
'file_ids' => [
'file_789',
'file_012'
],
'chunk_ids' => [
'chunk_789',
'chunk_012'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

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

func main() {

url := "https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata"

payload := strings.NewReader("{\n \"metadata\": {},\n \"file_ids\": [\n \"file_789\",\n \"file_012\"\n ],\n \"chunk_ids\": [\n \"chunk_789\",\n \"chunk_012\"\n ]\n}")

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

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

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {},\n \"file_ids\": [\n \"file_789\",\n \"file_012\"\n ],\n \"chunk_ids\": [\n \"chunk_789\",\n \"chunk_012\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://flow.seekr.com/v1/flow/vectordb/{database_id}/metadata")

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {},\n \"file_ids\": [\n \"file_789\",\n \"file_012\"\n ],\n \"chunk_ids\": [\n \"chunk_789\",\n \"chunk_012\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "metadata": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}
Overwrite user-defined metadata on chunks within a vector database. Target the chunks with exactly one of chunk_ids or file_ids; providing both, or neither, returns an error. This operation is destructive: the supplied metadata object replaces all existing metadata on every targeted chunk, so include any fields you want to keep.

Authorizations

Authorization
string
header
required

Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.

Path Parameters

database_id
string
required

Body

application/json

Request body for overwriting chunk metadata within a vector database.

This operation is destructive: the provided metadata object replaces all existing metadata on the targeted chunks. Any previous metadata fields not included in the new object are permanently removed.

Provide exactly one of file_ids or chunk_ids to target chunks.

metadata
Metadata · object
required

Key-value pairs to write onto every targeted chunk. Replaces all existing metadata. Constraints: (1) flat object only — no nested objects or arrays; (2) values must be string, number, boolean, or datetime (null is rejected); (3) maximum 20 fields.

Example:
{
"category": "support_doc",
"confidence": "medium",
"source": "manual_review"
}
file_ids
string[] | null

File IDs whose chunks should have their metadata replaced.

Minimum array length: 1
Example:
["file_789", "file_012"]
chunk_ids
string[] | null

Chunk IDs to update metadata on directly.

Minimum array length: 1
Example:
["chunk_789", "chunk_012"]

Response

Successful Response

metadata
Metadata · object
required

The metadata object that was written to all matching chunks.

Last modified on June 25, 2026