Lead Insights

Insights (internally audience segments) are structured data fields the AI extracts from each conversation — budget, city, interests, and so on. Extracted values are stored on the contact under lead_segments. Each insight has:

  • key — unique id, must match ^[a-zA-Z][a-zA-Z0-9_]*$. Immutable after creation. Addresses the insight.
  • name — human-friendly display name.
  • valueTypetext, number, or array (multiple values).
  • options — optional list of allowed values; leave empty for free-form.
  • description — guides what the AI should extract.

List insights

GET/v2.0/leads/insights
curl -X GET "https://api.sendiee.com/v2.0/leads/insights" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "key": "budget",
      "name": "Budget",
      "valueType": "text",
      "options": [],
      "description": "The customer's stated budget."
    },
    {
      "key": "interests",
      "name": "Interests",
      "valueType": "array",
      "options": [],
      "description": "Topics the customer cares about."
    }
  ],
  "meta": {
    "total": 2
  }
}
Try it — API Playground

Get a single insight

GET/v2.0/leads/insights/{key}
cURL
curl -X GET "https://api.sendiee.com/v2.0/leads/insights/budget" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "key": "budget",
    "name": "Budget",
    "valueType": "text",
    "options": [],
    "description": "Stated budget."
  }
}

Create an insight

POST/v2.0/leads/insights

Body

ParameterTypeDescription
keystringUnique id — ^[a-zA-Z][a-zA-Z0-9_]*$ (immutable)
namestringDisplay name
descriptionstringGuides what the AI extracts
valueTypestringtext | number | array (default text)
optionsstring[]Allowed values; empty = free-form
cURL
curl -X POST "https://api.sendiee.com/v2.0/leads/insights" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "budget",
    "name": "Budget",
    "valueType": "text",
    "description": "The customer's stated budget for the purchase."
  }'
{
  "success": true,
  "data": {
    "key": "budget",
    "name": "Budget",
    "valueType": "text",
    "options": [],
    "description": "The customer's stated budget for the purchase."
  }
}
{
  "error": true,
  "code": "INSIGHT_EXISTS",
  "message": "An insight with this key already exists."
}
Try it — API Playground

Update an insight

PATCH/v2.0/leads/insights/{key}

Update name, valueType, options or description. The key is immutable — to rename it, delete and recreate.

cURL
curl -X PATCH "https://api.sendiee.com/v2.0/leads/insights/budget" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "valueType": "array", "options": ["low", "medium", "high"] }'
{
  "success": true,
  "data": {
    "key": "budget",
    "name": "Budget",
    "valueType": "array",
    "options": [
      "low",
      "medium",
      "high"
    ],
    "description": "Stated budget."
  }
}

Delete an insight

DELETE/v2.0/leads/insights/{key}
cURL
curl -X DELETE "https://api.sendiee.com/v2.0/leads/insights/budget" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "success": true,
  "data": {
    "deleted": true
  }
}