https://api.impellabs.tech/api/v1. Send Authorization: Bearer imp_... on each request. See
Authentication and Conventions. The API reference lists every field.
Who can see and change a channel
A token acts as the person who made it. Two things control access. The channel itself. By default a person sees, changes and connects their own channels. Owners and admins can manage any channel. A channel that a person may not see answers404 with Channel not found. A person who sees a
channel but may not change it gets 403 with Only its owner or an admin can change this channel. when they try.
The conversations on the channel. A channel is private to its owner until the owner shares it. Its conversations
show only to:
- the owner,
- the people and departments the channel is shared with, or everyone when it is shared that way,
- the person a conversation is assigned or handed to.
404 through the conversations routes. A channel with no sharing set
(sharing is null) shows its conversations to owners and admins as well.
Sharing never changes who the agent answers.
List channel kinds
GET /channels/kinds returns the kinds of channel this server has: kind, label, supports, window_hours,
available and connect. connect describes what the connect step needs from you for that kind.
Connect a channel
POST /channels/connect/{kind} with the fields that connect names for that kind. The fields are the credentials of
your own account at the provider. They go in and never come back in any reply. The channel starts private to the
person who connects it.
You need the right to connect channels; otherwise 403 with You cannot connect channels.
201 with { "channels": [ ... ] }: one channel object for each number or account that the connection
gave. The connect step uses your credentials with the provider. It saves the channel only when that works. A channel that is connected again keeps its owner, its agent and its sharing.
For a mailbox,
POST /channels/email/sign-in with { "provider": "gmail" } or { "provider": "outlook" } returns
{ "url" }: the page where the person signs in with their own account. POST /channels/phone/numbers lists the
numbers of a phone account for the connect step, with the account’s login fields. Nothing is kept.
GET /channels/phone/voice-options lists the voice engines, models and voices.
List and read channels
GET /channels returns an array of the channels the person may see. Filters: kind, and mine=1 for your own.
GET /channels/connections returns the same channels as a page, with kind, health (good, warning or
blocked), mine, q and sort (name, health, owner, agent), page and page_size.
GET /channels/{channel_id} returns one channel and counts: the open conversations that the agent answers and that
the team answers.
info, features, template_categories, test_phones,
unshared_takers and agent_hidden. supports and features come from the channel kind.
POST /channels/{channel_id}/verify asks the provider whether the channel still works. It needs the right to manage
the channel. DELETE /channels/{channel_id} disconnects it. The channel is archived and the reply is 204.
Choose who answers
PATCH /channels/{channel_id} with { "agent_id": "<id>" } puts one agent on the channel. It replaces the agent that
was there. Send null for nobody. You need the right to manage the channel.
counts.
Settings and sharing
PATCH /channels/{channel_id} with { "settings": { ... } } changes only the keys you send.
A change to
who, test or percent applies to new conversations. An unknown key answers 400 with
This is not a channel setting.
Sharing
sharing is { "mode": "private" | "people" | "everyone", "members": [member ids], "departments": [department ids] }.
Use members and departments with people only. people means the listed members and the members of the listed
departments. everyone means every member. A channel has no levels: a person who can read the conversations can
read them all.
403 with
Only the person who connected this channel can share it with more people.
The channel object has two hints for the owner. unshared_takers lists people that a handoff rule sends customers to
who cannot read the channel yet. agent_hidden is true when the channel is shared with people who cannot read the
agent that answers on it. They see the agent’s name and replies, never its instructions.
Templates
A template is a message that you may send when the reply window is closed. Templates belong to the account of the channel and are reviewed by the provider.GET /channels/{channel_id}/templateslists them.statusfilters by review status.POST /channels/{channel_id}/templateswith{ "name", "language", "category", "components" }sends a new template for review. Each variable needs a sample value in theexampleof its component.PATCH /channels/{channel_id}/templates/{template_id}with{ "components", "category"? }changes a template. It is reviewed again.DELETE /channels/{channel_id}/templates/{template_id}removes every language of that name. The reply is204.POST /channels/{channel_id}/templates/syncreads the templates again from the provider.POST /channels/{channel_id}/templates/mediawith a multipartfileuploads a sample image, video or PDF for a header. The reply is{ "handle" }. Put the handle in the header’sexample.header_handleas a list of one.
Profile, catalog, posts and insights
These routes depend on the channel kind. The API reference has their fields.GETandPATCH /channels/{channel_id}/profile: the business profile that customers see.GET /channels/{channel_id}/catalog,POST,PATCH,DELETE,POST .../catalog/syncandGET .../catalog/items: the catalog of a number that has one.GETandPOST /channels/{channel_id}/posts: the latest posts of an account, and one new photo post.GET /channels/{channel_id}/insights: reach and activity over the last 28 days.POST /channels/{channel_id}/test-call: a phone line calls your own number, and the channel’s agent answers, as a test. The reply is202with{ "room" }.GETandPATCH /channels/prompts: how agents talk on each kind of channel.