API reference
JSON over HTTPS. Two endpoints today: create a lead, and provision a workspace. Keys are created by a workspace admin under Forms & API.
Authentication
Send the key in X-Api-Key: tcrm_… or Authorization: Bearer tcrm_…. A key belongs to one workspace and has scopes: leads:write for website keys, workspaces:write for platform keys. Keep keys on your server — never in a web page or app. Up to 120 requests a minute per key.
Create a lead — POST /api/v1/leads
POST https://crm.teliccognitive.com/api/v1/leads
X-Api-Key: tcrm_…
Content-Type: application/json
{
"name": "Dr. Anjali Rao",
"mobile": "9830012345",
"email": "anjali@example.com",
"company": "Sunrise Hospital",
"city": "Nagpur",
"beds": 120,
"interest": "Medspire HMIS demo",
"message": "Need a demo",
"page": "/pricing",
"utm": "utm_source=google&utm_campaign=hmis",
"source": "MedspireSite",
"consent": { "enquiry": true, "marketing": false, "consentManagerId": null },
"isMinor": false, "guardianName": null, "guardianRelation": null
}
- name and at least one of mobile / email are required. Indian mobiles are normalised to +91.
- consent.enquiry must be
true— the person agreed to be contacted. consent.marketing only if they ticked it. - source is optional; without it the key's own source is used. Values: Website, MedspireSite, HospitalWebsite, WhatsApp, Call, Email, Referral, Event, Walkin, Api, Other.
| Status | Meaning |
|---|---|
| 201 | New lead: { "id", "leadNo", "duplicate": false, "owner" } |
| 200 | The person had an open lead; this enquiry was added to it ("duplicate": true) |
| 422 | Refused, with { "error": "…" } in plain words — no enquiry consent, no way to reply, invalid mobile |
| 401 / 403 | Missing, unknown or revoked key / key without the scope |
| 429 | Too many requests — slow down |
Add a newsletter subscriber — POST /api/v1/subscribers
For newsletter and mailing-list sign-ups, with the same website key (leads:write). The person is kept as a contact with marketing consent in the ledger; no lead is opened and no one is assigned.
{
"email": "reader@example.com",
"name": null,
"source": "Website",
"page": "/fr",
"locale": "fr",
"consent": { "marketing": true, "consentManagerId": null }
}
email and consent.marketing: true are required. 201 returns { "contactId", "existing": false, "alreadySubscribed": false }; 200 when the address was already a contact (a past unsubscribe is cleared, because they opted in again). 422 without marketing consent or a valid address.
Provision a workspace — POST /api/v1/workspaces
For platforms (such as the Medspire portal) that give their customers a CRM. Needs a platform key.
{
"code": "PTL", "name": "The Patel Hospital", "kind": "Hospital", "city": "Ahmedabad",
"portalTenantCode": "PTL", "adminEmail": "admin@hospital.in", "adminName": "Hospital Admin",
"grievanceOfficer": "Ms. …", "grievanceEmail": "grievance@hospital.in", "userLimit": 5, "trialDays": 30
}
201 returns workspaceId, signInUrl, adminEmail and a one-time temporaryPassword. Calling again with the same portalTenantCode returns 200 with "existing": true — safe to retry. A code already taken by someone else is 422.
Health — GET /api/v1/health
Returns { "status": "ok" }.
Questions: hello@teliccognitive.com. Webhooks and more endpoints are on the roadmap.