Skip to main content
AhaSend CLI contact commands manage account-global contacts by email address or UUID.
Contacts support is still in development and has not been deployed to the API. These commands exist in the development CLI build 7a47882, but not in the published v0.2.0 binary. Wait for both API support and a CLI release containing contacts before using these examples.

Prerequisites

Authenticate with a full API key. Contact tasks need contacts:read, contacts:write, or contacts:delete, according to the action. Attribute keys must already exist in the dashboard. Creating a contact does not subscribe it to a list.

Create, Read and Update

Choose a fresh test address, then run these commands in order:
update sends only fields you supply. Set an attribute’s value to null to remove that value; use --attributes with a JSON object. Status values are enabled, disabled, and blocked.

Batch Import

Save this as contacts.json. Use fresh test addresses for each run.
contacts.json

Delete a Test Contact

The example creates the contact it deletes. Use a fresh address for the fixture.

Commands and Flags

contacts batch

contacts create

contacts delete

contacts get

No command-specific flags. See global flags.

contacts list

contacts update