Database

Update records in a table

Update one or more rows that match the query-string filters.

Authentication

  • Requires a valid bearer token unless the project policy has require_auth: false.
  • Service-role tokens bypass row-level security.

Row-Level Security (RLS) For non-service tokens with owner mode RLS, a WHERE user_id = <caller_id> condition is automatically added. The owner field itself cannot be changed by non-service callers (ownership transfer is blocked). Sending your own id is accepted and dropped, so the same payload can be reused for create and update; if it was the only field there is nothing left to write and the call returns 400.

Filtering Use the same column-operator query parameters as GET (e.g. ?status=eq.active). Without any filter, all rows the caller can see will be updated.

Return updated rows Send the Prefer: return=representation header to receive updated rows in the response body. Without it, the response is 204 No Content.

camelCase keys in the request body are automatically converted to snake_case.

patch/api/db/{project_id}/rest/v1/{table}

Request

  • Base URL
    https://core.blink.new
  • URL
    https://core.blink.new/api/db/{project_id}/rest/v1/{table}
  • Auth
    • HTTP bearer
    • or none

Path parameters

project_idstring required
Example:my-project-123

Unique identifier for the project

tablestring required
Example:users

Table name (alphanumeric + underscores)

Query parameters

id'return=representation' | 'return=minimal'
Example:eq.42

Filter by primary key (shorthand for ?id=eq.value)

Request body

TableRecord required

Generic table record with dynamic fields

Example request

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "status": "active",
  "created_at": "2024-01-20T10:30:00Z"
}

Response

Updated records (when Prefer: return=representation header is sent)

TableRecord[] required

Example response

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "john@example.com",
    "status": "active",
    "created_at": "2024-01-20T10:30:00Z"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.