Dynamic segments — a saved filter over the team's contacts. A MillionSend
extension with no Resend equivalent. get/2 returns a live contact_count.
MillionSend.Segments.create(%{
name: "Pro plan",
filter: %{match: :all, conditions: [%{field: "property:plan", op: "equals", value: "pro"}]}
})
Summary
Functions
POST /segments
GET /segments/:id
GET /segments — accepts limit:, after:, before:.
DELETE /segments/:id
PATCH /segments/:id
Functions
@spec create(MillionSend.Client.t(), map()) :: {:ok, MillionSend.Segments.Segment.t()} | {:error, MillionSend.Error.t()}
POST /segments
@spec get(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.Segments.Segment.t()} | {:error, MillionSend.Error.t()}
GET /segments/:id
GET /segments — accepts limit:, after:, before:.
@spec list(MillionSend.Client.t() | keyword()) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec list( MillionSend.Client.t(), keyword() ) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec remove(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.Segments.Segment.t()} | {:error, MillionSend.Error.t()}
DELETE /segments/:id
@spec update(MillionSend.Client.t(), String.t(), map()) :: {:ok, MillionSend.Segments.Segment.t()} | {:error, MillionSend.Error.t()}
PATCH /segments/:id