Ingestion API
You can send alerts to AlertHub from any system using our universal Ingestion API. This is the core mechanism for sending data to AlertHub.
Prefer email? You can also send alerts by email — no HTTP requests required.
Endpoint
POST https://api.thealerthub.com/sendAlert
Parameters
You can pass parameters via JSON body or Query Parameters (URL).
Core Parameters
These are the reserved fields used by AlertHub logic:
ah_key: (Required) Your Project Secret Key.ah_title: (Required) Brief summary of the event.ah_description: (Optional) Detailed context.ah_level: One ofinfo,warning,critical. Defaults toinfo.ah_source: (Optional) Source identifier (e.g. “Stripe”, “AWS”).
Parameter Priority
You can mix and match methods. For example, you can put the ah_key in the URL (so it’s easier to verify) and the rest of the data in the JSON body.
Note: If a parameter is present in both the URL and the Body, the Body (POST) value takes precedence.
Custom Variables
Any other field you send that is NOT one of the ah_* core parameters will be treated as a Custom Variable.
- These Custom Variables can be displayed in the alert title or description using mustache syntax (e.g.
{{user_id}}). - They are useful for debugging (e.g.
user_id,transaction_amount,error_code). - You can send deeply nested JSON objects as custom variables, and they will be rendered using the mustache syntax. For example,
{{user.name}}.
Webhook Builder
We have created a dedicated tool to help you generate and test your Webhook URLs easily.
Open Webhook Customizer & Builder
Examples
1. Mixed Usage (Key in URL, Data in Body)
This is a common pattern to keep the body clean or when using systems where the URL is easier to configure for secrets.
curl -X POST 'https://api.thealerthub.com/sendAlert?ah_key=YOUR_PROJECT_KEY&ah_source=MyServer' \
-H 'Content-Type: application/json' \
-d '{
"ah_title": "Disk Space Low",
"ah_level": "warning",
"ah_description": "Disk usage is {{disk_usage}} on {{mount_point}}",
"disk_usage": "95%",
"mount_point": "/var/log"
}'
In this example:
ah_keyandah_sourcecome from the URL.disk_usageandmount_pointare Custom Variables.
2. Full JSON Request
curl -X POST 'https://api.thealerthub.com/sendAlert' \
-H 'Content-Type: application/json' \
-d '{
"ah_key": "YOUR_PROJECT_KEY",
"ah_title": "Payment Failed",
"ah_description": "Payment failed for customer {{customer.id}}",
"ah_level": "critical",
"ah_source": "Stripe",
"customer": {
"id": "cus_123",
"email": "[email protected]"
},
"amount": 4900,
"currency": "usd"
}'