Base URL
https://brain.thunaivi.io/apiIntegration endpoints are currently exposed under /api/integrations/*.
Official REST API for connecting external CRMs, custom databases, and support ticketing workflows to Thunaivi. Supports tenant-scoped API authentication, high rate-limit throughput, and real-time webhook events.
Thunaivi Integration API
Use tenant-scoped API keys to connect external systems (CRM/helpdesk/custom backend) with Thunaivi integration endpoints.
https://brain.thunaivi.io/apiIntegration endpoints are currently exposed under /api/integrations/*.
Authorization: Bearer tvk_live_...
Content-Type: application/json
Accept: application/jsonGenerate keys from Client Portal -> API Keys. Full secret is shown once.
/api/v1: If you open /api/v1 in browser and see 404, that is expected for this integration API.
Use the documented integration endpoints below.Validate API key and return tenant context bound to that key.
curl --request GET \
--url https://brain.thunaivi.io/api/integrations/me \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Accept: application/json"{
"ok": true,
"tenant_id": "ce15ac3e-45b6-4e21-a465-e0dca27175a5",
"tenant_name": "Acme Support",
"account_id": "12",
"key_id": "3884ccbc-1f98-4685-8912-407826c10709",
"key_name": "CRM Production",
"scopes": ["crm:read", "tickets:write"]
}Accept ticket sync payload from external CRM/helpdesk for secure asynchronous processing.
curl --request POST \
--url https://brain.thunaivi.io/api/integrations/crm/ticket-sync \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"external_ticket_id": "ZD-98322",
"external_system": "zendesk",
"customer": { "email": "[email protected]" },
"payload": {
"subject": "Order tracking delay",
"status": "open",
"priority": "high"
}
}'{
"ok": true,
"message": "Ticket sync accepted",
"tenant_id": "ce15ac3e-45b6-4e21-a465-e0dca27175a5",
"account_id": "12",
"external_ticket_id": "ZD-98322",
"external_system": "zendesk"
}Integration API currently returns concise JSON errors:
{ "error": "Missing API key" }400 Validation error (example: missing external_ticket_id)401 Missing/invalid/revoked/expired API key403 Missing required scope, IP not allowed, or tenant inactive429 Rate limit exceeded for key500 Internal processing errorrate_limit_per_minute on key).Public outbound integration webhooks are in staged rollout.
Current best practice: poll your target state via API and keep your consumer idempotent for safe retries.
Issue a tenant key, test /integrations/me, then move to ticket sync with strict scope and IP controls.