Route Kapso notification events to team destinations (shared email addresses or Slack channels).
Summary
Functions
Creates a shared email destination and sends a verification email (valid for 7 days). It receives notifications once confirmed.
Removes a destination, its routes and pending deliveries.
Deletes a route and cancels its pending deliveries.
Lists shared email and Slack channel destinations, including pending ones.
Lists the event types you can route. Use their key in upsert_route/3.
Lists routes (event type to destination), oldest first.
Routes event_key to a destination. Returns the existing route when it already exists.
Types
@type result() :: {:ok, map() | nil} | {:error, KapsoEx.Error.t()}
Functions
@spec create_email_destination(KapsoEx.Client.t(), String.t(), keyword()) :: result()
Creates a shared email destination and sends a verification email (valid for 7 days). It receives notifications once confirmed.
Options
:label- display name of the destination.
@spec delete_destination(KapsoEx.Client.t(), String.t()) :: result()
Removes a destination, its routes and pending deliveries.
@spec delete_route(KapsoEx.Client.t(), String.t()) :: result()
Deletes a route and cancels its pending deliveries.
@spec list_destinations(KapsoEx.Client.t()) :: result()
Lists shared email and Slack channel destinations, including pending ones.
@spec list_event_types(KapsoEx.Client.t()) :: result()
Lists the event types you can route. Use their key in upsert_route/3.
@spec list_routes(KapsoEx.Client.t()) :: result()
Lists routes (event type to destination), oldest first.
@spec upsert_route(KapsoEx.Client.t(), String.t(), String.t()) :: result()
Routes event_key to a destination. Returns the existing route when it already exists.