Skip to main content
The Export/Import APIs enable configuration portability between environments. Export produces a JSON snapshot of all tenant entities; Import recreates them in the target tenant.

GET /api/v1/export/full

Export the full tenant configuration as a JSON file. Includes decision flows, categories, offers, channels, connectors, schemas, pipelines, models, experiments, rules, policies, guardrails, and segments. Rate limited to 10 requests/min. Admin only.
Connector authConfig (credentials) is deliberately excluded from exports for security.

Response

Returns a JSON file download with Content-Disposition: attachment.
{
  "exportType": "full",
  "exportedAt": "2026-03-18T12:00:00.000Z",
  "version": 1,
  "data": {
    "decisionFlows": [ ... ],
    "categories": [ ... ],
    "offers": [ ... ],
    "channels": [ ... ],
    "connectors": [ ... ],
    "schemas": [ ... ],
    "pipelines": [ ... ],
    "models": [ ... ],
    "experiments": [ ... ],
    "qualificationRules": [ ... ],
    "contactPolicies": [ ... ],
    "guardrailRules": [ ... ],
    "segments": [ ... ]
  }
}

DELETE /api/v1/export/full

GDPR customer data erasure. Deletes all interaction history, summaries, and variant assignments for a customer, invalidates cached data, and verifies complete removal. Admin only.

Request Body

FieldTypeRequiredDescription
customerIdstringYesCustomer ID to erase

Response

{
  "customerId": "C-1234",
  "tenantId": "my-tenant",
  "erasedAt": "2026-03-18T12:00:00.000Z",
  "deleted": {
    "interactionHistory": 142,
    "interactionSummary": 15,
    "variantAssignment": 3
  },
  "cacheInvalidated": true,
  "verification": {
    "passed": true,
    "remainingRecords": {
      "interactionHistory": 0,
      "interactionSummary": 0,
      "variantAssignment": 0
    }
  },
  "totalRecordsDeleted": 160
}

GET /api/v1/export/decision-flows/

Export a single decision flow as a JSON file. Editor or Admin.

Response

{
  "exportType": "decision_flow",
  "exportedAt": "2026-03-18T12:00:00.000Z",
  "version": 1,
  "data": { ... }
}

GET /api/v1/export/models/

Export a single algorithm model (including all versions) as a JSON file. Editor or Admin.

Response

{
  "exportType": "model",
  "exportedAt": "2026-03-18T12:00:00.000Z",
  "version": 1,
  "data": { ... }
}

POST /api/v1/import

Import configuration from an export file. All entities are created in a single transaction — if any fail, all changes roll back. Rate limited to 10 requests/min. Max payload: 10 MB. Editor or Admin.

Request Body

FieldTypeRequiredDescription
exportTypestringYesType: decisionFlow, blueprint, model, or full
versionnumberNoExport format version
dataobjectYesThe exported data payload

Import Behavior

  • Imported entities get a -imported- suffix on their key to avoid conflicts
  • Names get (imported) appended
  • All imported entities start in draft status
  • Connector credentials (authConfig) are cleared for security
  • Max 500 items per entity type in full imports

Example

curl -X POST https://playground.kaireonai.com/api/v1/import \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-tenant" \
  -d @kaireon-export-2026-03-18.json

Response

{
  "success": true,
  "summary": {
    "decisionFlows": 3,
    "models": 2,
    "connectors": 5
  }
}