Directory Design

Creates a directory field.

Each field definition includes: Name (the identifier used in all queries), Type (data type), Label (optional friendly display name), Unique, and Description (optional, customer-defined).

Data types: TEXT255 (max 255 chars), TEXT64K (max 64K chars), NUMBER (decimal), INTEGER, CURRENCY, DATE/TIME, YES/NO (boolean), FILE (legacy), ATTACHMENT (file upload with constraints), PASSWORD, LIST-STRING, LIST-NUMBER, LIST-DATE/TIME (multi-select with predefined options), TIMESTAMP, RANDOM ID, AUTONUMBER, PREFIXED AUTONUMBER, GUID.

Note: PK_ID is system-managed and cannot be created. Formula fields cannot be created via the REST API.

Always use field Name (never Label) in SELECT, WHERE, ORDER BY, and GROUP BY clauses.

post/v4/directories/{directoryId}/fields

Request

  • Base URL: https://demo.caspio.com/integrations/rest
  • URL: https://demo.caspio.com/integrations/rest/v4/directories/{directoryId}/fields
  • Auth: API key in header Authorization

Path parameters

directoryIdstring required

The directory identifier (6-character alphanumeric code).

Query parameters

echoboolean

When true, returns the created field in the response. Default: false.

Request body

displayOrderinteger nullable
namestring required
labelstring nullable
descriptionstring nullable
dataTypestring required
uniqueboolean nullable
uniqueAllowNullsboolean nullable
isFormulaboolean nullable
stampOnInsertboolean nullable
stampOnUpdateboolean nullable
stampTimeZonestring nullable
formatstring nullable
prefixstring nullable
lengthinteger nullable
listFieldstring[] nullable
attachmentPermittedFileTypesstring[] nullable
attachmentMinFileSizeinteger nullable
attachmentMaxFileSizeinteger nullable
attachmentSmartResizerboolean nullable
attachmentSmartResizerForRetinaboolean nullable
attachmentAltTextstring nullable
attachmentTitlestring nullable

Response

Created

Changes

No recorded changes to this operation across all 1 revision of this API.