def cli(obj, origin, tags, timeout, customer, delete):
    """Send or delete a heartbeat."""
    client = obj['client']
    if delete:
        client.delete_heartbeat(delete)
    else:
        try:
            heartbeat = client.heartbeat(origin=origin, tags=tags, timeout=timeout, customer=customer)
        except Exception as e:
            click.echo('ERROR: {}'.format(e))
            sys.exit(1)
        click.echo(heartbeat.id)
Send or delete a heartbeat.