Requires the
entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.Overview
useCreateEntity returns a function that creates a new entity. It supports both JSON and multipart form requests — the hook automatically selects multipart when images or files are included. A signed-in user’s entity is always theirs. Without a signed-in user, the entity has no author, and the request is allowed only while the project’s Who can create entities without an author setting is Everyone (the default); otherwise it fails with 403 entity/authorless-creation-not-allowed. See Create Entity.
Usage Example
With image upload
Parameters
An identifier for grouping entities by source (e.g., a section of your app). For no source, leave it out or pass
null. "none", "null" and "undefined" are reserved and refused with 400 entity/invalid-body.Array of attachment objects. Flexible structure — can represent media URLs, file metadata, or any structured data.
Marks the entity’s own NSFW flag. Defaults to
false. This is only the entity’s own flag — its effective NSFW status also inherits from its space. Sublay labels and filters NSFW content but does not blur or age-gate it. See Entity NSFW flagging.Images to upload and attach, processed into sizes per
options (mode is required). Each file is a File or Blob, or a React Native file { uri, name, type? }. Sends a multipart request. Requires the files-images bundle.Files to upload and attach, stored as uploaded. Each file’s
type comes from its MIME type; an image sent here isn’t processed, so it has no image data. Sends a multipart request. A pathParts folder that is, or contains, . or .. (also written %2e%2e), or that contains ?, # or an encoded slash (%2f, %5c), is refused with a 400.Returns
The newly created entity. See Entity data model.

