# 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}

## Frequently Asked Questions

### How do I connect this workflow to my local agent like OpenClaw or Claude Code?

You can install the local MCP server by opening a terminal and running:

```
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

This will connect you to local agents like Claude Code, Windsurf, Grok Build, Cursor, etc.

Alternatively you can connect to the hosted version with this config block, no installation required:

```
{
  "mcpServers": {
    "agentpmt": {
      "type": "streamable-http",
      "url": "https://api.agentpmt.com/mcp",
      "headers": {
        "Authorization": "Bearer <AGENTPMT_BEARER_TOKEN>",
        "x-instance-metadata": "{\"client\":\"generic-mcp\",\"platform\":\"remote\"}"
      }
    }
  }
}
```

[View MCP Connection Instructions](/docs/mcp-reference/connection) for more details.

### How do I trigger this workflow?

You can use it here in the browser by clicking the 'Try It' button.

If you 'star' the workflow it will save to your dashboard for quick access.

To use the workflow in an external agent, make sure you have followed the steps to connect it to the MCP server and then copy / paste this prompt, or just tell it to use the AgentPMT MCP server and use this workflow.

> Call the AgentPMT-Workflow-Skills tool with action 'get\_workflow\_skill' and skill\_id 6986c376e5ef844627d49d69 ("API Healthcheck (JSON) -> Discord Alert").