# API Healthcheck (JSON) -> Discord Alert

> Ping a JSON API endpoint, validate status + JSON syntax, and post a concise health report (or alert) to Discord.

Content type: workflow
Source URL: https://www.agentpmt.com/agent-workflow-skills/api-healthcheck-json-discord-alert
Markdown URL: https://www.agentpmt.com/api/agent/workflows/api-healthcheck-json-discord-alert?format=agent-md
Updated: 2026-03-27T04:00:17.411Z
Author: firef1ie

---

Estimated time saved: 25 minutes.

## Tools

- Webhook - HTTP Request
- Data Format Validation
- Post On Discord Channel

## Workflow Outline

1. Collect Endpoint + Expectations: Collect: URL, method (default GET), auth (none/bearer/basic/header), expected HTTP status (default 200), timeout, and what "healthy" means (required JSON keys, regex, or specific fields). Also collect Discord webhook_ur...
2. Webhook - HTTP Request: Call the endpoint. If auth needed, set auth_type and token/headers. Use response_mode=json when possible. Keep max_response_bytes reasonable (<=1MB unless needed).
3. Data Format Validation (JSON Syntax): Validate the response body is valid JSON (or capture the parse error). If the endpoint is not expected to return JSON, skip this check and focus on status + headers.
4. Decide Pass/Fail + Write Alert: Evaluate: status code, latency (if available), and JSON validity + required keys. Produce: (1) PASS/FAIL line, (2) key metrics, (3) suspected cause, (4) next action. If FAIL, keep the alert under ~1200 chars.
5. Post On Discord Channel: Post the PASS/FAIL report to the provided webhook_url. Use a stable username like 'API Healthcheck'. Use discord URL {INSERT URL HERE}