Skip to main content
Use AhaSend CLI ping to check your API connection and API key; this page covers its options and results. Before running the examples, log in, or pass an API key with the global flags: replace YOUR_API_KEY and YOUR_ACCOUNT_ID with your API key and the ID of its account.

Overview

The ping command sends a ping request to the AhaSend API, which checks that:
  • The API can be reached
  • The API accepts the API key, from this IP address
The API answers a ping before it looks at the account. So ping does not check that the key belongs to the account ID, or what the key may do. Run ahasend auth status for that.

Basic Usage

Output

Table and plain output print the API’s message:
--output json prints the API’s response body unchanged:
CSV output has a message column and one row.

Exit Codes

ping uses the CLI’s exit codes:
  • 0: The API accepts the key.
  • 2: The API rejected the key.
  • 6: The API refused the key with HTTP 403 because the key’s IP allow list leaves out this IP address.
  • 7: The API cannot be reached.

Command Flags

This command has no command-specific flags. It accepts the global flags.

Next Steps