Contact fields
List the contact fields
In the order they were created.
Required scope: contacts:read.
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the contact fields › Responses
objecthasMorenextCursorCreate a contact field
A contact field is a piece of data every contact of the organization can hold, like a plan or a customer number. Once it exists, send its value in fields when you create or update a contact.
Required scope: contact-fields:write.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Create a contact field › Request Body
key^[A-Za-z][A-Za-z0-9_… · requiredLetters, numbers and underscores, starting with a letter. Unique in the organization and fixed once created.
typeThe kind of value it holds. Values are checked against it: email, phone, url, number, date (YYYY-MM-DD), boolean, select (one of the options) or free text.
labelDefaults to the key.
Required for type select and not allowed for the others.
Create a contact field › Responses
objectidkeylabeltypecreatedAtupdatedAtRetrieve a contact field
Returns one contact field by id. Use it to refresh a single record you already know; to find records, use the list route. Read only. 404 not_found when the id does not exist or belongs to another organization. You can repeat it safely: it has no side effects.
Required scope: contacts:read.
path Parameters
id^cfd_[0-9A-Za-z]{22}… · requiredThe id of the contact field (cfd_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Retrieve a contact field › Responses
objectidkeylabeltypecreatedAtupdatedAtDelete a contact field
Removes the definition and the value it had in every contact. This cannot be undone.
Required scope: contact-fields:write.
path Parameters
id^cfd_[0-9A-Za-z]{22}… · requiredThe id of the contact field (cfd_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Delete a contact field › Responses
Update a contact field
The key and the type are fixed. options replaces the list of a select field; contacts keep the values they already have.
Required scope: contact-fields:write.
path Parameters
id^cfd_[0-9A-Za-z]{22}… · requiredThe id of the contact field (cfd_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Update a contact field › Request Body optional
labelReplaces the options of a select field. Contacts keep the values they already have.
Update a contact field › Responses
objectidkeylabeltypecreatedAtupdatedAt