Saltar al contenido principal

Mensajería: una acción

La mensajería es una acción activada por un cambio en el estado de usuario (dentro del producto o saliente), en lugar de un CSV obsoleto exportado de otra herramienta.

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
  • Mensajes activados en el momento en que cambia el estado, no según un calendario de importación
  • Dentro del producto y saliente desde un solo motor
  • Las audiencias son cohortes en vivo, nunca listas congeladas

Cómo funciona

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.

Dónde acceder

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

Ejemplo

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.