Skip to main content
Tags and metadata help organize, categorize, and annotate leads.

Tags

Tags are labels that can be applied to leads for organization and filtering.

Tag Types

TypeScopeDescription
GlobalAll orgsAdmin-managed, shared across organizations
OrgSingle orgOrganization-specific tags
AutoPer leadAI-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;
}

Managing Tags

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"
  }'

List Tags

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"

Assigning Tags to Leads

Add Tags

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"]
  }'

Remove Tags

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"]
  }'

Filtering by Tags

curl "https://api.adaptengine.com/api/v1/leads?filter[tags]=tag_abc,tag_def" \
  -H "Authorization: Bearer YOUR_TOKEN"

Entity Metadata

Additional metadata that can be attached to leads.

Comments

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

MethodEndpointDescription
GET/api/v1/tagsList all tags
POST/api/v1/tagsCreate tag
PUT/api/v1/tags/{id}Update tag
DELETE/api/v1/tags/{id}Delete tag
POST/api/v1/leads/{leadId}/tagsAdd tags to lead
DELETE/api/v1/leads/{leadId}/tagsRemove tags
POST/api/v1/leads/{leadId}/commentsAdd comment
POST/api/v1/leads/{leadId}/suggestionsAdd suggestion
POST/api/v1/leads/{leadId}/feedbackAdd feedback
PUT/api/v1/leads/{leadId}/overridesSet field overrides