Query conversations across the project, close or reopen them, and assign them to team members.
Summary
Functions
Assigns a conversation to a team member. Attributes: user_id
(required), notes. Only one active assignment is allowed.
Gets a conversation.
Gets an assignment.
Lists conversations, latest activity first, with cursor pagination.
Lists a conversation's assignments, most recent first. Params: page, per_page.
Updates an assignment: change notes, reassign with user_id, or
unassign with active: false.
Closes ("ended") or reopens ("active") a conversation.
Types
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
Functions
@spec create_assignment(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Assigns a conversation to a team member. Attributes: user_id
(required), notes. Only one active assignment is allowed.
@spec get(KapsoEx.Client.t(), String.t()) :: result()
Gets a conversation.
@spec get_assignment(KapsoEx.Client.t(), String.t(), String.t()) :: result()
Gets an assignment.
@spec list(KapsoEx.Client.t(), map() | keyword()) :: result()
Lists conversations, latest activity first, with cursor pagination.
Params: phone_number_id, phone_number, status, assigned_user_id,
unassigned, created_after, created_before, last_active_after,
last_active_before, limit, before, after.
@spec list_assignments(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists a conversation's assignments, most recent first. Params: page, per_page.
Updates an assignment: change notes, reassign with user_id, or
unassign with active: false.
@spec update_status(KapsoEx.Client.t(), String.t(), String.t()) :: result()
Closes ("ended") or reopens ("active") a conversation.