Update a database template
Changes the label, description, icon, or manifest of a saved database template and records the change on the workspace event ledger. Requires `databases:write` in the workspace. An unknown template returns not-found, and the same label, description, and manifest limits as creation apply; a label already taken by another template is rejected.
Authorization
apiKey Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/workspaces/string/database-templates/string" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "string", "workspaceId": "string", "label": "string", "description": "string", "icon": "string", "manifest": { "version": 1, "sourceDatabaseId": "string", "settings": {}, "recordLayout": { "version": 2, "pageWidth": "default", "propertyColumns": 1, "propertyDensity": "comfortable", "propertyOrder": [ "string" ], "hiddenFieldKeys": [ "string" ], "sections": [ { "id": "string", "label": "string", "fieldKeys": [ "string" ] } ], "contentPosition": "before_properties", "showComments": true, "showActivity": true, "pinnedFieldKeys": [ "string" ], "autoAddNewFields": true, "collapsedSectionIds": [ "string" ], "relationViews": { "property1": { "defaultViewId": "string", "position": "properties", "collapsed": true }, "property2": { "defaultViewId": "string", "position": "properties", "collapsed": true } }, "showReferences": true }, "sourceFieldIds": { "property1": "string", "property2": "string" }, "fields": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "label": "string", "kind": "text", "required": true, "defaultValue": "string", "options": [ { "key": "string", "name": "string", "color": "string", "order": 0 } ], "settings": {}, "order": 0, "columnPlacement": { "viewId": "string", "position": "start", "anchorKey": "string", "side": "left" }, "reciprocal": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "label": "string", "cardinality": "one" }, "clientMutationId": "string" } ], "views": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "key": "string", "label": "string", "kind": "table", "placement": "database", "manifest": {}, "scope": "shared", "locked": true, "relationFieldId": "string", "itemId": "f11b669d-7201-4c21-88af-d85092f0c005", "parentItemId": "item://51c2382c-e930-406e-bbc8-39993f3ca70c", "clientMutationId": "string" } ] }, "createdAt": "string", "updatedAt": "string" }}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}{ "_tag": "ApiNotFound", "error": "not_found", "message": "That item does not exist, or this key cannot see it.", "status": 404}Save a database template
Stores a reusable database blueprint, either from an explicit `manifest` or captured from an existing database via `sourceDatabaseId`. Requires `databases:write` in the workspace and a plan that includes custom templates. Rejected when neither a manifest nor a source database is given, when the label or description exceeds its length limit, when the manifest exceeds 200 fields, 100 views, or 2 MB, or when field/view keys are not unique; a label already in use fails unless `onLabelConflict` is `increment`, which appends a counter instead.
Delete a database template
Removes a saved database template and records the deletion on the workspace event ledger; databases already created from it are untouched. Requires `databases:write` in the workspace, and an unknown template returns not-found.