Skip to main content
Update Entity
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Updates the fields of an existing entity. Only the fields you include in the request body are updated — omitted fields are left unchanged. Only the entity’s author may update it: with their own access token, or with a service key naming them in actingUserId — the request then runs exactly as theirs. An entity with no author belongs to your app: only a service key naming nobody may update it, and a user token gets 403. A draft with no author is answered as not found (404 entity/not-found) for every caller. Authentication required. Editing an entity in a space is posting there, so the author must still be allowed to post in it, by the same rules as creating (see Who can post and take part). An author who can no longer read the space’s content (they left a space whose readingPermission is "members", or were banned in one) gets 404 entity/not-found. An author who can still read it but may not post — banned in the space or a space above it, or left out by its postingPermission (for example after it changed to "team") — gets 403 space/posting-not-allowed. Deleting stays allowed. App-owned entities, edited by a service key naming nobody, aren’t checked. Anyone other than the author gets 404 entity/not-found for an entity in a space they can’t read, the same as a missing entity, and 403 otherwise. Files can be changed in the same request: images and files are appended after the entity’s existing files, and removeFileIds deletes existing ones by File ID. Uploads are sent as multipart/form-data; without files, use application/json. Any file change requires the files-images bundle.

Path Parameters

string
required
The UUID of the entity to update.

Body Parameters

string
Service key only: the user this edit acts as. Required when the entity has an author: name the author, and the request runs exactly as their own access token’s (naming anyone else gets what their token gets, 403). Leave it out only for an app-owned entity (no author). A user token always acts as its own user and must not send it, and neither may a request with no credentials (400 entity/acting-user-not-allowed).
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:
object
Replaces the entity’s metadata object entirely.
boolean
The entity’s own NSFW flag. On a multipart request, send "true" or "false".
string[]
Files to remove from the entity: ids in its files. Each file and its blobs are deleted. Works alone or with uploads in the same request. On a multipart request, send it as a JSON string ('["<fileId>"]'). Any id that isn’t one of this entity’s files refuses the whole request with 400 entity/invalid-remove-file-ids.
string | string[]
What the response adds: files, the entity’s images and files as they now are, in order, images with their variants. A comma-separated value or an array; in a multipart body also a JSON-string array such as '["files"]'. Matching ignores case. In the body like every other field (JSON, or a multipart field such as include=files), never the query. Without it the response has no files, even when the update uploaded or removed files. Without the files-images bundle it adds nothing.

File Uploads (multipart/form-data)

On a multipart request every field is a string: send attachments, keywords, mentions, location, metadata and removeFileIds as JSON strings.
file[]
Images to append, up to 50 MB each, processed into sizes per images.options. Requires images.options. A request takes at most 20 files over images and files together (see Upload errors).
string
JSON-stringified image-processing options, applied to every image (mode is required). The same options as Create Entity. A key the options don’t take, a key of another mode included (for example sizes with exact-dimensions), is refused with 400 entity/invalid-body, param naming it.
file[]
Files to append, stored as uploaded, up to 50 MB each. Each file’s type comes from its MIME type; an image sent here isn’t processed, so it has no image data.
string
Stringified JSON for file options. Optional pathParts (string[]) customizes the storage path. A key other than pathParts is refused with 400 entity/invalid-body, param naming it.
New files come after the entity’s existing ones, images first and then files, each in upload order. An images.options or files.options sent without its files isn’t used, but is still validated: invalid options get a 400.

Response

Returns the updated Entity object, populated with the author’s user profile. With include: "files" it also carries files: the entity’s files as they now are, images with their variants. To show a file change without fetching the entity again, send include: "files" with it.
If title or content changed, the entity’s semantic search embeddings are automatically re-queued for projects with AI search enabled.

Error Responses

include names a value this endpoint doesn’t add. The only value is files.
include was sent in the query string. On this endpoint it goes in the request body, with the other fields.
The entity doesn’t exist, or it’s in a space the caller can’t read (the author included).
The caller isn’t the author, and can read the entity.
The author can read the entity’s space but may not post in it anymore: banned in it or a space above it, or its postingPermission doesn’t include them. One answer for every cause. The entity is unchanged.
Returned when your entity.updated validation webhook rejects the request. error carries the message your webhook returned. The entity is unchanged.
A service key sent no actingUserId for an entity that has an author. Name the author: the request then runs exactly as their own.
A user token, or a request with no credentials, sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when files are uploaded or removeFileIds is sent on a project without the files-images bundle. missingTables lists the tables that aren’t installed and bundleId the bundle to install. While the bundle is still being installed, the response is 503 database/tables-provisioning instead. See Bundles.
removeFileIds names a file that isn’t one of this entity’s files. invalidIds lists those ids. Checked before anything is uploaded, so nothing is stored or removed.
A removeFileIds that isn’t an array of file ids gets 400 entity/invalid-body instead.
A file is over 50 MB. param names its field (images or files).
A file in images can’t be read as an image. error names the file as it was uploaded. An image over 10000 px on a side gets the same code. error gives its size:
images was sent without images.options. Checked before the validation webhook and before anything is uploaded, so nothing is stored.
images.options without mode, or with a mode that isn’t one of the five (other options fields the same way, named in error and param):
In an aspect-ratio mode, a variant’s computed side would be outside 1–10000 px. Checked once the image is read, before anything is stored. param names the option:
In aspect-ratio-height-based it names a heights option and gives a width. In multi-aspect-ratio it names a sizes option, and the ratio is the one in aspectRatios closest to the image, so the text reads ”… at the 3:1 aspect ratio, the one in aspectRatios closest to this image. Each side of a variant must be 1–10000 px.” More than 30 entries in dimensions, widths, heights or sizes (one variant each). param names the option:
A variant name that uses a character other than letters, digits, _, - and ., that is longer than 64 characters, that contains .., or that is original. param names the option:
A key the options don’t take (also a key of another mode). error names the object holding it, param the key itself:
files.options takes only pathParts; any other key gets the same code:
The uploaded files would take the project past its plan’s file-storage limit. The entity is unchanged and nothing is stored.
A file was refused as the body was read: entity/unsupported-file-type or entity/unexpected-file-field (a file in another field, the old images.files and files.files included), with param naming the field when there is one, or 413 entity/too-many-files for more than 20 files in the request. A body over 250 MB gets 413 request/body-too-large; one that can’t be read at all gets request/invalid-multipart or request/field-too-large. See Upload errors.
Returned when a service key names an actingUserId that isn’t a user in this project.