Key Concepts
msend models communication around a small set of channel-neutral resources. Every API-facing resource uses a prefixed public ID (agt_..., chn_..., cnv_..., msg_..., con_..., evt_...)—internal database IDs are never exposed.
Resource Hierarchy
Organization
├── Agent ──< Channel
│ ├── MessageTemplate (WhatsApp templates)
│ ├── InboundEvent (raw verified payloads)
│ └── Conversation ──< Participant >── Identity >── Contact
│ └── Message ──< DeliveryEvent
├── ApiKey (agent-scoped or organization-wide)
├── Event ──< WebhookDelivery
└── Consent (per identity + channel kind)Agents & Channels
- An Agent (
agt_...) represents your AI software. It owns one or more channels and defines how events are delivered (webhookorpoll). - A Channel (
chn_...) is a single connected provider account (one Email mailbox, one Slack app installation, or one WhatsApp Business phone number). Each channel belongs to exactly one agent.
Contacts & Identities
- A Contact (
con_...) represents a person or organization you communicate with. - An Identity represents one address for that contact on a specific channel kind:
(kind, scope, external_id).- For Email and WhatsApp,
scopeis empty andexternal_idis the email address or E.164 phone number. - For Slack,
scopeis the Slack team ID andexternal_idis the Slack user ID.
- For Email and WhatsApp,
- A single contact can have multiple identities (e.g., an email address and a WhatsApp number).
Conversations & Threading
- A Conversation (
cnv_...) is the stable session or thread ID that your agent should key its memory on. conversation.kindis one ofdirect,group, orchannel.thread_keydistinguishes threads within a channel (such as Slackthread_tsor email thread roots). Replying to aconversation_idautomatically routes the outbound message back to the exact thread or DM the user wrote from.
Messages & Parts
- Every Message (
msg_...) has:text: a plain-text representation, always present for LLM consumption.parts: a structured array of typed content objects (text,image,audio,video,file,location,buttons,list,template,reaction).addressed_to_agent: boolean set by the inbound adapter (truefor DMs,@mentions, or replies in a thread the agent participates in).
- In group chats or Slack channels, use
addressed_to_agent(and the channel’sreply_policy) to ensure your agent only responds when spoken to.
Last updated on