Skip to main content
A workspace attribute is a field that you define. It appears on every contact profile, in the inbox, and in the API. You do not need a migration or a release to add one. An attribute has two names. The label is what a teammate reads, for example Package. The API name is the key that a script sends, for example package. The label can change at any time. The API name cannot, so a renamed label never breaks your sync.

Types

Kai accepts the JSON type and its string spelling, because a CSV export and a spreadsheet lose types. Kai does not accept a wrong meaning: an unknown select option is an error, not a stored spelling mistake.

Create an attribute

An API name starts with a letter. It holds lowercase letters, digits and underscores, up to 48 characters.

Unknown keys are errors

Kai refuses an attribute key that the workspace does not define, and names the key:
Kai refuses the key instead of dropping it. A push of 3000 contacts that silently discards the one field you care about is a fault that nobody finds until months later.

Types cannot change

The type of an attribute that exists is fixed. To store a different type, archive the attribute and create another one with a new API name. A type change would leave every recorded value unreadable by its own definition, and no conversion is correct for all of them.

Archive, not delete

DELETE /attributes/{key} archives the attribute:
  • the attribute stops being offered in Kai;
  • Kai refuses new writes to it;
  • every value that contacts already hold stays, and the profile still shows it.
Send ?restore=true to make the attribute writable again.