NOTEThis feature is currently in Public Beta and is under active development. Please note that the API may change and that this feature is not covered under the Enterprise SLA.
- Send messages from the command line to users, lists, or audiences
- Track events to trigger your Courier Automations
- Push & pull industry-standard translation files for internationalizing your content
Installing the Courier CLI
From the command-line, use the following command to install the Courier CLI and set your API key:Requirements
- Courier CLI has only been tested on node.js v18+
Authenticate the CLI
The fastest way to get started is to run:COURIER_API_KEY. It will load that key from the first location it finds in the following list:
- A
.courierfile in the current working directory ~/.courier(in your home directory)- A
COURIER_API_KEYvalue otherwise set in your environment (such as via~/.profileor~/.zshrc)
Commands
courier config– Set your Courier API keycourier whoami– Display the currently authenticated workspacecourier send- Send a notification to a user, list, or audiencecourier track- Send a track event to trigger a Courier Automationscourier users:get- Fetch the data for a given user IDcourier users:set- Overwrite a user’s profile with the provided datacourier digests:flush– Flush any currently queued events for a given user + digestcourier translations:upload- Upload .PO files to your Courier workspacecourier translations:download- Download .PO files from your Courier workspace
courier to see a list of commands and their arguments & options.