Tags and metadata help organize, categorize, and annotate leads.
Tags are labels that can be applied to leads for organization and filtering.
Tag Types
| Type | Scope | Description |
|---|
| Global | All orgs | Admin-managed, shared across organizations |
| Org | Single org | Organization-specific tags |
| Auto | Per lead | AI-generated during augmentation |
Tag Structure
interface Tag {
id: string;
name: string;
color: string; // Hex color
type: 'global' | 'org' | 'auto';
orgId: string | null; // null for global
usageCount: number;
createdAt: number;
createdBy: string;
}
Create Tag
curl -X POST "https://api.adaptengine.com/api/v1/tags" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "High Priority",
"color": "#EF4444"
}'
curl "https://api.adaptengine.com/api/v1/tags" \
-H "Authorization: Bearer YOUR_TOKEN"
Update Tag
curl -X PUT "https://api.adaptengine.com/api/v1/tags/{tagId}" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Critical Priority",
"color": "#DC2626"
}'
Delete Tag
curl -X DELETE "https://api.adaptengine.com/api/v1/tags/{tagId}" \
-H "Authorization: Bearer YOUR_TOKEN"
curl -X POST "https://api.adaptengine.com/api/v1/leads/{leadId}/tags" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tagIds": ["tag_abc", "tag_def"]
}'
curl -X DELETE "https://api.adaptengine.com/api/v1/leads/{leadId}/tags" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tagIds": ["tag_abc"]
}'
Bulk Tag Assignment
Apply tags to multiple leads:
curl -X POST "https://api.adaptengine.com/api/v1/leads/tags/bulk" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"leadIds": ["lead_1", "lead_2", "lead_3"],
"addTagIds": ["tag_abc"],
"removeTagIds": ["tag_old"]
}'
curl "https://api.adaptengine.com/api/v1/leads?filter[tags]=tag_abc,tag_def" \
-H "Authorization: Bearer YOUR_TOKEN"
Additional metadata that can be attached to leads.
Add internal comments to leads:
curl -X POST "https://api.adaptengine.com/api/v1/leads/{leadId}/comments" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Spoke with project manager, very interested"
}'
Suggestions
Propose data corrections:
curl -X POST "https://api.adaptengine.com/api/v1/leads/{leadId}/suggestions" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"field": "estimatedValue",
"suggestedValue": 5000000,
"reason": "Updated estimate from latest filing"
}'
Feedback
Provide AI feedback:
curl -X POST "https://api.adaptengine.com/api/v1/leads/{leadId}/feedback" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "signal",
"targetId": "signal_abc",
"rating": "positive",
"notes": "Accurate and helpful insight"
}'
Field Overrides
Override master data fields per-org:
curl -X PUT "https://api.adaptengine.com/api/v1/leads/{leadId}/overrides" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"fields": {
"estimatedValue": 4500000,
"category": "Mixed-Use"
}
}'
Field overrides only affect your organization’s view of the lead. Master data remains unchanged.
API Endpoints
| Method | Endpoint | Description |
|---|
GET | /api/v1/tags | List all tags |
POST | /api/v1/tags | Create tag |
PUT | /api/v1/tags/{id} | Update tag |
DELETE | /api/v1/tags/{id} | Delete tag |
POST | /api/v1/leads/{leadId}/tags | Add tags to lead |
DELETE | /api/v1/leads/{leadId}/tags | Remove tags |
POST | /api/v1/leads/{leadId}/comments | Add comment |
POST | /api/v1/leads/{leadId}/suggestions | Add suggestion |
POST | /api/v1/leads/{leadId}/feedback | Add feedback |
PUT | /api/v1/leads/{leadId}/overrides | Set field overrides |