Skip to main content
AhaSend CLI sub-account commands let Platform Partners manage child accounts and their API keys from a parent account.
Sub-account creation is currently blocked by a CLI/API mismatch: the CLI requires a full website URL, while the API requires a bare domain. Wait for a compatible CLI/API release before running the create-first workflow below. The remaining management commands work with an existing sub-account; you can create one through the API.

Prerequisites

Use a full parent-account API key with the matching sub-account scopes. Sub-accounts are available to Platform Partners; contact sales about access. The shell examples need Bash and jq.

Create and Manage a Test Sub-Account

After the creation issue above is fixed, save the following three examples in one Bash script. The script stops if creation fails, and only updates or deletes the test account it creates.
Usage allocated_cost is a proportional share of the parent’s pooled invoice, not standalone pricing. A monthly credit of 0 means no cap.

Manage a Test Sub-Account API Key

Continue with the sub-account created above. Store the one-time secret_key securely if an application needs it; this test keeps only the key ID.

Delete the Test Sub-Account

After the preceding create-first workflow, remove only its test account:
Deletion removes the sub-account from list results. Current billing-period usage still belongs to the parent invoice.

Commands and Flags

subaccounts api-keys create

subaccounts api-keys delete

subaccounts api-keys get

No command-specific flags. See global flags.

subaccounts api-keys list

subaccounts api-keys update

subaccounts create

subaccounts delete

subaccounts get

No command-specific flags. See global flags.

subaccounts list

subaccounts suspend

subaccounts unsuspend

No command-specific flags. See global flags.

subaccounts update

subaccounts usage

No command-specific flags. See global flags.