Who can do what
- Every member sees the campaigns of the workspace and can change them. A member sees only the contacts that member may see, in the members, the audience and the recipients.
- Only the owner of a campaign, an owner or an admin can archive it.
- A member can create, send or change a broadcast only on a channel that the member owns. An owner or an admin can do
it on any channel. Other members get a
403withOnly the owner of this channel or an admin can send on it. - A campaign that a provider owns changes only its
status,goalanddescriptionhere.
page, page_size (1 to 100, default 20), sort, order
and q. The reply is {results, count, page, page_size, pages}. A sort or filter key the call does not list
returns 400.
Create a campaign
201.
A source
kind is segment, meta_form, meta_campaign, utm_campaign, website_form or whatsapp_ad. A
segment uses a filter and fills the campaign with the contacts that match. The other kinds match a lead by
value. A lead source adds a person to every active campaign that has a matching source. See
forms and leads. Setting sources in a PATCH replaces the list. Switching a campaign to
active fills it from its segments.
The audience filter takes these keys: group, ungrouped, deliverable, tags, fields, channel,
reachable, owner, campaign, contact_ids, created_after, created_before, active_days, stage,
source, agent, opted_in, not_messaged_days, broadcast, reaction and exclude_ids. An unknown key
returns 400.
Members
A member has the status
member, responded, converted or removed. A removed member comes back with the status
member. Only a member who has not converted can be marked as responded. A contact that opted out is skipped
when you run a workflow. The run reply is {"started": n}. When the workflow is off or has problems, the reply is
400 with detail and problems.
ImpelLabs raises campaign.member_joined, campaign.member_responded and campaign.member_converted for these
changes. See event types.
Build an audience
The file call takes
multipart/form-data with a file (CSV or .xlsx) and an optional channel. The first row
names the columns: name, and phone or email. The file can be 1 MB and up to 1000 rows. Use the contacts import
for more. Each row finds a contact by phone or email, or makes one that you own. The reply is
{"contact_ids": [...], "added": n, "found": n, "skipped": [{"line": 2, "reason": "..."}]}. Put contact_ids in
the audience of a broadcast.
A broadcast message can hold blanks that ImpelLabs fills with a detail of each contact. Read
GET /api/v1/campaigns/variables for the details a message can use, and
POST /api/v1/campaigns/variables/values with {"contact_id": "...", "refs": [...]} to preview them.
Send a broadcast
201. Without "send": true the broadcast is a draft. Its status is
draft, scheduled, sending, paused, sent, failed or cancelled.
A broadcast that has started cannot change. A draft or a scheduled broadcast can be changed with
PATCH or removed
with DELETE. A started broadcast returns 409: stop it instead.
Starting a broadcast fails with a sentence when the channel is not connected, when nobody in the audience can be
messaged, or when your credits do not cover everyone. A send that the rules block returns
400 with detail and
check. A recipient has the status queued, sent, delivered, read, replied, failed or skipped. A
status only moves forward. A failed or skipped recipient carries error and sometimes the provider error_code.
The broadcast stats count the recipients by what happened, and add clicked and opted_out.
Email broadcasts: opens, clicks and unsubscribe
These behaviours apply to a broadcast that sends email.- Audience. The audience keeps only people who have an email address that is not blocked. An address is blocked after a hard bounce, a complaint or an unsubscribe. When the workspace requires consent for email, a promotional email goes only to people who opted in.
- Opens. Each email has a one-pixel picture. When a mail app loads it, the recipient gets a
readtime. Some mail apps hold pictures back, so a missing open does not mean the person did not read the email. - Clicks. Each link in the email points to an ImpelLabs address that holds a signed token. A follow of the link
marks the recipient as
readandclicked, then sends the person to the original link. A token that is not valid returns404. The token names the link, so nobody can use it to reach another address. The unsubscribe link is not changed. - Your own pages. A link to a form page or a booking page of your workspace carries the broadcast id. A person who answers the form or books a time joins the campaign of the broadcast and counts as a click.
- Unsubscribe. Every promotional email has a footer link and the
List-Unsubscribeheaders with one-click support. The link opens a page that asks the person to confirm. A confirmed unsubscribe from a mailbox stops the marketing email from that mailbox to that address. Other mailboxes of the workspace can still send. When the rotation has other mailboxes, the broadcast sends from one the person did not leave. A recipient who left every mailbox of the broadcast isskippedwith the errorUnsubscribed from these mailboxes.A link without a mailbox stops the email of the whole workspace, withdraws the email consent and marks the contact as do not contact. A note goes on the contact timeline. - Report. The broadcast
statsof an email broadcast addbounced,complainedandunsubscribed. The listreasonsgroups the failed and skipped recipients by error.