Skip to main content

skrybe lists

Subscriber lists for the current brand, and their custom fields.

List IDs are the encrypted strings skrybe lists prints (for example l7763lkC1Ld892Ty4p3pvxw), not the integer in the web app's URL.

CommandDescription
listsShow the lists
lists countActive subscriber count for one list
lists getOne list, with subscribers counted by state
lists createCreate a list
lists updateRename a list or change its opt-in
lists deleteDelete a list and its subscribers
lists fieldsShow a list's custom fields
lists fields addAdd a custom field
lists fields renameRename a custom field
lists fields deleteDelete a custom field

lists​

skrybe lists [--include-hidden] [--counts]
skrybe lists ls [--include-hidden] [--counts]

Shows the lists for the brand the API key belongs to. ls and list are aliases for the bare command.

FlagDescription
--include-hiddenInclude lists hidden in the web app
--countsAdd an ACTIVE column with each list's active subscriber count. Makes one extra request per list
skrybe lists --counts
ID                       NAME         ACTIVE
l7763lkC1Ld892Ty4p3pvxw Newsletter 1,204
3t8NqP0wKqv7X1v892bVZQ Customers 318

With --counts, a list whose count cannot be read shows - (or null in JSON), never 0, and a warning on stderr says how many counts failed. JSON rows then carry an active_subscribers field.

With no lists, the command exits 0 and prints a note to stderr.

API: api/lists/get-lists.php; with --counts, also api/subscribers/active-subscriber-count.php per list.

lists count​

skrybe lists count <list-id>

Prints the number of active subscribers on one list. Under table and text it prints the bare number, so it can be captured:

ACTIVE=$(skrybe lists count l7763lkC1Ld892Ty4p3pvxw)

Under --output json: {"list_id": "...", "active_subscribers": 1204}.

API: api/subscribers/active-subscriber-count.php

lists get​

skrybe lists get <list-id>

Shows one list: its name, opt-in mode, how many subscribers are in each state (active, unconfirmed, unsubscribed, bounced, complained), and its custom fields.

ID             l7763lkC1Ld892Ty4p3pvxw
Name Newsletter
Opt-in double
Active 1,204
Unconfirmed 37
Unsubscribed 88
Bounced 12
Complained 1
Custom fields City (text), Birthday (date)

API: api/lists/get-list.php

lists create​

skrybe lists create <name> [--opt-in single|double]

Creates a list. Under table, a confirmation goes to stderr and the new list's ID goes to stdout, so a script can capture it. Under json and text, the new list's record is printed instead.

FlagDescription
--opt-in <mode>single, or double to email a confirmation link before a subscriber becomes active. If left out, the API's default applies
LIST=$(skrybe lists create 'Beta testers' --opt-in double)

A list name can be at most 100 characters.

API: api/lists/create.php

lists update​

skrybe lists update <list-id> [--name <name>] [--opt-in single|double]

Renames a list, switches its opt-in mode, or both. At least one flag is required.

FlagDescription
--name <name>New name
--opt-in <mode>single or double
skrybe lists update l7763lkC1Ld892Ty4p3pvxw --name 'Monthly newsletter'

API: api/lists/update-list.php

lists delete​

skrybe lists delete <list-id> [--yes]
skrybe lists rm <list-id> [--yes]

Deletes a list and all its subscribers. This cannot be undone.

At a terminal it fetches the list and asks:

Delete list "Newsletter" and its 1,342 subscribers? This cannot be undone. [y/N]

From a script it refuses unless you pass --yes.

FlagDescription
-y, --yesDelete without asking. Required when stdin is not a terminal

A list used by a scheduled or sending campaign cannot be deleted (list_in_use). Unschedule the campaign, or wait for it to finish.

Under --output json: {"outcome": "deleted", "list_id": "..."}.

API: api/lists/delete.php

lists fields​

skrybe lists fields <list-id>

Shows a list's custom fields, with the personalization tag to use in an email.

NAME      TYPE  TAG
City text [City,fallback=]
Birthday date [Birthday,fallback=]

API: api/lists/get-list.php

lists fields add​

skrybe lists fields add <list-id> <name> [--type text|date]

Adds a custom field. Every existing subscriber gets an empty value for it.

FlagDescription
--type <type>text (default) or date

Field names are case-insensitive, can be up to 100 characters, and cannot contain : % [ ] , " < or >. name and email are built in and cannot be added.

skrybe lists fields add l7763lkC1Ld892Ty4p3pvxw Birthday --type date

Under json and text, prints the list's fields after the change.

API: api/lists/add-custom-field.php

lists fields rename​

skrybe lists fields rename <list-id> <name> <new-name>

Renames a custom field and keeps its values. Autoresponders and segments that use the field are updated to the new name. [Name,fallback=] tags already written into campaigns and templates are not changed.

skrybe lists fields rename l7763lkC1Ld892Ty4p3pvxw City Town

API: api/lists/rename-custom-field.php

lists fields delete​

skrybe lists fields delete <list-id> <name> [--yes]
skrybe lists fields rm <list-id> <name> [--yes]

Deletes a custom field and every subscriber's value for it. Asks first at a terminal; needs --yes from a script.

FlagDescription
-y, --yesDelete without asking. Required when stdin is not a terminal

A field used by an autoresponder or a segment cannot be deleted (field_in_use). Change those in the web app first.

API: api/lists/delete-custom-field.php