Labels
Label rules put labels such as Urgent or Promo on leads. Each rule is written in plain words; when you save, Leadveyor turns it into a check — an exact condition on the message (free) or a yes/no question the AI answers while reading it. Labels never change the score: they appear in every lead's labels, in webhooks, and filter GET /v1/leads?label=. Rules belong to the workspace and apply to new messages from the moment they are saved.
The LabelRule object
Properties
- Name
id- Type
- string
- Description
Unique identifier, prefixed by the object type.
- Name
text- Type
- string
- Description
When to add the labels, in plain words
- Name
labels- Type
- array of string
- Description
Labels the rule adds to a lead when its check holds
- Name
status- Type
- 'active' | 'unclear'
- Description
unclear: the text couldn't be turned into a check; the rule does nothing until it is reworded
- Name
check- Type
- object | object or null
- Description
What the engine checks; null when unclear
- Name
summary- Type
- string or null
- Description
The check in plain words, e.g. 'The message contains "promo code"'
- Name
problem- Type
- string or null
- Description
Why the text couldn't be used and how to reword it (unclear only)
- Name
createdAt- Type
- string
- Description
When it was created (ISO 8601).
- Name
updatedAt- Type
- string
- Description
When it was last changed (ISO 8601).
The workspace's label rules and every label they use
Request
# Leadveyor-Workspace: only with an account-wide key
curl https://core.leadveyor.com/v1/labels/rules \
-H "Authorization: Bearer {api_key}" \
-H "Leadveyor-Workspace: {workspace_id}"
Response 200
{
"object": "list",
"data": [
{
"id": "lrl_3Kd8Wm2Qx7Lp1Zt9Nc4Hy6Rb",
"text": "The customer says it's urgent or an emergency",
"labels": [
"Urgent"
],
"status": "active",
"check": {
"kind": "ai",
"question": "Does the customer need help today or call it an emergency?",
"guidance": null
},
"summary": "AI checks: Does the customer need help today or call it an emergency?",
"problem": null,
"createdAt": "2026-12-03T09:12:44.000Z",
"updatedAt": "2026-12-03T09:12:44.000Z"
},
{
"id": "lrl_9Tq4Lm7Wx2Kp8Zr1Nc5Hd3Vb",
"text": "The email subject or any form field mentions SPRING25",
"labels": [
"Promo"
],
"status": "active",
"check": {
"kind": "condition",
"condition": {
"any": [
{
"field": "inbound.subject",
"op": "contains",
"value": "SPRING25"
},
{
"field": "inbound.formFields",
"op": "contains",
"value": "SPRING25"
}
]
}
},
"summary": "Email subject contains \"SPRING25\" or any form field contains \"SPRING25\"",
"problem": null,
"createdAt": "2026-12-03T09:14:02.000Z",
"updatedAt": "2026-12-03T09:14:02.000Z"
}
],
"labels": [
"Urgent",
"Promo"
]
}
Replace the label rules; new or reworded rules are turned into checks by AI
Send every rule (rules left out are deleted). Keep id to keep a rule; its text is only read by the AI again when it changed, and each such read counts as one generation. A rule the AI can't use comes back with status unclear and a problem to fix. Rules apply from the next message on and never change scores. Usually 2–5 s per new rule.
Required attributes
- Name
rules- Type
- array of object
- Description
Request
# Leadveyor-Workspace: only with an account-wide key
curl -X PUT https://core.leadveyor.com/v1/labels/rules \
-H "Authorization: Bearer {api_key}" \
-H "Leadveyor-Workspace: {workspace_id}" \
-H "Content-Type: application/json" \
-d '{
"rules": [
{
"id": "id",
"text": "text",
"labels": [
"Promo"
]
}
]
}'
Response 200
{
"object": "list",
"data": [
{
"id": "lrl_3Kd8Wm2Qx7Lp1Zt9Nc4Hy6Rb",
"text": "The customer says it's urgent or an emergency",
"labels": [
"Urgent"
],
"status": "active",
"check": {
"kind": "ai",
"question": "Does the customer need help today or call it an emergency?",
"guidance": null
},
"summary": "AI checks: Does the customer need help today or call it an emergency?",
"problem": null,
"createdAt": "2026-12-03T09:12:44.000Z",
"updatedAt": "2026-12-03T09:12:44.000Z"
},
{
"id": "lrl_9Tq4Lm7Wx2Kp8Zr1Nc5Hd3Vb",
"text": "The email subject or any form field mentions SPRING25",
"labels": [
"Promo"
],
"status": "active",
"check": {
"kind": "condition",
"condition": {
"any": [
{
"field": "inbound.subject",
"op": "contains",
"value": "SPRING25"
},
{
"field": "inbound.formFields",
"op": "contains",
"value": "SPRING25"
}
]
}
},
"summary": "Email subject contains \"SPRING25\" or any form field contains \"SPRING25\"",
"problem": null,
"createdAt": "2026-12-03T09:14:02.000Z",
"updatedAt": "2026-12-03T09:14:02.000Z"
}
],
"labels": [
"Urgent",
"Promo"
]
}