Hogsend
CLI Reference

hogsend contacts

List, inspect, create, update, and delete contacts and their email preferences.

Usage

hogsend contacts <subcommand> [args] [flags]

Manage contacts through the admin API. All subcommands require a valid api_key in .hogsend.yaml.

Subcommands

list

List all contacts with a formatted table.

hogsend contacts list [--search <query>]
FlagShortDescription
--search-sFilter by email or external ID

Displays up to 50 contacts per page with external ID, email, last seen date, and property count.

get

Show full details for a single contact.

hogsend contacts get <id>

Displays the contact's internal ID, external ID, email, first/last seen timestamps, properties (as formatted JSON), and email preferences (unsubscribe status, suppression state, bounce count, category subscriptions).

create

Create a new contact via an interactive form.

hogsend contacts create

The form prompts for:

  • External ID (required) -- the unique identifier, typically the PostHog distinct_id
  • Email (optional) -- the contact's email address
  • Properties (optional) -- a JSON object of arbitrary properties

update

Update an existing contact via an interactive form.

hogsend contacts update <id>

Fetches the current contact first, then prompts for:

  • Email -- leave blank to keep the current value
  • Properties -- a JSON object that will be merged with existing properties

delete

Permanently delete a contact and all associated email preferences.

hogsend contacts delete <id>

Shows the contact's external ID and email, then asks for confirmation before deleting.

unsub

Toggle the global unsubscribe flag for a contact.

hogsend contacts unsub <id>

Fetches the current subscription state and offers to flip it. If the contact is currently subscribed, this unsubscribes them (and vice versa). Uses the preferences API under the hood.

prefs

View email preferences for a contact.

hogsend contacts prefs <id>

Displays:

  • Global unsubscribe status
  • Suppressed status (set automatically on hard bounces)
  • Bounce count
  • Category subscriptions (if any categories are configured)

If no preferences exist, the contact is fully subscribed by default.

Examples

# Search for a contact by email
hogsend contacts list --search [email protected]

# View full details
hogsend contacts get user_abc123

# Create a contact
hogsend contacts create

# Update email address
hogsend contacts update user_abc123

# Unsubscribe a contact
hogsend contacts unsub user_abc123

# Check preferences
hogsend contacts prefs user_abc123

# Delete a contact
hogsend contacts delete user_abc123

On this page