Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usehasp.com/llms.txt

Use this file to discover all available pages before exploring further.

Hasp entities support 12 field types. Each field has a key (slug), name (display label), type, and optional validation rules.

Summary

TypeStored AsUse For
textstringShort labels, names (max 255 chars)
textareastringLong descriptions, notes (max 5000 chars)
numbernumberQuantities, prices, scores
booleanbooleanYes/no toggles
selectstringStatus, priority (single choice from options)
multi_selectstring[]Tags, categories (multiple choices)
dateYYYY-MM-DDCalendar dates
datetimeISO 8601Timestamps with time
emailstringEmail addresses (validated format)
urlstringWeb URLs (validated format)
filestring (fileId)File attachments
relationstring (ULID)Cross-entity reference (record ID)
select and multi_select must define an options array.

text

Single-line plain text. Max 255 characters.
{ "key": "title", "name": "Title", "type": "text", "required": true }

textarea

Multi-line plain text. Max 5000 characters.
{ "key": "description", "name": "Description", "type": "textarea", "required": false }

number

Numeric value — integer or decimal. Optional constraints: min, max, decimal_places (configured in the Schema Builder).
{ "key": "quantity", "name": "Quantity", "type": "number", "required": true }

boolean

True/false toggle.
{ "key": "is_complete", "name": "Completed", "type": "boolean", "required": false }

select

Single choice from a predefined list. The stored value must exactly match one of the defined options.
{
  "key": "priority",
  "name": "Priority",
  "type": "select",
  "required": true,
  "options": ["low", "medium", "high", "critical"]
}

multi_select

Multiple choices from a predefined list. Stored as an array of strings.
{
  "key": "tags",
  "name": "Tags",
  "type": "multi_select",
  "required": false,
  "options": ["frontend", "backend", "design", "devops"]
}

date

Calendar date without time. Format: YYYY-MM-DD.
{ "key": "due_date", "name": "Due Date", "type": "date", "required": false }

datetime

Date and time with timezone. Format: ISO 8601 (YYYY-MM-DDTHH:mm:ssZ).
{ "key": "scheduled_at", "name": "Scheduled At", "type": "datetime", "required": false }

email

Email address. Validated as a properly-formatted email.
{ "key": "contact_email", "name": "Contact Email", "type": "email", "required": true }

url

Web URL. Validated as a properly-formatted URL.
{ "key": "website", "name": "Website", "type": "url", "required": false }

file

File attachment. The value stored in the record is a fileId ULID returned from the file upload flow. See File Uploads & Downloads.
{ "key": "attachment", "name": "Attachment", "type": "file", "required": false }

relation

A reference to a record in another entity within the same app. The stored value is the ULID of the target record.
{
  "key": "project_id",
  "name": "Project",
  "type": "relation",
  "required": false,
  "related_entity": "projects",
  "display_field": "name"
}
When you read a record that has a relation field, the value is the target record’s id string. To load the referenced record’s data, call sdk.getRecord(relatedEntityKey, value).

System Fields

Every record automatically includes these read-only fields — never include them in create/update payloads:
FieldTypeDescription
idstring (ULID)Unique record ID
created_bystring (ULID)User who created the record
updated_bystring (ULID)User who last updated the record
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp

Naming Conventions

  • Field keys: snake_case, lowercase — due_date, is_complete, contact_email
  • Field names: Title Case — “Due Date”, “Completed”, “Contact Email”
  • Entity keys: snake_case, plural — tasks, contacts, inventory_items
  • Entity names: Title Case, plural — “Tasks”, “Contacts”