The tenant API under /api/v1, authenticated with the tenant API key
(x-api-key). For bots, CRMs and other backends.
Summary
Functions
Closes a conversation.
A conversation with its participant.
A conversation's activities after a watermark, oldest first. Options: :watermark
(the integer seq or a legacy opaque string, sent as is), :limit.
The tenant's conversations, newest first.
Posts an activity (for example a bot reply with sender: "bot").
Reopens a conversation.
Types
@type result(t) :: {:ok, t} | {:error, ConvergerClient.Error.t() | Exception.t()}
Functions
@spec close_conversation(ConvergerClient.t(), String.t()) :: result(ConvergerClient.Conversation.t())
Closes a conversation.
@spec get_conversation(ConvergerClient.t(), String.t()) :: result(ConvergerClient.Conversation.t())
A conversation with its participant.
@spec list_activities(ConvergerClient.t(), String.t(), keyword()) :: result(ConvergerClient.ActivityPage.t())
A conversation's activities after a watermark, oldest first. Options: :watermark
(the integer seq or a legacy opaque string, sent as is), :limit.
@spec list_conversations(ConvergerClient.t(), keyword()) :: result(ConvergerClient.Page.t())
The tenant's conversations, newest first.
Options: :limit, :cursor, :status, :channel_id, :external_id.
@spec post_activity(ConvergerClient.t(), String.t(), map() | keyword(), keyword()) :: result(ConvergerClient.Activity.t())
Posts an activity (for example a bot reply with sender: "bot").
attrs (map or keyword): :type, :sender, :text, :attachments,
:metadata, :reply_to_id. Options: :idempotency_key.
@spec reopen_conversation(ConvergerClient.t(), String.t()) :: result(ConvergerClient.Conversation.t())
Reopens a conversation.