Create contact field
Changed onAdds a typed field to contacts. A field gives a metadata key a type: from then on contact writes to that key are checked and stored in canonical form (dates as YYYY-MM-DD, choices as their key, numbers as decimal strings), so {{customer.fields.<key>}} in emails, the metadata[<key>] filter and the broadcast fields audience keep working. Metadata keys without a field stay free-form. billing_address is reserved. Types: text, number, money, date, boolean, url, email, and select and multi_select (need options). An account has at most 100 active contact fields. Answers 422 when the key is taken or the options do not fit the type.
Request
- Base URLhttps://api.crevio.co/v1
- AuthAPI key in header Authorization
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Lowercase snake_case name of the field, such as plan_interest: the metadata key its value is stored under. It never changes.
What the field holds. It never changes.
Display name. Defaults to the key, humanized.
select and multi_select only: the choices, as labels or {key, label} objects. Values are stored as the choice's key. On update this replaces the list; values already stored are kept.
money only: a three-letter ISO currency code, such as usd. Defaults to the account's currency.
Display order. Defaults to last.
Response
Field created
The choices of a select or multi_select field. A value is a choice's key.
A money field's ISO currency code, when set.
Changes
- info
endpoint added
- info