Skip to main content
Publish Entity
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Publishes a draft entity. After publishing, the entity appears in normal feeds and is visible to all users. The entity’s isDraft field is set to false and createdAt is reset to the current time. Authentication required. Only the draft’s author may publish it: with their own access token, or with a service key naming them in actingUserId — the request then runs exactly as theirs. A draft always has an author here: one without an author, which this API never creates, is answered as not found (404 entity/not-found) for every caller.

Path Parameters

string
required
The UUID of the draft entity to publish.

Body Parameters

string
Service key only, and required with one: the user this publish acts as. Name the draft’s author, and the request runs exactly as their own access token’s (naming anyone else gets what their token gets, 403). 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).

Response

Returns the published Entity object with isDraft: false.
Publishing resets createdAt to the current time, so the entity appears as “new” in chronological feeds regardless of when the draft was created.
Mention notifications are sent when publishing, not when the draft is created. Users mentioned in the entity receive notifications at publish time.

Error Responses

Returned when no draft with this ID exists, the entity is not a draft, or the draft has no author.
Returned when your entity.created validation webhook rejects the publish. error carries the message your webhook returned. The entity stays a draft.
A service key sent no actingUserId. Name the draft’s 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 a service key names an actingUserId that isn’t a user in this project.