CRM API and webhooks
API keys
Create keys in CRM → Settings → API as read-only or read and write. Keys start with tkc_ and are
shown once.
curl https://traffikco.com/api/crm/v1/contacts?q=jane \
-H "Authorization: Bearer tkc_your_key"
The limit is 120 requests per minute per key.
Endpoints
Base URL: https://traffikco.com/api/crm/v1. {object} is an object key such as contacts, companies,
deals or a custom object's key.
| Method and path | Purpose |
|---|---|
GET /objects | Objects and their fields |
GET /{object} | List records. ?q= searches; ?filter= takes the same JSON filter as views |
POST /{object} | Create a record. ?upsert=email updates the contact with that email if it exists |
GET /{object}/{id} | One record |
PATCH /{object}/{id} | Update fields |
DELETE /{object}/{id} | Delete a record |
POST /{object}/{id}/activities | Log a note, call, meeting or task |
POST /{object}/{id}/enroll | Start an automation for the record: {"automation_id": 1} |
curl -X POST "https://traffikco.com/api/crm/v1/contacts?upsert=email" \
-H "Authorization: Bearer tkc_your_key" -H "Content-Type: application/json" \
-d '{"properties": {"email": "[email protected]", "first_name": "Jane", "lifecycle_stage": "lead"}}'
Calculated fields are read-only: values sent for them are ignored.
Outgoing webhooks
CRM → Settings → API → Webhooks sends an HTTPS POST to your URL when records are created,
updated, deleted or change stage, optionally for one object only.
Each request has a JSON body and these headers:
X-TraffikCo-Delivery: a unique delivery id (use it to ignore repeats);X-TraffikCo-Signature:t=<unix time>,v1=<signature>, where the signature is the hex HMAC-SHA256 oft + "." + body, keyed with your webhook's secret.
import crypto from 'node:crypto';
function verify(rawBody, header, secret) {
const {t, v1} = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}
Respond with any 2xx status. Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. A webhook that fails 20 times in a row is paused; resume it from the settings. The delivery log shows every attempt, and Send test sends a sample event.