Insert records into a table
Insert one record (JSON object) or multiple records (JSON array) into a table.
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, the user_id column (or configured owner field) is automatically set to the caller's user ID. Any client-supplied value for that field is ignored and overwritten.
Upsert / conflict handling Append ?on_conflict=col1,col2 to perform an upsert on the specified columns. Non-conflict columns are updated; conflict columns are unchanged.
Return inserted rows Send the Prefer: return=representation header to receive the inserted rows in the response body (uses RETURNING *). Response is 201 either way.
camelCase keys in the request body are automatically converted to snake_case.
Request
- Base URLhttps://core.blink.new
- URLhttps://core.blink.new/api/db/{project_id}/rest/v1/{table}
- Auth
- HTTP bearer
- or none
Path parameters
Unique identifier for the project
Table name (alphanumeric + underscores)
Query parameters
Comma-separated conflict columns for upsert (INSERT OR REPLACE on conflict)
Request body
Example request
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"status": "active",
"created_at": "2024-01-20T10:30:00Z"
}Response
Record(s) inserted successfully
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.