Skip to content
Shortcut: /, ⌘K or Ctrl+K

polymorfa audience

Manage campaign audiences and their members.

Polymorfa CLI · CLI API requests

View as Markdown

polymorfa audience create

Create an audience. --csv reads a spreadsheet and sends up to 1000 members inline; --file-id imports a file already uploaded through the API.

Usage

polymorfa audience create [flags]

Examples

polymorfa audience create --name "August launch" --csv contacts.csv --variable firstName="First name"
polymorfa audience create --name "August launch" --file-id upload_1 --mapping mapping.json

Flags

  • --csv <value>takes a value

    Read members from this spreadsheet and send them inline.

  • --file-id <value>takes a value

    Storage ID of a file already uploaded through the API. Requires --mapping.

  • --idempotency-key <value>takes a value

    Send this Idempotency-Key header. None is generated when omitted.

  • --mapping <value>takes a value

    Read the column mapping JSON ({"phone": "...", "variables": {...}}) from a file or stdin (-).

  • --name <value>takes a valuerequired

    Audience name.

  • --phone-column <value>takes a value

    Header naming the phone column. Defaults to phone.

  • --variable <value>takes a valuerepeatable

    Map a template variable to a column, as name=column. Repeatable; quote a column name that contains spaces.

Also accepts the global flags.

polymorfa audience members add

Add up to 1000 members to an audience. Repeated phone numbers are skipped and invalid entries are reported, not added.

Usage

polymorfa audience members add AUDIENCE [flags]

Example

polymorfa audience members add 018f0000-0000-7000-8000-000000000001 --csv contacts.csv

Arguments

  • AUDIENCErequired

    Audience ID.

Flags

  • --csv <value>takes a value

    Read members from this spreadsheet and send them inline.

  • --idempotency-key <value>takes a value

    Send this Idempotency-Key header. The API does not replay appends, so the request is sent once and not retried.

  • --input <value>takes a value

    Read a JSON array of {phone, variables} from a file or stdin (-).

  • --phone-column <value>takes a value

    Header naming the phone column. Defaults to phone.

  • --variable <value>takes a valuerepeatable

    Map a template variable to a column, as name=column. Repeatable; quote a column name that contains spaces.

Also accepts the global flags.

polymorfa audience members list

List one page of an audience’s members.

Usage

polymorfa audience members list AUDIENCE [flags]

Arguments

  • AUDIENCErequired

    Audience ID.

Flags

  • --cursor <value>takes a value

    Continue from this opaque cursor.

  • --limit <value>takes a value

    Request this many members. The API defaults to 25.

Also accepts the global flags.

polymorfa audience members remove

Remove one member from an audience.

Usage

polymorfa audience members remove AUDIENCE PHONE [flags]

Arguments

  • AUDIENCErequired

    Audience ID.

  • PHONErequired

    Member phone number in international format.

Flags

Also accepts the global flags.