Integrations

REST API

Connect KogniFeed to your CRM or event pipeline: list surveys, create personalized invite links, and check completion status — all with a workspace API key.

Base URL

All endpoints are under /v1. In production this is typically your app origin plus the backend proxy path.

Authentication

Send your workspace API key as a Bearer token on every request:

Authorization: Bearer kfn_…

Create keys from the dashboard: Account menu → API Keys (owners and admins only).

Endpoints

GET /v1/surveys

List surveys in your workspace with publish status and public link slug.

POST /v1/invite-links

Create a signed ?t= URL with embedded user_data. No CRM record.

  • Survey must be published with an active public link (invite-link endpoints).
  • Signed URL: one step — POST /v1/invite-links with full user_data.
  • CRM: two steps — add/update contact, then request the invite link.
  • By default the API returns personal_url only — you deliver it yourself unless send_email_via_kognifeed is true.
  • user_data.metadata accepts any JSON — structured fields (event, order_id) plus a free-text story for the agent (e.g. payment not confirmed, abandoned checkout).
  • Total serialized user_data size is limited (default 8192 chars; INTEGRATION_INVITE_USER_DATA_MAX_CHARS).
  • Set send_email_via_kognifeed: true to deliver personal_url by email through KogniFeed. Each send counts against your plan's CRM invite email quota.

Signed URL — no CRM

{
  "survey_id": "uuid",
  "user_data": {
    "email": "user@example.com",
    "name": "Ada Lovelace",
    "metadata": {
      "event": "payment_not_confirmed",
      "order_id": "ORD-8842",
      "product": "Pro Plan (annual)",
      "amount": "249 EUR",
      "story": "Ada completed checkout for Pro Plan but payment was not confirmed — card authorization failed twice. Order has been on hold for 24h. Understand checkout friction and whether she still wants to upgrade."
    }
  },
  "token_expires_days": 30,
  "send_email_via_kognifeed": false
}

POST /v1/crm/contacts

Upsert KogniFeed CRM contacts via a users array (1–500 per request). metadata is saved to the contact info field. Optional group_name (or group_id) applies to all contacts in the request.

Step 1 — CRM contact

{
  "group_name": "Enterprise Customers",
  "users": [
    {
      "email": "user@example.com",
      "name": "Ada Lovelace",
      "role": "Customer",
      "phone": "+1…",
      "external_id": "your-crm-id",
      "metadata": {
        "event": "purchase_completed",
        "order_id": "ORD-99"
      }
    },
    {
      "email": "grace@example.com",
      "name": "Grace Hopper",
      "external_id": "crm-2"
    }
  ]
}

POST /v1/crm/invite-links

Return a ?c= link for an existing CRM contact (email or external_id). Contact must exist — use POST /v1/crm/contacts first.

Step 2 — CRM invite link

{
  "survey_id": "uuid",
  "email": "user@example.com",
  "send_email_via_kognifeed": false
}

GET /v1/invite-links

Find an existing invite link and session status (not_started, active, completed, …).

Query with survey_id plus email or external_id.

Typical flow

  1. Call GET /v1/surveys to pick a published survey_id.
  2. Signed URL: POST /v1/invite-links with user_data. CRM: POST /v1/crm/contacts, then POST /v1/crm/invite-links with email or external_id.
  3. Send personal_url yourself, or set send_email_via_kognifeed: true (uses plan email quota).
  4. Poll GET /v1/invite-links or use the session field in the create response to track completion.
  5. CRM contact upsert and signed-link POST are idempotent for the same email — safe to retry on webhook duplicates.

Requirements

  • Published survey with an active public link.
  • Workspace API key (owner or admin creates keys in the dashboard).