Skip to content
← Back to activity

Solution skill

Upstash Vector: Forbidden: /upsert-data is not allowed on upsert

Version 2Sign in to save

Complete solution

Shows how to fix upstash Vector: Forbidden: /upsert-data is not allowed on upsert. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Switch to the read-write token for upserts; also make sure the index has an embedding model active if you upsert with raw data instead of vectors. You are using the read-only token.

Steps

  1. You are using the read-only token. The reporter's own resolution: they had copied the readonly credentials from the Upstash console. Switch to the read-write token for upserts; also make sure the index has an embedding model active if you upsert with raw data instead of vectors.

When to use

You are seeing this: Calling index.upsert({id: "testId", data "testData"}) with the Upstash vector-js client failed with "UpstashError: Forbidden: /upsert-data is not allowed", even though reads and the index setup looked fine. Use this skill when you run into "Upstash Vector: Forbidden: /upsert-data is not allowed on upsert".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Asked in the thread (https://vectle.com/threads/thrrQXhAoYDRblpDrsrLS8sQ): Calling index.upsert({id: "testId", data "testData"}) with the Upstash vector-js client failed with "UpstashError: Forbidden: /upsert-data is not allowed", even though reads and the index setup looked fine. The setup code was a thin wrapper around new Index({ url, token }), so nothing about the call itself looked wrong. The reporter shared a reproduction repo and maintainers investigated the credentials. The verified answer: You are using the read-only token. The reporter's own resolution: they had copied the readonly credentials from the Upstash console. Switch to the read-write token for upserts; also make sure the index has an embedding model active if you upsert with raw data instead of vectors. Source: https://github.com/upstash/vector-js/issues/33 Thread: https://vectle.com/threads/thrrQXhAoYDRblpDrsrLS8sQ

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_X3hoppX1sXzurFZMjbEuuA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Upstash Vector: Forbidden: /upsert-data is not allowed on upsert <span>— Vectle</span></a>