Custom Fields
Custom fields let you extend the contact schema with organisation-specific attributes — e.g. Birthday, Lead Source, or Shopify Customer ID. Each definition has a fieldKey (immutable after creation) used to store and query data on contacts.
List Custom Fields
Return all custom attribute definitions for your organisation.
Code Example
curl -X GET "https://api.sendiee.com/v2.0/contacts/custom_fields" \
-H "Authorization: Bearer YOUR_API_KEY"Response — 200 OK
{
"success": true,
"data": [
{
"_id": "6640fa2b3e4a1c0012abc001",
"fieldName": "Birthday",
"fieldKey": "birthday",
"fieldType": "date",
"hasDropdown": false,
"options": [],
"createdAt": "2026-03-01T10:00:00.000Z",
"updatedAt": "2026-03-01T10:00:00.000Z"
},
{
"_id": "6640fa2b3e4a1c0012abc002",
"fieldName": "Lead Source",
"fieldKey": "lead_source",
"fieldType": "dropdown",
"hasDropdown": true,
"options": [
"Facebook Ads",
"Google Ads",
"Organic",
"Referral"
],
"createdAt": "2026-03-05T08:00:00.000Z",
"updatedAt": "2026-03-05T08:00:00.000Z"
}
],
"meta": {
"total": 2
}
}Try It — List
Create Custom Field
Create a new custom attribute definition. Subject to the max_custom_attributes plan limit.
fieldKey is immutable
fieldKey is not provided it is auto-derived from fieldName (lowercased, spaces → underscores, special characters removed). Once created, fieldKey cannot be changed — changing it would break existing contact data stored under that key.Body Parameters
Body Parameters
| Parameter | Type | Description |
|---|---|---|
| fieldName | string | Display name shown in the UI. e.g. "Birthday" |
| fieldKey | string | Key used to store / query data on contacts. Auto-derived from fieldName if omitted. Must be unique per org. |
| fieldType | string | One of: text, number, date, boolean, dropdown, multiselect, url, phoneDefault: text |
| options | string[] | Required (non-empty) when fieldType is "dropdown" or "multiselect". Array of option strings. Ignored for other types. |
Code Examples
curl -X POST "https://api.sendiee.com/v2.0/contacts/custom_fields" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fieldName": "Birthday",
"fieldType": "date"
}'Response — 201 Created
{
"success": true,
"message": "Custom field created successfully.",
"data": {
"_id": "6640fa2b3e4a1c0012abc003",
"fieldName": "Lead Source",
"fieldKey": "lead_source",
"fieldType": "dropdown",
"hasDropdown": true,
"options": [
"Facebook Ads",
"Google Ads",
"Organic",
"Referral"
],
"createdAt": "2026-04-14T09:00:00.000Z",
"updatedAt": "2026-04-14T09:00:00.000Z"
}
}Try It — Create
Multiselect Values on Contacts
A multiselect field is created with hasDropdown: true and its value on a contact is an array of strings, e.g. ["Tamil", "English"]. When you create or update a contact, you can send the value either as an array or as a single string separated by commas, pipes or semicolons ("Tamil, English", "Tamil|English"). Either form is stored as a string array, with whitespace trimmed and duplicates removed. Values for other field types are stored as sent.
curl -X POST "https://api.sendiee.com/v2.0/contacts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "919876543210",
"customFields": {
"languages": ["Tamil", "English"]
}
}'Update Custom Field
Update an existing custom attribute definition's display name, type, or options.
fieldKey cannot be changed
fieldName, fieldType, and options can be updated. The fieldKey is immutable after creation.Parameters
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| fieldId | string | MongoDB ObjectId of the custom field |
Body Parameters
| Parameter | Type | Description |
|---|---|---|
| fieldName | string | New display name |
| fieldType | string | One of: text, number, date, boolean, dropdown, multiselect, url, phone. Omit it to keep the current type. |
| options | string[] | Must be non-empty when sent for a "dropdown" or "multiselect" field |
Code Example
curl -X PUT "https://api.sendiee.com/v2.0/contacts/custom_fields/6640fa2b3e4a1c0012abc003" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fieldName": "Acquisition Channel",
"options": ["Facebook Ads", "Google Ads", "Organic", "Referral", "WhatsApp Broadcast"]
}'Response — 200 OK
{
"success": true,
"message": "Custom field updated successfully.",
"data": {
"_id": "6640fa2b3e4a1c0012abc003",
"fieldName": "Acquisition Channel",
"fieldKey": "lead_source",
"fieldType": "dropdown",
"hasDropdown": true,
"options": [
"Facebook Ads",
"Google Ads",
"Organic",
"Referral",
"WhatsApp Broadcast"
],
"createdAt": "2026-04-14T09:00:00.000Z",
"updatedAt": "2026-04-14T11:30:00.000Z"
}
}Delete Custom Field
Delete a custom attribute definition from your organisation.
Existing data is not removed
fieldKey on existing contacts.Path Parameters
| Parameter | Type | Description |
|---|---|---|
| fieldId | string | MongoDB ObjectId of the custom field |
Code Example
curl -X DELETE "https://api.sendiee.com/v2.0/contacts/custom_fields/6640fa2b3e4a1c0012abc003" \
-H "Authorization: Bearer YOUR_API_KEY"Response — 200 OK
{
"success": true,
"message": "Custom field deleted successfully.",
"data": {
"fieldId": "6640fa2b3e4a1c0012abc003",
"fieldKey": "lead_source"
}
}