Zum Hauptinhalt springen

Messaging: eine Aktion

Messaging ist eine Aktion, ausgelöst durch eine Änderung im Nutzerzustand (im Produkt oder ausgehend), statt einer veralteten CSV aus einem anderen Tool.

At a glance

Host
https://api.prodantix.com
REST
GET /v1/messages, POST /v1/messages/read
Send
composeMessage over GraphQL
Live updates
message on the tenant room
  • Nachrichten ausgelöst, sobald sich der Zustand ändert, nicht nach einem Importplan
  • Im Produkt und ausgehend aus einer Engine
  • Zielgruppen sind Live-Kohorten, nie eingefrorene Listen

So funktioniert es

A message is composed against an audience (a cohort, a segment, or a single distinct id) and dispatched on a channel. In-app messages land in a per-user inbox the client reads on demand; a delivery also emits on the realtime tenant room, so an open session can surface it without polling.

Wo Sie darauf zugreifen

SurfaceOperation
RESTGET /v1/messages · POST /v1/messages/read
GraphQLmessaging query · composeMessage mutation
Realtimemessage on a tenant room
MCPprodantix.messages.list · .compose

Beispiel

curl "https://api.prodantix.com/v1/messages?distinct_id=u_8f3a" \
  -H "Authorization: Bearer $PRODANTIX_KEY"

Composing to a cohort

GraphQL
mutation Compose($projectId: String!) {
  composeMessage(
    projectId: $projectId
    input: {
      title: "Your trial ends soon"
      body: "Your trial ends in three days."
      channel: "in_app"
      targetKind: "segment"
      segment: { event: "checkout_started", lookbackDays: 30 }
    }
  ) {
    id
    status
    recipientCount
  }
}

The support chat widget

A two-way support thread mounts from @prodantix/sdk/chat, a separate entry point so a site that only wants analytics pays nothing for it. It renders in a closed shadow DOM, so the host page cannot style or read it, and ships under 15 kB gzipped.

JavaScript
import { mountChat } from '@prodantix/sdk/chat';

mountChat({
  apiKey: PRODANTIX_PUBLIC_KEY,
  host: 'https://eu.api.prodantix.com',
  distinctId: currentUser.id,
});

AI answering

On an AI-entitled plan, an agent can ask the AI to draft a reply into their composer to review and send: it suggests, a human decides. A project can also opt into auto-reply, which sends the AI draft directly on a brand-new thread with no agent yet, off by default. Either way an AI turn is always labelled as one, never as a person, and the model sees only that thread and the customer's own state.