Skip to content
API Now! is currently in closed beta. We are constantly updating these guides as we release updates!

Name (Semantic Module)

← Back to Modules Reference

The Name semantic module standardizes text properties that represent the proper name of an entity—such as a customer’s full name, a pet’s name, an organization’s legal name, or a department label.

Tagging a property with Name ensures that name fields remain clean, readable, and properly formatted by automatically stripping stray leading and trailing spaces and converting empty inputs to null.


AttributeSpecification
ScopeProperty (Applied to a text property)
Data TypeString
Default Max Length255 characters
Whitespace HandlingAutomatically trimmed on Create and Update
Empty Input HandlingBlank strings ("" or spaces only) convert to null

User registration forms frequently capture trailing spaces from mobile autocorrect or copy-pasting. The Serverless Engine removes these automatically:

  • " Jane Doe " is saved cleanly as "Jane Doe".

If an optional name field is submitted as blank ("") or consists solely of spaces (" "), the engine sets the value to null, keeping database queries and API outputs clean.

On user accounts or contact records, Name commonly serves as the friendly display name, distinguishing it from login handles managed by the Username semantic.


1. Creating a User Profile with a Clean Name

Section titled “1. Creating a User Profile with a Clean Name”

A client submits a customer profile:

POST /customers
Content-Type: application/json
{
"name": " Alex Morgan ",
"email": "alex.morgan@example.com"
}

Server Response (201 Created):

{
"data": {
"id": "cust_201",
"name": "Alex Morgan",
"email": "alex.morgan@example.com"
}
}

If a client passes a non-string value:

{
"name": { "first": "Alex", "last": "Morgan" }
}

Server Response (400 Bad Request):

{
"type": "https://docs.apinow.app/errors/validation",
"title": "Validation Error",
"status": 400,
"code": "E_VALIDATION_ERROR",
"detail": "Property 'name' must be a string."
}

  • Applicable Property Types: Apply to a String property in the Domain Modeler.
  • Length Constraints: The default Maximum Length of 255 characters easily accommodates long international names and corporate legal entities.