WhatsApp contacts of the project.
identifier may be the contact's UUID, phone number (WhatsApp ID) or
business-scoped user ID.
Summary
Functions
Creates a contact. Attributes: wa_id (required), profile_name,
display_name, customer_id, metadata.
Permanently erases a contact and all its data (conversations, messages, media). This cannot be undone.
Gets a contact.
Gets the contact's marketing preference on one number.
Lists contacts.
Lists the contact's marketing preference on each of your numbers. An empty list means the contact never opted out.
Updates a contact's profile or metadata. Attributes as in create/2.
Types
@type result() :: {:ok, map() | nil} | {:error, KapsoEx.Error.t()}
Functions
@spec create(KapsoEx.Client.t(), map() | keyword()) :: result()
Creates a contact. Attributes: wa_id (required), profile_name,
display_name, customer_id, metadata.
@spec erase(KapsoEx.Client.t(), String.t()) :: result()
Permanently erases a contact and all its data (conversations, messages, media). This cannot be undone.
@spec get(KapsoEx.Client.t(), String.t()) :: result()
Gets a contact.
@spec get_marketing_preference(KapsoEx.Client.t(), String.t(), String.t()) :: result()
Gets the contact's marketing preference on one number.
@spec list(KapsoEx.Client.t(), map() | keyword()) :: result()
Lists contacts.
Params: customer_id, customer_external_id, has_customer,
profile_name_contains, wa_id_contains, business_scoped_user_id,
created_after, created_before, and either page/per_page or
limit/before/after. Use cursors for deep pagination.
@spec list_marketing_preferences(KapsoEx.Client.t(), String.t()) :: result()
Lists the contact's marketing preference on each of your numbers. An empty list means the contact never opted out.
@spec update(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Updates a contact's profile or metadata. Attributes as in create/2.