Setup links are hosted onboarding pages where a customer connects their WhatsApp number. See Create and configure.
Summary
Types
@type result() :: {:ok, map()} | {:error, KapsoEx.Error.t()}
Functions
@spec create(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Creates a setup link. The response data.url is the page to send to the
customer.
Attributes include success_redirect_url, failure_redirect_url,
allowed_origins, allowed_connection_types, provision_phone_number,
phone_number_area_code, phone_number_country_isos,
meta_billing_mode, theme_config, reconnect_phone_number and
language.
SetupLinks.create(client, customer_id, %{
success_redirect_url: "https://app.example.com/whatsapp/connected",
language: "es"
})
@spec list(KapsoEx.Client.t(), String.t(), map() | keyword()) :: result()
Lists a customer's setup links, most recent first.
Params: status, created_after, created_before, page, per_page.
Updates a setup link. Besides the create/3 attributes, accepts
expires_at and status (for example "revoked").