Contacts
Contacts are people associated with companies. They can be leads, clients, candidates, investors, or any other type. Portal access is controlled via portal_access and portal_role fields.
Routes
GET /api/contacts
List contacts with pagination and filters.
Auth: Required
Query params:
| Param | Type | Description |
|---|---|---|
company_id | string | Filter by company |
type | string | Filter by contact_type (lead, client, candidate, investor, end_user) |
source | string | Filter by source |
search | string | Search full_name or email |
page | number | Default: 1 |
limit | number | Default: 25, max: 100 |
Response:
{
"ok": true,
"data": {
"items": [
{
"id": "ct_a1b2c3d4",
"email": "jane@acme.com",
"full_name": "Jane Smith",
"company_id": "co_e5f6g7",
"company_name": "Acme Corp",
"contact_type": "client",
"portal_access": 1,
"portal_role": "client_admin"
}
],
"total": 120,
"page": 1,
"limit": 25,
"hasMore": true
}
}GET /api/contacts/:id
Get a single contact with company name.
Auth: Required
Path params: id — contact ID
POST /api/contacts
Create a new contact.
Auth: Required
Request body:
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes (or company_id) | Email address |
company_id | string | yes (or email) | Link to company |
first_name | string | no | First name |
last_name | string | no | Last name |
full_name | string | no | Overrides first+last concat |
title | string | no | Job title |
role | string | no | Role type |
department | string | no | Department |
phone | string | no | Phone number |
contact_type | string | no | Default: end_user |
source | string | no | Default: manual |
pipeline_stage | string | no | CRM pipeline stage |
funnel_stage | string | no | Marketing funnel stage |
linkedin_url | string | no | LinkedIn profile URL |
tags | string | no | Comma-separated tags |
notes | string | no | Internal notes |
portal_access | integer | no | 1 = can log in to portal |
portal_role | string | no | client_admin, client_viewer |
Response: 201 Created
{
"ok": true,
"data": {
"id": "ct_a1b2c3d4",
"full_name": "Jane Smith",
"email": "jane@acme.com"
}
}PATCH /api/contacts/:id
Update contact fields.
Auth: Required
Path params: id
Request body: Any subset of:
company_id, email, first_name, last_name, full_name, title, role, department, phone, contact_type, source, pipeline_stage, funnel_stage, engagement_score, last_engagement_at, enrichment_status, enrichment_data, linkedin_url, photo_url, close_lead_id, close_contact_id, tags, notes, portal_access, portal_role
Response:
{ "ok": true, "data": { "id": "ct_a1b2c3d4", "updated": true } }Portal Access
To grant a contact access to a product portal:
curl -X PATCH https://api.sprintmode.ai/api/contacts/ct_a1b2c3d4 \
-H "X-SM-Key: <key>" \
-H "Content-Type: application/json" \
-d '{ "portal_access": 1, "portal_role": "client_admin" }'The contact can then log in via magic link or Google SSO. Their products[] array in the JWT will include the product they're tagged with.
