SnozeDevelopers
API referenceDatabases

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.

POST
/v1/workspaces/{workspaceId}/databases/{databaseId}/fields

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

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

Path Parameters

workspaceId*string
databaseId*string

Request Body

application/json
  1. body
id?|null
key?string|null
label*string
kind*string
Value in"text""long_text""number""rating""date""select""multi_select""status""checkbox""url""email""phone""user""file""place""json""created_at""created_by""updated_at""updated_by""unique_id""formula""relation""rollup""time_tracking""button"
required?boolean|null
defaultValue?string|number|boolean|array<string>|null
options?array<>|null
settings?|null
order?number|null
columnPlacement?|null
reciprocal?||null
clientMutationId?string|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/databases/string/fields' \  -H 'Content-Type: application/json' \  -d '{  "label": "string",  "kind": "text"}'
Example Response
{  "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"  }}