Update a field on a database
Changes a field's label, requiredness, default, options, order or settings, and runs a planned type conversion when `kind` changes - a conversion whose plan drops values is refused unless the caller sets `acceptDropped`. Requires the `databases:write` permission and responds with not-found for an unknown field. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringdatabaseId*stringfieldId*stringapplication/json- body
label?string|nullkind?|nullrequired?boolean|nulldefaultValue?string|number|boolean|array<string>|null|nulloptions?array<>|nullsettings?|nullorder?number|nullacceptDropped?boolean|nullclientMutationId?string|nullSuccess
application/json- response
data*curl -X PATCH 'https://api.snoze.dev/v1/workspaces/string/databases/string/fields/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "id": "string", "workspaceId": "string", "databaseId": "string", "key": "string", "label": "string", "kind": "text", "required": true, "defaultValue": "string", "options": [ { "id": "string", "key": "string", "name": "string", "color": "string", "order": 0 } ], "settings": {}, "order": 0, "createdAt": "string", "updatedAt": "string" }}Add a field to a database
Creates a field of the given kind; a relation field also mints the relation itself and, unless `reciprocal` is `false`, the matching field on the other database. Requires the `databases:write` permission and rejects a duplicate key or settings that reference a field that does not exist. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.
Delete a field from a database
Removes the field, clears its values and drops the column from every view that showed it. Requires the `databases:write` permission. A field that is one end of a relation is refused - delete the relation instead - as is a field still referenced by a formula, rollup or other dependent.