메시징: 하나의 행동
메시징은 사용자 상태의 변화로 트리거되는 행동입니다(제품 내 또는 아웃바운드). 다른 도구에서 내보낸 오래된 CSV 대신.
At a glance
- Host
https://api.prodantix.com- REST
GET /v1/messages,POST /v1/messages/read- Send
composeMessageover GraphQL- Live updates
messageon the tenant room
- 메시지는 상태가 바뀌는 순간 트리거되며, 가져오기 일정에 따르지 않습니다
- 하나의 엔진에서 제품 내 및 아웃바운드
- 오디언스는 실시간 코호트이며, 결코 고정된 목록이 아닙니다
작동 방식
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.
접근 위치
| Surface | Operation |
|---|---|
| REST | GET /v1/messages · POST /v1/messages/read |
| GraphQL | messaging query · composeMessage mutation |
| Realtime | message on a tenant room |
| MCP | prodantix.messages.list · .compose |
예시
curl "https://api.prodantix.com/v1/messages?distinct_id=u_8f3a" \
-H "Authorization: Bearer $PRODANTIX_KEY"const inbox = await prodantix.messages.inbox({ distinctId: 'u_8f3a' });
await prodantix.messages.markRead(inbox[0].id);final inbox = await prodantix.messages.inbox(distinctId: 'u_8f3a');
await prodantix.messages.markRead(inbox.first.id);inbox = prodantix.messages.inbox(distinct_id="u_8f3a")
prodantix.messages.mark_read(inbox[0]["id"])Composing to a cohort
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.
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.