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.

GET/v2.0/contacts/custom_fields

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

Try it — API Playground

Create Custom Field

Create a new custom attribute definition. Subject to the max_custom_attributes plan limit.

POST/v2.0/contacts/custom_fields

Body Parameters

Body Parameters

ParameterTypeDescription
fieldNamestringDisplay name shown in the UI. e.g. "Birthday"
fieldKeystringKey used to store / query data on contacts. Auto-derived from fieldName if omitted. Must be unique per org.
fieldTypestringOne of: text, number, date, boolean, dropdownDefault: text
optionsstring[]Required (non-empty) when fieldType is "dropdown". Array of option strings.

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

Try it — API Playground

Update Custom Field

Update an existing custom attribute definition's display name, type, or options.

PUT/v2.0/contacts/custom_fields/:fieldId

Parameters

Path Parameters

ParameterTypeDescription
fieldIdstringMongoDB ObjectId of the custom field

Body Parameters

ParameterTypeDescription
fieldNamestringNew display name
fieldTypestringOne of: text, number, date, boolean, dropdown
optionsstring[]Required (non-empty) when fieldType is "dropdown"

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.

DELETE/v2.0/contacts/custom_fields/:fieldId

Path Parameters

ParameterTypeDescription
fieldIdstringMongoDB 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"
  }
}