Update Row
curl --request PATCH \
--url https://api.sublay.io/v7/:projectId/db/:tableName/:rowId \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/db/:tableName/:rowId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/v7/:projectId/db/:tableName/:rowId")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/db/:tableName/:rowId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"row": {}
}Custom Tables — Rows
Update Row
Update columns on a single custom-table row
Update Row
curl --request PATCH \
--url https://api.sublay.io/v7/:projectId/db/:tableName/:rowId \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId"
headers = {"Authorization": "Bearer <token>"}
response = requests.patch(url, headers=headers)
print(response.text)const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sublay.io/v7/:projectId/db/:tableName/:rowId', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/db/:tableName/:rowId"
req, _ := http.NewRequest("PATCH", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sublay.io/v7/:projectId/db/:tableName/:rowId")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/db/:tableName/:rowId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"row": {}
}Updates one row and returns it. Only the columns present in the body are changed.
Row endpoints capture the caller’s identity but enforce no authorization. See Security: open row CRUD.
Path Parameters
string
required
Logical name of the custom table — pass
orders, not custom_orders.string
required
UUID of the row to update.
Body
A free-form column map of the columns to change. At least one key is required.{ "status": "closed" }
Managed columns are rejected, unknown columns are ignored. Writing
id, createdAt, updatedAt or deletedAt fails with database/managed-column. A key matching no column is silently dropped; if every key is dropped, the request fails with database/no-writable-columns.Response
object
The updated row.
Error Responses
Invalid Body — 400
Invalid Body — 400
{ "error": "Bad Request", "code": "database/invalid-body" }
Managed Column — 400
Managed Column — 400
{
"error": "Bad Request",
"code": "database/managed-column",
"column": "<column name>"
}
No Writable Columns — 400
No Writable Columns — 400
{ "error": "Bad Request", "code": "database/no-writable-columns" }
Table Not Found — 404
Table Not Found — 404
{ "error": "Not Found", "code": "database/table-not-found" }
Row Not Found — 404
Row Not Found — 404
{ "error": "Not Found", "code": "database/row-not-found" }
Foreign Key Violation — 409
Foreign Key Violation — 409
{ "error": "Conflict", "code": "database/foreign-key-violation" }
Server Error — 500
Server Error — 500
{ "error": "Internal Server Error", "code": "database/server-error" }

