Eldric Docs 5.0.198 ← eldric.ai
Guides

Messaging

Guide · Administrators and users · Applies to 5.0.192

Eldric can send and receive messages for you: e-mail, Telegram, Matrix, and sending SMS and WhatsApp messages. From 5.0.185 it keeps the messages, so they can be read back, searched and deleted, and a reply can wait for someone's approval before it goes out. This page says what works today and what does not yet.

What works

ProtocolSendReceive
E-mailSMTPIMAP, fetched on demand
Telegramyesfetched on demand
Matrixyesfetched on demand; no end-to-end encryption, so do not use it for encrypted rooms
SMS (Twilio)yesnot yet
WhatsApp Businessplain textnot yet

Signal, Teams, XMPP, voice calls (SIP), Discord, Slack, Mastodon, RCS and IRC are not available: an account for one of them is refused with 422 protocol_not_available, which lists the protocols that are. GET /api/v1/comm/protocols shows the current list. Each protocol also needs its feature in your licence (comm.protocol.<name>; e-mail is included without a licence).

Accounts

  • Add an account with POST /api/v1/comm/accounts or in the admin console. It belongs to your tenant.
  • An account is personal or shared. A personal account is visible only to its owner (administrators see that it exists). A shared account is visible to the tenant. WhatsApp accounts are personal by default, all others shared.
  • PUT /api/v1/comm/accounts/<id> changes an account, DELETE removes it, and POST …/<id>/test checks the connection.

Where passwords are kept

Instead of the password itself, an account can name an environment variable that holds it (cred_env); the value then stays in the node's environment file.

Stored messages

  • GET /api/v1/comm/conversations lists conversations, newest first; …/conversations/<id>/messages lists a conversation's messages.
  • GET /api/v1/comm/messages/<id> reads one message; POST …/<id>/read marks it read for you.
  • DELETE /api/v1/comm/messages/<id> deletes it: on a personal account only its owner may, on a shared account an administrator.
  • Who sees what: messages of a personal account are readable in full only by its owner; administrators see who wrote to whom and when, but not the subject or text. Messages of a shared account are readable by the tenant.
  • Keeping messages for a set time: set retention_days on the account (0 keeps them, up to 36500). Older messages are erased once a day.

POST /api/v1/comm/search with {"query": "…"} finds stored messages that contain every word of the query, in any letter case; a word also matches inside a longer word. It searches only messages you may read, the newest 2000 at most, and says when it stopped there. A search by meaning is not built yet.

Replies that need approval

Instead of sending straight away, a message can be written as a draft that someone allowed must approve:

  1. POST /api/v1/comm/drafts with account_id, to, subject and body creates the draft. Nothing is sent.
  2. GET /api/v1/comm/ai/queue lists the drafts you may decide.
  3. POST /api/v1/comm/ai/queue/<id>/approve sends it; …/reject discards it.

On a personal account only the owner decides. On a shared account a developer or an administrator decides.

Not built yet

  • Replying to, forwarding or moving a stored message by its id (/messages/<id>/reply answers 501). Send a new message or a draft instead.
  • Receiving SMS, WhatsApp Business and Teams messages: their webhook addresses answer 501, and nothing is stored.
  • Voice calls and voicemail: the call routes answer 501, and the call and voicemail lists are empty.
  • Copies to Cc and Bcc on a draft.