Skip to main content
Version: 1.2

Alert API Troubleshooting

Common Issues​

401 Unauthorized​

Problem: API key is missing, invalid, or expired.

Solution:

  1. Check the Authorization header format: Authorization: Key YOUR_API_KEY
  2. Verify the API key hasn't expired
  3. Ensure the key has the required permissions
# Test if key is valid
curl -H "Authorization: Key YOUR_API_KEY" \
http://your-tobealert.com:9000/api/keys/me

400 Bad Request​

Problem: Invalid request data or missing required fields.

Common causes:

  • Missing required fields (alert_id, event, environment, severity, text)
  • Invalid severity level
  • Malformed JSON
  • Field validation errors

Example error response:

{
"status": "error",
"message": "Validation failed",
"errors": [
{
"field": "severity",
"message": "Must be one of: critical, major, minor, warning, etc."
}
]
}

Solution:

  1. Check all required fields are present
  2. Verify severity is a valid level
  3. Validate JSON syntax
  4. Check field length limits

Problem: URLs in attributes are not clickable in the UI.

Solution: Ensure URLs start with http:// or https://:

"attributes": {
"dashboard": "https://grafana.example.com/d/abc123", // ✓ Clickable
"dashboard": "grafana.example.com/d/abc123" // ✗ Not clickable
}

Tagged Values Not Showing​

Problem: Tagged values not displaying with colored badges.

Solution: Use the correct format value#tag:

"attributes": {
"status": "degraded#critical", // ✓ Shows as colored badge
"components": ["db#critical", "cache#warning"] // ✓ Array with tags
}