Skip to content

joinflux/iterablectl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iterablectl

A command-line tool for interfacing with the Iterable API.

Installation

go install github.com/joinflux/iterablectl@latest

Usage

# Set your Iterable API key
export ITERABLE_API_KEY="your_api_key_here"

# Get a user with explicit API key
iterablectl users get --api-key=your_api_key_here [email protected]

# Get a user by email
iterablectl users get [email protected]

# Get a user with JSON output
iterablectl users get [email protected] --format=json

# Update a user
iterablectl users update [email protected] --data-field=firstName=John --data-field=lastName=Doe

# Update a user with a JSON file containing data fields
iterablectl users update [email protected] --data-file=user_data.json

Data File Format

When updating a user with --data-file, the JSON file should contain a flat object of data fields:

{
  "firstName": "John",
  "lastName": "Doe",
  "custom": {
    "favoriteColor": "blue"
  }
}

Available Commands

  campaigns   Manage Iterable campaigns
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  lists       Manage Iterable lists
  users       Manage Iterable users

Global Flags

  • --api-key, -k - Iterable API key (required unless ITERABLE_API_KEY environment variable is set)

License

MIT