PROJECT_ID. cURL uses Bash and jq; Python uses requests; JavaScript uses Node.js 22 or later with .mjs files. First discover the project’s data model and select a category ID. Set BRANCH_ID to a branch where you intend to make changes; the alias master writes directly to Base.
Create entities
Each entry requiresentityType and name. The server generates an entity ID when id is omitted. branchId applies to the entire batch.
id for later updates. Newly created entities are assigned to the authenticated user as owner.
Set values
Each update identifies an entity, a field key, and a value. The example updates the built-inname field on the entities just created.
fields[].key and a value matching the field type returned by the data model. Tag options expose names; stage options also expose stable IDs.
Handle a failed batch
The create batch and the value batch above are separate transactions. If the second transaction fails, the entities created by the first request still exist. Correct the failed value request and retry that step after confirming current state. Bothentities and updates must contain at least one entry. Send only writes for one project and one branch in each request.
A transaction failure rolls back that transaction’s writes. A network timeout or an error while returning the response does not prove rollback: the write could already have committed. Read the affected entities on the same branch before retrying. Do not automatically repeat a create request with server-generated IDs.
Restore deleted entities
UseGET /project/{projectId}/branch/{id}/deleted-entities to list a branch’s deleted items, newest first. Continue with the last row’s cursor as the before query parameter until next_cursor is null. Restore one item with POST /project/{projectId}/entities/{entityId}/restore, passing branch_id when needed, or restore several in one transaction with POST /project/{projectId}/entities/restore/batch and JSON entityIds and an optional branchId.
Restored items return with the fields, links, and position they had when deleted. Restoring a child does not restore its parent; restore the parent too if the child should appear in hierarchy views. These restore endpoints return 204 on success. Read the branch again before retrying after a timeout.