---
title: "Update data in database (REST API)"
method: POST
path: "/databases/{databaseName}/branches/{branchName}/query/update"
tags: ["Database Queries"]
---

# Update data in database (REST API)

`POST /databases/{databaseName}/branches/{branchName}/query/update`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/databases/{databaseName}/branches/{branchName}/query/update`
- Auth: HTTP bearer

Update existing rows in your database using REST API.

**Security:** Row-Level Security ensures you can only update data you have access to

**Safety:** Requires at least one filter to prevent accidental mass updates. A
request with no `filters` is rejected with `400` (mirrors delete). This matters
for service-key queries, which run with full access and bypass RLS.

**Note:** If RLS blocks the update, an empty result is returned (not an error)

**Branch-targeted.** Runs against the named branch instead of the parent
database, using the branch's own credentials. The branch must be `active`
and unexpired. Nothing about this request can reach the parent's data.

## Path parameters

- `databaseName` string, required
- `branchName` string, required

## Request body

- DatabaseUpdateRequest
  - `table` string, required: Table name
  - `values` object, required: Column values to update. JSON objects and arrays are stored as JSON, so send them to `json` or `jsonb` columns. For a Postgres array column, send an array literal string such as `"{a,b}"`.
  - `filters` DatabaseQueryFilter[], required: WHERE conditions for which rows to update. At least one filter is required; a filterless update is rejected to avoid rewriting every row.
    - `column` string, required
    - `operator` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in', required: Filter operators: - eq: equals (=) - neq: not equals (<>) - gt: greater than (>) - gte: greater than or equal (>=) - lt: less than (<) - lte: less than or equal (<=) - like: pattern match (LIKE) - ilike: case-insensitive pattern match (ILIKE) - is: IS NULL / IS NOT NULL - in: IN array
    - `value` union, required
      - string, nullable
      - number
      - boolean
      - union[]: Array of values, for the `in` operator
        - union
          - string
          - number
          - boolean

## Response `200`

Update successful

- DatabaseQueryResult: Rows returned by a data API request. RLS-filtered unless the request was made with a service key.
  - `data` object[]: Result rows
  - `count` integer: Number of rows returned

## Other responses

- `400`: Invalid request
- `401`: Not authenticated
- `403`: Access denied
- `404`: Database or branch not found
- `429`: The query was rejected by a billing-cycle allowance: either the owning platform user's bandwidth allowance (aggregate ingress + egress across owned projects) or their database-request allowance. Enforcement is eventual: queries are rejected until the allowance increases or the next anniversary cycle begins. The error message identifies the resource.
- `503`: The branch exists but cannot serve queries: it is still provisioning, being reset, expired, or its parent is being restored. Distinct from `404` so a caller waiting on a branch can tell it apart from a typo.

## Changes

- **2026-09-19** `3a6f365f3f35`: 13 breaking, 14 info
  - added the new path request parameter `branchName`
  - added the new path request parameter `databaseName`
  - added the new required request property `filters`
  - added the new required request property `table`
  - …23 more
- **2026-09-04** `c2ec82fb8ce8`: 1 info
  - added the non-success response with the status `503`
- **2026-08-27** `bb44e98aba2e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/databases/:databaseName/branches/:branchName/query/update/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
