There is no endpoint that accepts flow JSON. An automation in a pack is either one of DMLY’s
library automations or a copy of a published automation from one of your sub-accounts, and a
copy is always cleaned of everything that belonged to that customer or points at your own
accounts.
Endpoints
{pack} and {entry} are uuids. A pack belonging to another agency returns 404, the same as one
that doesn’t exist. None of these lists is paginated.
Copying needs a key with the copy ability
Copying from a sub-account reads that customer’s automation, every message in it included, so an ordinary agency key can’t do it.GET /packs/import/sources, GET /packs/import/preview and a
POST /packs/{pack}/entries that copies all need a key generated with Copy automations out of
sub-accounts into packs ticked, under Configuration → API in the agency console. Only a team
member who holds the Copy automations from sub-accounts into packs permission sees that box, and
keys generated before it existed don’t have it. Without it those calls return 403:
The pack object
Each entry:
Create and fill a pack
1
Create the pack
name is required (up to 120 characters); summary (up to 300), industry and
business_type are optional. Returns 201 with the pack. It is always a draft: a status
sent here is ignored.2
Add library automations
List what’s available with Returns
GET /packs/library. Each item’s id is the template_id to send:201 with the new entry. Its requires is pre-filled from the steps it uses; change
it with PATCH if it’s wrong for your customers. Library items carry the same catch_all,
ai and requires hints as entries, plus industry, industry_label, trigger_label and
channels, so you can check the rules before you add.3
Or copy one from a sub-account
This step needs a key with the copy ability.
Find what you can copy with Check it first. Nothing is saved by a preview:An empty The published version is copied, not a draft, and the copy is a snapshot: later edits in the
sub-account don’t change it.
GET /packs/import/sources, which returns each of your
sub-accounts that has at least one published flow automation:refusals means it can be copied; otherwise each string says why not. slots is what
each customer will fill in. Then copy it by sending workspace and automation instead of
template_id:4
Publish
Change a pack
PATCH /packs/{pack} takes any of name, summary, industry, business_type and status;
only the fields you send change. Send null to clear summary, industry or business_type.
It returns the updated pack.
DELETE /packs/{pack} returns {"data": {"deleted": true}}. The pack leaves every customer’s
gallery; automations customers already added stay exactly as they are. Set status to
archived instead if you might want it back.
Nothing on this page changes an automation already in a customer’s workspace. An edit only
changes what the next install gets.
Put your packs in order
PUT /packs/order sets the order of your packs. It is the order customers see them in their
gallery (yours always come before DMLY’s), and when two of your published packs share a
business_type, a new customer of that type is given the higher one.
Change an automation in a pack
PATCH /packs/{pack}/entries/{entry} takes any of:
It returns the updated entry.
DELETE /packs/{pack}/entries/{entry} removes it:
draft, and
unpublished says so.
PUT /packs/{pack}/entries/order sets the order customers read:
422. It returns the pack.
Show customers only your packs
replace_platform: false (the default) shows customers your published packs first, then DMLY’s.
true shows only yours, and a new customer is only ever given one of yours: the pack for their
business_type, else your other pack, else none. It takes effect once you have at least one
published pack, so turning it on early never leaves customers with nothing. See
Give a pack to new customers.
GET /packs/visibility reads it, and GET /packs returns it too, in meta:
Accepted values
Errors
A refused change returns422 with the reason under the field it concerns, in the usual shape:
403 on the copy endpoints means the key lacks the
copy ability. 404 comes back as Pack not found.,
Automation not found in this pack., Sub-account not found. (a workspace that isn’t yours) or
Automation not found. Authentication errors and the rate limit are the same as everywhere else on
the Agency API; see Authentication.
