> For the complete documentation index, see [llms.txt](https://docs.ninox.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninox.com/ninox-api/api-reference/api-endpoints/models.md).

# Models

## The CreateFieldBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CreateFieldBody":{"type":"object","properties":{"canRead":{"description":"Script expression that must allow reading this field's value","type":"string","minLength":1},"canWrite":{"description":"Script expression that must allow writing this field's value","type":"string","minLength":1},"expression":{"description":"Expression (for function type)","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100},"description":"Field labels (localized)"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Field name"},"optionColor":{"description":"Color expression (for dchoice/dmulti types)","type":"string"},"optionIcon":{"description":"Icon expression (for dchoice/dmulti types)","type":"string"},"optionName":{"description":"Display name expression (for dchoice/dmulti types)","type":"string"},"options":{"description":"Options array (for choice/multi types) or selection expression (for dchoice/dmulti types)","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"description":"Stable option id (omit for new options; system assigns id)","type":"string"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":1,"description":"Option name"},"order":{"description":"Option display order","type":"integer","minimum":0,"maximum":9007199254740991},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["name"],"additionalProperties":false}},{"type":"string"}]},"refTableName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","default":null,"description":"Reference table name (for reference/reverse types)","nullable":true},"showInTable":{"description":"Show this field as a column in the table's default view (default: true)","type":"boolean"},"type":{"type":"string","enum":["string","html","number","boolean","choice","dchoice","multi","dmulti","file","date","timestamp","time","timeinterval","appointment","icon","color","user","reference","reverse","function"],"description":"Field type"},"variant":{"description":"Field variant (for string type)","type":"string","enum":["multiline-text","text","phone","email","url","location","signature"]},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},"index":{"description":"Field is indexed","type":"boolean"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"readRoles":{"description":"Roles allowed to read the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"unique":{"description":"Field is unique","type":"boolean"},"writeRoles":{"description":"Roles allowed to write to the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}}},"required":["labels","name","type"],"additionalProperties":false}}}}
```

## The FieldResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"FieldResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"description":"Field details"}},"required":["data"]}}}}
```

## The ErrorResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}}}},"required":["error"]}}}}
```

## The CreateFieldsBatchBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CreateFieldsBatchBody":{"minItems":1,"type":"array","items":{"type":"object","properties":{"canRead":{"description":"Script expression that must allow reading this field's value","type":"string","minLength":1},"canWrite":{"description":"Script expression that must allow writing this field's value","type":"string","minLength":1},"expression":{"description":"Expression (for function type)","type":"string"},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100},"description":"Field labels (localized)"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Field name"},"optionColor":{"description":"Color expression (for dchoice/dmulti types)","type":"string"},"optionIcon":{"description":"Icon expression (for dchoice/dmulti types)","type":"string"},"optionName":{"description":"Display name expression (for dchoice/dmulti types)","type":"string"},"options":{"description":"Options array (for choice/multi types) or selection expression (for dchoice/dmulti types)","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"description":"Stable option id (omit for new options; system assigns id)","type":"string"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":1,"description":"Option name"},"order":{"description":"Option display order","type":"integer","minimum":0,"maximum":9007199254740991},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["name"],"additionalProperties":false}},{"type":"string"}]},"refTableName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","default":null,"description":"Reference table name (for reference/reverse types)","nullable":true},"showInTable":{"description":"Show this field as a column in the table's default view (default: true)","type":"boolean"},"type":{"type":"string","enum":["string","html","number","boolean","choice","dchoice","multi","dmulti","file","date","timestamp","time","timeinterval","appointment","icon","color","user","reference","reverse","function"],"description":"Field type"},"variant":{"description":"Field variant (for string type)","type":"string","enum":["multiline-text","text","phone","email","url","location","signature"]},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},"index":{"description":"Field is indexed","type":"boolean"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"readRoles":{"description":"Roles allowed to read the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"unique":{"description":"Field is unique","type":"boolean"},"writeRoles":{"description":"Roles allowed to write to the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}}},"required":["labels","name","type"],"additionalProperties":false}}}}}
```

## The FieldsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"FieldsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]},"description":"List of fields"}},"required":["data"]}}}}
```

## The DeleteFieldsBatchBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"DeleteFieldsBatchBody":{"type":"object","properties":{"fieldNames":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Field name"}}},"required":["fieldNames"],"additionalProperties":false}}}}
```

## The FieldsListResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"FieldsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]},"description":"List of fields"},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","page_info"]}}}}
```

## The UpdateFieldsBatchBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateFieldsBatchBody":{"minItems":1,"type":"array","items":{"type":"object","properties":{"canRead":{"type":"string","minLength":1,"description":"Script expression that must allow reading this field's value; null removes the guard","nullable":true},"canWrite":{"type":"string","minLength":1,"description":"Script expression that must allow writing this field's value; null removes the guard","nullable":true},"expression":{"description":"Expression (for function type)","type":"string"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"name":{"description":"Field name","type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$"},"optionColor":{"description":"Color expression (for dchoice/dmulti types)","type":"string"},"optionIcon":{"description":"Icon expression (for dchoice/dmulti types)","type":"string"},"optionName":{"description":"Display name expression (for dchoice/dmulti types)","type":"string"},"options":{"description":"Options array (for choice/multi types) or selection expression (for dchoice/dmulti types)","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"description":"Stable option id (omit for new options; system assigns id)","type":"string"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":1,"description":"Option name"},"order":{"description":"Option display order","type":"integer","minimum":0,"maximum":9007199254740991},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["name"],"additionalProperties":false}},{"type":"string"}]},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},"index":{"description":"Field is indexed","type":"boolean"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"readRoles":{"description":"Roles allowed to read the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"unique":{"description":"Field is unique","type":"boolean"},"writeRoles":{"description":"Roles allowed to write to the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}},"fieldName":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Name of the field to update"}},"required":["fieldName"],"additionalProperties":false}}}}}
```

## The UpdateFieldBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateFieldBody":{"type":"object","properties":{"canRead":{"type":"string","minLength":1,"description":"Script expression that must allow reading this field's value; null removes the guard","nullable":true},"canWrite":{"type":"string","minLength":1,"description":"Script expression that must allow writing this field's value; null removes the guard","nullable":true},"expression":{"description":"Expression (for function type)","type":"string"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"name":{"description":"Field name","type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$"},"optionColor":{"description":"Color expression (for dchoice/dmulti types)","type":"string"},"optionIcon":{"description":"Icon expression (for dchoice/dmulti types)","type":"string"},"optionName":{"description":"Display name expression (for dchoice/dmulti types)","type":"string"},"options":{"description":"Options array (for choice/multi types) or selection expression (for dchoice/dmulti types)","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"description":"Stable option id (omit for new options; system assigns id)","type":"string"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","minLength":1,"description":"Option name"},"order":{"description":"Option display order","type":"integer","minimum":0,"maximum":9007199254740991},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["name"],"additionalProperties":false}},{"type":"string"}]},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"type":"array","items":{"type":"string"}},{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},"index":{"description":"Field is indexed","type":"boolean"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"readRoles":{"description":"Roles allowed to read the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"unique":{"description":"Field is unique","type":"boolean"},"writeRoles":{"description":"Roles allowed to write to the field (\"user\" is a deprecated alias for \"editor\")","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["admin","editor","user"]}}},"additionalProperties":false}}}}
```

## The CompleteFileUploadBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CompleteFileUploadBody":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"description":"MIME type of the uploaded file"},"documentId":{"description":"`documentId` returned by the generate-upload-url step","type":"string","minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$"},"documentVersionId":{"description":"`documentVersionId` returned by the generate-upload-url step","type":"string","minLength":12,"maxLength":12,"pattern":"^[a-z0-9]+$"},"etags":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"ETag returned by S3 for each uploaded part, in order"},"fileName":{"type":"string","minLength":1,"description":"Original file name"},"fileSize":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"File size in bytes"},"uploadId":{"type":"string","minLength":1,"description":"`uploadId` returned by the generate-upload-url step"}},"required":["contentType","documentId","documentVersionId","etags","fileName","fileSize","uploadId"],"additionalProperties":false}}}}
```

## The CompleteFileUploadResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CompleteFileUploadResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"documentId":{"type":"string","description":"Document id — store this as part of the field value"},"documentVersionId":{"type":"string","description":"Document version id — store this as part of the field value"},"fileName":{"type":"string","description":"Original file name"},"fileSize":{"type":"number","description":"File size in bytes"},"fileType":{"type":"string","description":"MIME type"}},"description":"The complete file-type field value — pass this object as-is when creating/updating a record"}},"required":["data"]}}}}
```

## The GenerateFileUploadUrlBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"GenerateFileUploadUrlBody":{"type":"object","properties":{"contentType":{"type":"string","minLength":1,"description":"MIME type of the file being uploaded"},"parts":{"type":"integer","minimum":1,"maximum":10000,"description":"Number of multipart upload parts (1 for a single-part upload, max 10,000 per S3 limits)"}},"required":["contentType","parts"],"additionalProperties":false}}}}
```

## The GenerateFileUploadUrlResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"GenerateFileUploadUrlResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"documentId":{"type":"string","description":"Document id — pass back at the complete step"},"documentVersionId":{"type":"string","description":"Document version id — pass back at the complete step"},"preSignedUrls":{"type":"array","items":{"type":"string"},"description":"One presigned PUT URL per upload part, in order"},"uploadId":{"type":"string","description":"Multipart upload id — pass back at the complete step"}}}},"required":["data"]}}}}
```

## The CreateModuleBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CreateModuleBody":{"type":"object","properties":{"afterOpen":{"description":"Script expression run in the browser each time the app is opened. Read-only through the public API for now: a request that sets it is refused with 403 (UnconfinableScriptError), because the browser does not confine an API-written script to its module the way table triggers are confined. Set it in the app settings","type":"string"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Module name"},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"openRoles":{"description":"Module open roles","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}}},"required":["name"],"description":"Create Module request body"}}}}
```

## The ModuleResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ModuleResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"afterOpen":{"description":"Script expression run in the browser each time the app is opened","type":"string"},"components":{"description":"Module components (pages, containers, widgets). Read-only.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Component id"},"kind":{"type":"string","description":"Component type (e.g. Container, Button, Text, Page)"},"name":{"description":"Component name","type":"string"},"order":{"description":"Component display order","type":"number"},"parentId":{"description":"Parent component id (forms the component tree)","type":"string"},"visible":{"description":"Conditional visibility logic: a boolean, or a script expression (as { $nx: <script> }) evaluated at render time. Read-only.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]}]}},"required":["id","kind"]}},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"openRoles":{"description":"Module open roles","type":"array","items":{"type":"string"}},"tables":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]}}},"description":"Module details"}},"required":["data"]}}}}
```

## The DeleteModuleResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"DeleteModuleResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Deleted module id"}}}},"required":["data"]}}}}
```

## The ModulesResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ModulesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"afterOpen":{"description":"Script expression run in the browser each time the app is opened","type":"string"},"components":{"description":"Module components (pages, containers, widgets). Read-only.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Component id"},"kind":{"type":"string","description":"Component type (e.g. Container, Button, Text, Page)"},"name":{"description":"Component name","type":"string"},"order":{"description":"Component display order","type":"number"},"parentId":{"description":"Parent component id (forms the component tree)","type":"string"},"visible":{"description":"Conditional visibility logic: a boolean, or a script expression (as { $nx: <script> }) evaluated at render time. Read-only.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]}]}},"required":["id","kind"]}},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"openRoles":{"description":"Module open roles","type":"array","items":{"type":"string"}},"tables":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]}}},"required":["name"]},"description":"List of modules"},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","page_info"]}}}}
```

## The UpdateModuleBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateModuleBody":{"type":"object","properties":{"afterOpen":{"type":"string","description":"Script expression run in the browser each time the app is opened. Read-only through the public API for now: a request that sets it is refused with 403 (UnconfinableScriptError), because the browser does not confine an API-written script to its module the way table triggers are confined. Set it in the app settings; null removes the script and is accepted","nullable":true},"name":{"description":"Module name","type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$"},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"openRoles":{"description":"Module open roles","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}}},"description":"Update Module request body"}}}}
```

## The UpdateModuleLabelsBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateModuleLabelsBody":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"tables":{"type":"object","additionalProperties":{"type":"object","properties":{"fields":{"type":"object","additionalProperties":{"type":"object","properties":{"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}},"options":{"description":"Choice/multi option labels — every id must already exist on the field","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Existing option id — must already exist on the field"},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}}},"required":["id","labels"],"additionalProperties":false}}},"additionalProperties":false}},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100}}},"additionalProperties":false}}},"additionalProperties":false}}}}
```

## The ModuleLabelsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ModuleLabelsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]},"description":"Fields whose labels were updated"},"module":{"type":"object","properties":{"afterOpen":{"description":"Script expression run in the browser each time the app is opened","type":"string"},"components":{"description":"Module components (pages, containers, widgets). Read-only.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Component id"},"kind":{"type":"string","description":"Component type (e.g. Container, Button, Text, Page)"},"name":{"description":"Component name","type":"string"},"order":{"description":"Component display order","type":"number"},"parentId":{"description":"Parent component id (forms the component tree)","type":"string"},"visible":{"description":"Conditional visibility logic: a boolean, or a script expression (as { $nx: <script> }) evaluated at render time. Read-only.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]}]}},"required":["id","kind"]}},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"openRoles":{"description":"Module open roles","type":"array","items":{"type":"string"}},"tables":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]}}},"required":["name"],"description":"The module, with its updated labels if any"},"tables":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]},"description":"Tables whose labels were updated"}}}},"required":["data"]}}}}
```

## The ReportResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ReportResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"type":"number","description":"Footer height"},"headHeight":{"type":"number","description":"Header height"},"id":{"type":"string","description":"Report id"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string"}},"marginB":{"type":"number","description":"Bottom page margin"},"marginL":{"type":"number","description":"Left page margin"},"marginR":{"type":"number","description":"Right page margin"},"marginT":{"type":"number","description":"Top page margin"},"moduleId":{"type":"string","description":"Module id"},"name":{"type":"string","description":"Report name"},"objects":{"type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Bound expression, for rev objects","type":"string"},"fid":{"description":"Field id, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","additionalProperties":{}},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]},"description":"Report layout objects"},"paperHeight":{"type":"number","description":"Paper height"},"paperWidth":{"type":"number","description":"Paper width"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"},"tableId":{"type":"string","description":"Table id"}},"description":"Report details"}},"required":["data"]}}}}
```

## The ReportsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ReportsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"fontFamily":{"description":"Default font family","type":"string"},"fontSize":{"description":"Default font size","type":"number"},"footHeight":{"type":"number","description":"Footer height"},"headHeight":{"type":"number","description":"Header height"},"id":{"type":"string","description":"Report id"},"inlineStyle":{"description":"Inline CSS applied to the report","type":"string"},"labels":{"description":"Report labels (localized)","type":"object","additionalProperties":{"type":"string"}},"marginB":{"type":"number","description":"Bottom page margin"},"marginL":{"type":"number","description":"Left page margin"},"marginR":{"type":"number","description":"Right page margin"},"marginT":{"type":"number","description":"Top page margin"},"moduleId":{"type":"string","description":"Module id"},"name":{"type":"string","description":"Report name"},"objects":{"type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"base":{"type":"string","enum":["html","image","imagefield","rev","text"],"description":"Report object kind"},"borderColor":{"description":"Border color (hex string)","type":"string"},"borderRadius":{"description":"Border radius","type":"number"},"borderStyle":{"description":"Border style","type":"string"},"borderWidth":{"description":"Border width","type":"number"},"expression":{"description":"Bound expression, for rev objects","type":"string"},"fid":{"description":"Field id, for imagefield objects","type":"string"},"file":{"description":"File id, for image objects","type":"string"},"fn":{"description":"Bound expression producing HTML, for html objects","type":"string"},"fontFamily":{"description":"Font family","type":"string"},"fontSize":{"description":"Font size","type":"number"},"fontStyle":{"description":"Font style","type":"string","enum":["italic"]},"fontWeight":{"description":"Font weight","type":"string","enum":["bold"]},"h":{"type":"number","description":"Height"},"isAutoHeight":{"description":"Auto-size height to content, for html objects","type":"boolean"},"lineHeight":{"description":"Line height, for text objects","type":"number"},"paddingB":{"description":"Bottom padding, for html/rev/text objects","type":"number"},"paddingL":{"description":"Left padding, for html/rev/text objects","type":"number"},"paddingR":{"description":"Right padding, for html/rev/text objects","type":"number"},"paddingT":{"description":"Top padding, for html/rev/text objects","type":"number"},"position":{"type":"string","enum":["foot","head","page"],"description":"Report section this object belongs to"},"showFoot":{"description":"Show table footer, for rev objects","type":"boolean"},"showHead":{"description":"Show table header, for rev objects","type":"boolean"},"tableBorderStyle":{"description":"Table border style, for rev objects","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]},{"type":"number","enum":[2]},{"type":"number","enum":[3]},{"type":"number","enum":[4]},{"type":"number","enum":[5]},{"type":"number","enum":[6]}]},"text":{"description":"Literal text, for text objects","type":"string"},"textAlign":{"description":"Text alignment","type":"string","enum":["center","left","right"]},"textColor":{"description":"Text color (hex string)","type":"string"},"textDecoration":{"description":"Text decoration","type":"string","enum":["underline"]},"verticalAlign":{"description":"Vertical alignment, for html/text objects","type":"string"},"viewConfig":{"description":"Columns/filter/sort for the underlying table, for rev objects","type":"object","additionalProperties":{}},"w":{"type":"number","description":"Width"},"x":{"type":"number","description":"X position"},"y":{"type":"number","description":"Y position"}},"required":["base","h","position","w","x","y"]},"description":"Report layout objects"},"paperHeight":{"type":"number","description":"Paper height"},"paperWidth":{"type":"number","description":"Paper width"},"printAttachments":{"description":"Include row attachments when printing","type":"boolean"},"tableId":{"type":"string","description":"Table id"}},"required":["footHeight","headHeight","id","marginB","marginL","marginR","marginT","moduleId","name","objects","paperHeight","paperWidth","tableId"]},"description":"List of reports"}},"required":["data"]}}}}
```

## The PrintReportBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"PrintReportBody":{"type":"object","properties":{"rowId":{"description":"Record to render the report for","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rowIds":{"description":"Additional records to render into the same document (a merged print run). rowId is always included alongside these, so rowId plus rowIds together may not exceed 250 records.","maxItems":249,"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["rowId"]}}}}
```

## The PrintReportResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"PrintReportResponseDto":{"type":"object","properties":{"data":{"type":"object","properties":{"fileName":{"type":"string","description":"Rendered file name"},"mimeType":{"type":"string","description":"Rendered file MIME type"},"url":{"type":"string","description":"Presigned URL to download the rendered document"}}}},"required":["data"]}}}}
```

## The AddRowsBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"AddRowsBody":{"type":"object","properties":{"records":{"minItems":1,"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Array of records to add to the target table"}},"required":["records"],"additionalProperties":false}}}}
```

## The CreateRowsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CreateRowsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"Created row ids"}}}},"required":["data"]}}}}
```

## The DeleteRowsBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"DeleteRowsBody":{"type":"object","properties":{"records":{"minItems":1,"type":"array","items":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0},"description":"Array of record ids to delete"}},"required":["records"],"additionalProperties":false}}}}
```

## The DeleteRowsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"DeleteRowsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"deletedIds":{"type":"array","items":{"type":"string"},"description":"Deleted row ids"}}}},"required":["data"]}}}}
```

## The RowResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"RowResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true}}},"description":"The requested row"}},"required":["data"]}}}}
```

## The RowChangesResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"RowChangesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"changedAt":{"type":"string","description":"When the change happened (ISO 8601)"},"changeType":{"type":"string","enum":["create","delete","update"],"description":"Kind of change"},"id":{"type":"string","description":"Row id"}},"required":["changedAt","changeType","id"]},"description":"List of row changes"},"meta":{"type":"object","properties":{"asOf":{"type":"string","description":"Server timestamp to pass as `since` on the next poll"}}},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","meta","page_info"]}}}}
```

## The RowsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"RowsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"values":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true}}},"required":["id","values"]},"description":"List of rows"},"meta":{"type":"object","properties":{"filter":{"type":"object","additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},"description":"Applied filter conditions"},"sort":{"type":"string","description":"Applied sort field"}}},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","page_info"]}}}}
```

## The ImportCSVResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ImportCSVResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"rowsImported":{"type":"number","description":"Number of rows successfully imported"},"rowsSkipped":{"type":"number","description":"Number of rows skipped (for update mode when no match is found)"},"rowsUpdated":{"type":"number","description":"Number of existing rows updated"}}}},"required":["data"]}}}}
```

## The UpdateRowsBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateRowsBody":{"type":"object","properties":{"records":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0}},"additionalProperties":{}},"description":"Array of records to update (each must include an id field as a positive integer)"}},"required":["records"],"additionalProperties":false}}}}
```

## The UpdateRowsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateRowsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"updatedIds":{"type":"array","items":{"type":"string"},"description":"Updated row ids"}}}},"required":["data"]}}}}
```

## The UpsertRowsBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpsertRowsBody":{"type":"object","properties":{"matchField":{"type":"string","minLength":1,"description":"Name of the unique field used to match existing records"},"records":{"minItems":1,"type":"array","items":{"type":"object","additionalProperties":{}},"description":"Array of records to upsert — each must include a value for matchField"}},"required":["matchField","records"],"additionalProperties":false}}}}
```

## The UpsertRowsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpsertRowsResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"createdIds":{"type":"array","items":{"type":"string"},"description":"Row ids created by this upsert"},"updatedIds":{"type":"array","items":{"type":"string"},"description":"Row ids matched and updated by this upsert"}}}},"required":["data"]}}}}
```

## The ExecScriptBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ExecScriptBody":{"type":"object","properties":{"moduleId":{"type":"string","minLength":1,"maxLength":6,"pattern":"^[A-Z]+$"},"rowId":{"description":"Record the script evaluates against","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"script":{"type":"string","description":"Script to execute (system format)"},"tableId":{"type":"string","minLength":1,"maxLength":6,"pattern":"^[A-Z]+$"}},"required":["moduleId","script"]}}}}
```

## The ExecResponseDto object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ExecResponseDto":{"type":"object","properties":{"data":{"description":"The script expression's result"}},"required":["data"]}}}}
```

## The CreateTableBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"CreateTableBody":{"type":"object","properties":{"icon":{"description":"Table icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100},"description":"Table labels (localized)"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Table name"},"canCreate":{"description":"Script expression that must allow creating a record","type":"string","minLength":1},"canDelete":{"description":"Script expression that must allow deleting a record","type":"string","minLength":1},"canRead":{"description":"Script expression that must allow reading a record","type":"string","minLength":1},"canWrite":{"description":"Script expression that must allow updating a record","type":"string","minLength":1},"createRoles":{"description":"Roles allowed to create records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"deleteRoles":{"description":"Roles allowed to delete records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"writeRoles":{"description":"Roles allowed to update records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}}},"required":["labels","name"]}}}}
```

## The TableResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"TableResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"description":"Table details"}},"required":["data"]}}}}
```

## The DeleteTableResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"DeleteTableResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","description":"Deleted table id"}}}},"required":["data"]}}}}
```

## The TablesResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"TablesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]},"description":"List of tables"},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","page_info"]}}}}
```

## The UpdateTableBody object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"UpdateTableBody":{"type":"object","properties":{"icon":{"description":"Table icon","type":"object","properties":{"color":{"type":"string"},"filling":{"anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","minLength":1}}},"labels":{"type":"object","additionalProperties":{"type":"string","minLength":1,"maxLength":100},"description":"Table labels (localized)"},"name":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[a-z0-9_]+$","description":"Table name"},"canCreate":{"type":"string","minLength":1,"description":"Script expression that must allow creating a record; null removes the guard","nullable":true},"canDelete":{"type":"string","minLength":1,"description":"Script expression that must allow deleting a record; null removes the guard","nullable":true},"canRead":{"type":"string","minLength":1,"description":"Script expression that must allow reading a record; null removes the guard","nullable":true},"canWrite":{"type":"string","minLength":1,"description":"Script expression that must allow updating a record; null removes the guard","nullable":true},"createRoles":{"description":"Roles allowed to create records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"deleteRoles":{"description":"Roles allowed to delete records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}},"writeRoles":{"description":"Roles allowed to update records","minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["admin","editor"]}}}}}}}
```

## The ViewResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ViewResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","additionalProperties":{}},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field id, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldId":{"type":"string","description":"Target field id"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldId","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field id","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","additionalProperties":{}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldId":{"type":"string","description":"Field id"}},"required":["fieldId"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleId":{"type":"string","description":"Module id"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","additionalProperties":{}},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldId":{"type":"string","description":"Field id"}},"required":["direction","fieldId"]},"tableId":{"type":"string","description":"Table id"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"description":"View details"}},"required":["data"]}}}}
```

## The ViewsResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"ViewsResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"annualRecurring":{"description":"Calendar views only: render every record on the same day/month every year","type":"boolean"},"chartConfig":{"description":"Chart configuration (chart type, axes, datasets), for Chart views","type":"object","additionalProperties":{}},"columns":{"type":"array","items":{"type":"object","properties":{"agg":{"description":"Aggregation function applied to the column","type":"string"},"conditionalStyling":{"description":"Legacy per-column conditional styling rules","type":"array","items":{"type":"object","properties":{"background":{"description":"Background color (hex string)","type":"string"},"cell":{"description":"Target cell","type":"string"},"color":{"description":"Icon color (hex string)","type":"string"},"icon":{"description":"Icon name","type":"string"},"operand":{"type":"string","description":"Comparator"},"value":{"type":"string","description":"Value compared against"}},"required":["operand","value"]}},"field":{"type":"string","description":"Field id, or a script expression for a calculated column"},"hidden":{"description":"Column retained but hidden from the grid","type":"boolean"},"labels":{"description":"Column labels (localized)","type":"object","additionalProperties":{"type":"string"}},"order":{"type":"number","description":"Column display order"},"role":{"description":"Column role (e.g. title, date, image, location, color)","type":"string"},"width":{"description":"Column width","type":"number"}},"required":["field","order"]},"description":"View columns"},"conditionalFormatting":{"description":"Conditional formatting rules","type":"array","items":{"type":"object","properties":{"backgroundColor":{"description":"Background color (hex string)","type":"string"},"bold":{"description":"Bold text","type":"boolean"},"comparator":{"type":"string","enum":["contains","does_not_contain","ends_with","gt","gte","is","is_empty","is_not","is_not_empty","logic","lt","lte","starts_with"],"description":"Comparator"},"expression":{"description":"Script expression, used only when comparator is 'logic'","type":"string"},"fieldId":{"type":"string","description":"Target field id"},"highlightColor":{"description":"Highlight color (hex string)","type":"string"},"icon":{"description":"Icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"Stable rule id"},"italic":{"description":"Italic text","type":"boolean"},"order":{"type":"number","description":"Rule evaluation order"},"strikethrough":{"description":"Strikethrough text","type":"boolean"},"target":{"type":"string","enum":["cell","row"],"description":"Whether the rule styles a single cell or the whole row"},"textColor":{"description":"Text color (hex string)","type":"string"},"value":{"description":"Value compared against"}},"required":["comparator","fieldId","id","order","target"]}},"filter":{"description":"Stored filter conditions","type":"array","items":{"type":"object","properties":{"field":{"description":"Field id","type":"string"},"id":{"type":"string","description":"Stable condition id"},"operator":{"description":"Filter operator","type":"string"},"value":{"description":"Value compared against","type":"string"}},"required":["id"]}},"ganttConfig":{"description":"Which fields the bars/milestones/dependencies are read from, for Gantt views","type":"object","additionalProperties":{}},"groupBy":{"description":"Grouping configuration","type":"array","items":{"type":"object","properties":{"direction":{"description":"Group order direction, defaults to ascending","type":"string","enum":["asc","desc"]},"fieldId":{"type":"string","description":"Field id"}},"required":["fieldId"]}},"icon":{"description":"View icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"id":{"type":"string","description":"View id"},"labels":{"description":"View labels (localized)","type":"object","additionalProperties":{"type":"string"}},"moduleId":{"type":"string","description":"Module id"},"name":{"type":"string","description":"View name"},"order":{"type":"number","description":"View display order"},"pivot":{"description":"Pivot configuration (row/column/value axes), for Pivot views","type":"object","additionalProperties":{}},"search":{"description":"Stored search term","type":"string"},"sort":{"description":"Sort configuration","type":"object","properties":{"direction":{"type":"string","enum":["asc","desc"],"description":"Sort direction"},"fieldId":{"type":"string","description":"Field id"}},"required":["direction","fieldId"]},"tableId":{"type":"string","description":"Table id"},"type":{"type":"string","enum":["Calendar","Chart","Gallery","Gantt","Kanban","List","Maps","Pivot","Table"],"description":"View type"}},"required":["columns","id","moduleId","name","order","tableId","type"]},"description":"List of views"}},"required":["data"]}}}}
```

## The SchemaChangesResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"SchemaChangesResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["created","deleted","restored","updated"],"description":"What happened to the object"},"changedAt":{"type":"string","description":"When the change happened (ISO 8601)"},"id":{"type":"string","description":"Object id"},"kind":{"type":"string","enum":["Field","Module","Table"],"description":"Kind of schema object"}},"required":["action","changedAt","id","kind"]},"description":"One entry per recorded change, oldest first"},"meta":{"type":"object","properties":{"asOf":{"type":"string","description":"Server timestamp to pass as `since` on the next poll"},"retentionCutoff":{"type":"string","description":"Oldest change still readable under the workspace plan (ISO 8601), or null for unlimited retention. A `since` older than this has gaps — do a full schema fetch instead","nullable":true}}},"page_info":{"type":"object","properties":{"has_more":{"type":"boolean","description":"Whether more results are available"},"limit":{"type":"number","description":"Maximum results per page"},"offset":{"type":"number","description":"Current offset"}},"description":"Pagination information"}},"required":["data","meta","page_info"]}}}}
```

## The WorkspaceResponse object

```json
{"openapi":"3.0.0","info":{"title":"Ninox Public API","version":"1.0.0"},"components":{"schemas":{"WorkspaceResponse":{"type":"object","properties":{"data":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"object","properties":{"afterOpen":{"description":"Script expression run in the browser each time the app is opened","type":"string"},"components":{"description":"Module components (pages, containers, widgets). Read-only.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Component id"},"kind":{"type":"string","description":"Component type (e.g. Container, Button, Text, Page)"},"name":{"description":"Component name","type":"string"},"order":{"description":"Component display order","type":"number"},"parentId":{"description":"Parent component id (forms the component tree)","type":"string"},"visible":{"description":"Conditional visibility logic: a boolean, or a script expression (as { $nx: <script> }) evaluated at render time. Read-only.","anyOf":[{"type":"boolean"},{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]}]}},"required":["id","kind"]}},"hideNavigation":{"description":"Hide module from navigation","type":"boolean"},"icon":{"description":"Module icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isHidden":{"description":"Hide module","type":"boolean"},"labels":{"description":"Module labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"openRoles":{"description":"Module open roles","type":"array","items":{"type":"string"}},"tables":{"type":"array","items":{"type":"object","properties":{"canCreate":{"description":"Script expression gating record creation","type":"string"},"canDelete":{"description":"Script expression gating record deletion","type":"string"},"canRead":{"description":"Script expression gating record read access","type":"string"},"canWrite":{"description":"Script expression gating record write access","type":"string"},"createRoles":{"description":"Roles allowed to create records","type":"array","items":{"type":"string"}},"deleteRoles":{"description":"Roles allowed to delete records","type":"array","items":{"type":"string"}},"fields":{"type":"array","items":{"type":"object","properties":{"binding":{"description":"Read-only: internal binding reference, format not yet specified","type":"string"},"canRead":{"description":"Script expression gating field-level read access","type":"string"},"canWrite":{"description":"Script expression gating field-level write access","type":"string"},"defaultValue":{"description":"Default value applied when a record is created: a literal value (an array of option ids for multi/dmulti), or a script expression (as { $nx: <script> }) evaluated at creation time","anyOf":[{"type":"object","properties":{"$nx":{"type":"string","description":"Script expression"}},"required":["$nx"]},{"anyOf":[{"type":"boolean"},{"type":"number"},{"type":"string"}],"nullable":true},{"type":"array","items":{"type":"string"}}]},"expression":{"description":"Expression (for function type)","type":"string"},"expressionErrors":{"description":"Expression validation errors (for function type)","type":"array","items":{"type":"object","properties":{"column":{"type":"number","description":"Column number where the error occurred"},"line":{"type":"number","description":"Line number where the error occurred"},"message":{"type":"string","description":"Error message"}},"required":["column","line","message"]}},"index":{"description":"Field is indexed","type":"boolean"},"labels":{"description":"Field labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Field name"},"onUpdate":{"description":"Script expression run as a row trigger when the field value changes","type":"string"},"optionColor":{"description":"Color expression for dchoice/dmulti fields","type":"string"},"optionIcon":{"description":"Icon expression for dchoice/dmulti fields","type":"string"},"optionName":{"description":"Display name expression for dchoice/dmulti fields","type":"string"},"options":{"description":"Options array for choice/multi fields, or selection expression for dchoice/dmulti fields","anyOf":[{"type":"array","items":{"type":"object","properties":{"color":{"description":"Option color (hex string)","type":"string"},"icon":{"description":"Option icon name","type":"string"},"id":{"type":"string","description":"Stable option id"},"labels":{"description":"Localized option labels","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string","description":"Option name"},"order":{"type":"number","description":"Option display order"},"textColor":{"description":"Option text color (hex string)","type":"string"}},"required":["id","name","order"]}},{"type":"string"}]},"readRoles":{"description":"Roles allowed to read the field","type":"array","items":{"type":"string"}},"refTableId":{"description":"Reference table id","type":"string"},"required":{"description":"Field is required","type":"boolean"},"search":{"description":"Field is searchable","type":"boolean"},"syncedFrom":{"description":"Source column this field syncs from. Read-only unless the table has two-way sync with updates enabled, in which case every synced field except the key column is writable.","type":"string"},"type":{"type":"string","enum":["any","appointment","boolean","choice","color","date","dchoice","dmulti","file","function","html","icon","lambda","multi","number","react","reference","reverse","rowId","string","styled","time","timeinterval","timestamp","unknown","user","void"],"description":"Field type"},"unique":{"description":"Field is unique","type":"boolean"},"variant":{"description":"Field variant (for string type)","type":"string"},"writeRoles":{"description":"Roles allowed to write to the field","type":"array","items":{"type":"string"}}},"required":["name","type"]}},"hasFiles":{"description":"Enable files for the table","type":"boolean"},"hasGlobalSearch":{"description":"Enable global search for the table","type":"boolean"},"hasHistory":{"description":"Enable history for the table","type":"boolean"},"icon":{"description":"Table icon","type":"object","properties":{"color":{"description":"Icon color (hex string)","type":"string"},"filling":{"description":"Icon filling","anyOf":[{"type":"number","enum":[0]},{"type":"number","enum":[1]}]},"icon":{"type":"string","description":"Icon name"}},"required":["icon"]},"isEmailLinkingEnabled":{"description":"Enable email linking for the table","type":"boolean"},"isHidden":{"description":"Hide the table","type":"boolean"},"labels":{"description":"Table labels (localized)","type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"onCreate":{"description":"Script expression run as a trigger after a record is created","type":"string"},"onDelete":{"description":"Script expression run as a trigger when a record is deleted","type":"string"},"onUpdate":{"description":"Script expression run as a trigger after a record is updated","type":"string"},"readRoles":{"description":"Roles allowed to read records","type":"array","items":{"type":"string"}},"writeRoles":{"description":"Roles allowed to update records","type":"array","items":{"type":"string"}}},"required":["name"]}}},"required":["name"]}},"name":{"type":"string"}},"description":"Workspace details"}},"required":["data"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ninox.com/ninox-api/api-reference/api-endpoints/models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
