Go
package main import ( "context" "fmt" "log" "github.com/AhaSend/ahasend-go/api" ) func main() { // Create API client with authentication client := api.NewAPIClient( api.WithAPIKey("aha-sk-your-64-character-key"), ) // Create context for the API call ctx := context.Background() // Call the ping endpoint response, httpResp, err := client.UtilityAPI.Ping(ctx) if err != nil { log.Fatalf("Error pinging API: %v", err) } // Check response if httpResp.StatusCode == 200 { fmt.Printf("✅ Ping successful! Status: %d\n", httpResp.StatusCode) if response != nil && response.Message != "" { fmt.Printf("Response: %s\n", response.Message) } } else { fmt.Printf("❌ Unexpected status code: %d\n", httpResp.StatusCode) } }
{ "message": "pong" }
Health check endpoint for testing API connectivity and authentication
API key for authentication
Pong response
The response is of type object.
object
Was this page helpful?