Update Entity
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"attachments": [
{}
],
"keywords": [
"<string>"
],
"mentions": [
{}
],
"location": {},
"metadata": {}
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId"
payload = {
"title": "<string>",
"content": "<string>",
"attachments": [{}],
"keywords": ["<string>"],
"mentions": [{}],
"location": {},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
attachments: [{}],
keywords: ['<string>'],
mentions: [{}],
location: {},
metadata: {}
})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId', 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/api/v6/:projectId/api/v7/entities/:entityId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'attachments' => [
[
]
],
'keywords' => [
'<string>'
],
'mentions' => [
[
]
],
'location' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/api/v6/:projectId/api/v7/entities/:entityId")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyEntity Endpoints
Update Entity
Update an entity’s content and metadata
Update Entity
curl --request PATCH \
--url https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"attachments": [
{}
],
"keywords": [
"<string>"
],
"mentions": [
{}
],
"location": {},
"metadata": {}
}
'import requests
url = "https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId"
payload = {
"title": "<string>",
"content": "<string>",
"attachments": [{}],
"keywords": ["<string>"],
"mentions": [{}],
"location": {},
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
attachments: [{}],
keywords: ['<string>'],
mentions: [{}],
location: {},
metadata: {}
})
};
fetch('https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId', 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/api/v6/:projectId/api/v7/entities/:entityId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'content' => '<string>',
'attachments' => [
[
]
],
'keywords' => [
'<string>'
],
'mentions' => [
[
]
],
'location' => [
],
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/api/v6/:projectId/api/v7/entities/:entityId")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/api/v6/:projectId/api/v7/entities/:entityId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"attachments\": [\n {}\n ],\n \"keywords\": [\n \"<string>\"\n ],\n \"mentions\": [\n {}\n ],\n \"location\": {},\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_bodyRequires the
entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.Path Parameters
string
required
The UUID of the entity to update.
Body Parameters
string
New title for the entity.
string
New content body for the entity.
object[]
Replaces the entity’s
attachments array with the provided value.string[]
Replaces the entity’s
keywords array.object[]
Replaces the entity’s
mentions array. Each item is:{ type: "user", id: string, username: string, foreignId?: string }{ type: "space", id: string, slug: string }
object
New geographic coordinates:
{ "latitude": 40.7128, "longitude": -74.0060 }
object
Replaces the entity’s
metadata object entirely.Response
Returns the updated Entity object, populated with the author’s user profile.If
title or content changed, the entity’s semantic search embeddings are automatically re-queued for projects with AI search enabled.Error Responses
Not Found — 404
Not Found — 404
{ "error": "Entity not found.", "code": "entity/not-found" }
Unauthorized — 403
Unauthorized — 403
{ "error": "Not authorized to update this entity.", "code": "entity/not-authorized" }

