SnozeDevelopers
API referenceDatabase templates

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.

PATCH
/v1/workspaces/{workspaceId}/database-templates/{templateId}
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string
templateId*string

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"  }}