Database

Delete records from a table

Delete 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 so callers can only delete their own rows.

Filtering Use the same column-operator query parameters as GET (e.g. ?id=eq.5). Without any filter and without RLS, all rows in the table will be deleted. Always pass at least one filter in production code.

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

delete/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:todos

Table name (alphanumeric + underscores)

Query parameters

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

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

Response

Deleted 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.