# Webhook - HTTP Request

## Links

- Product page URL: https://www.agentpmt.com/marketplace/webhook-http-request
- Product markdown URL: https://www.agentpmt.com/marketplace/webhook-http-request?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/webhook-http-request?format=agent-json

## Overview

- Product ID: 695c37c5767df5adfd9bc873
- Vendor: Apoth3osis
- Type: core utility
- Unit type: request
- Price: 500 credits
- Categories: Developer Tools, Network Protocols, IoT & Automation, File Transfer & Remote Access, System Administration, Automation, Network & URL Utilities
- Generated at: 2026-05-30T20:13:48.057Z

### Page Description

A flexible and secure HTTP client designed for agent-driven API integrations and web service interactions. This function supports all standard HTTP methods including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS, enabling comprehensive RESTful API communication. Users can configure requests with custom headers, query parameters, and request bodies in JSON, plain text, or base64-encoded binary formats. The tool provides four authentication modes: none for public endpoints, basic for username/password credentials automatically encoded to Base64, bearer for OAuth-style token authentication, and header for custom API key or signature-based authentication schemes. Built-in security features include URL validation that blocks private and loopback IP addresses by default (configurable via allow_private), configurable timeouts from 1 to 120 seconds, and response size limits up to 20MB to prevent memory issues. Response handling offers four modes—auto, json, text, and base64—with auto-detection intelligently parsing responses based on content-type headers. The function returns comprehensive response metadata including status code, headers, final URL after redirects, and the parsed body, making it an essential building block for workflows that need to interact with external APIs, webhooks, or web services.

### Agent Description

Make HTTP requests (GET, POST, PUT, DELETE, etc.) with auth (basic, bearer, header). Configurable timeout, response handling, security controls.

## Details

### Details

A flexible and secure HTTP client designed for agent-driven API integrations and web service interactions. This function supports all standard HTTP methods including GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS, enabling comprehensive RESTful API communication. Users can configure requests with custom headers, query parameters, and request bodies in JSON, plain text, or base64-encoded binary formats. The tool provides four authentication modes: none for public endpoints, basic for username/password credentials automatically encoded to Base64, bearer for OAuth-style token authentication, and header for custom API key or signature-based authentication schemes. Built-in security features include URL validation that blocks private and loopback IP addresses by default (configurable via allow_private), configurable timeouts from 1 to 120 seconds, and response size limits up to 20MB to prevent memory issues. Response handling offers four modes—auto, json, text, and base64—with auto-detection intelligently parsing responses based on content-type headers. The function returns comprehensive response metadata including status code, headers, final URL after redirects, and the parsed body, making it an essential building block for workflows that need to interact with external APIs, webhooks, or web services.

### Actions

- `request` (5 credits): Make an HTTP request to a specified URL. Supports all standard HTTP methods, multiple authentication schemes, and flexible body/response formats.

### Use Cases

Fetching data from third-party REST APIs for aggregation or transformation pipelines, submitting form data or JSON payloads to webhook endpoints for event-driven workflows, authenticating with OAuth-protected services using bearer tokens for secure integrations, polling external services for status updates or job completion in asynchronous workflows, posting structured data to CRM or marketing automation platforms, retrieving remote configuration files or feature flags from external services, sending notifications to Slack or Discord webhooks with custom message payloads, interacting with payment gateways or e-commerce APIs for order processing, fetching remote JSON schemas or API specifications for validation workflows, integrating with legacy systems via custom header-based authentication for enterprise data exchange

### Workflows Using This Tool

#### API Healthcheck (JSON) -> Discord Alert

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

- Page URL: https://www.agentpmt.com/agent-workflow-skills/api-healthcheck-json-discord-alert
- Markdown URL: https://www.agentpmt.com/agent-workflow-skills/api-healthcheck-json-discord-alert?format=agent-md
- Published: 2026-02-19T19:10:16.218Z

### Related Content

No related content is currently linked to this product.

## Integration Details

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

Use the local router for command-based MCP clients. It forwards requests to `https://api.agentpmt.com/mcp` and does not execute tools locally.

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

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "695c37c5767df5adfd9bc873",
    "parameters": {
      "action": "request",
      "url": "example_url",
      "request_method": "GET",
      "auth_type": "none",
      "timeout_seconds": 30,
      "response_mode": "auto",
      "max_response_bytes": 1048576,
      "allow_private": false
    }
  }'
```

### Autonomous Agents

Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.

- Autonomous Agent API reference URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents
- Autonomous Agent API reference markdown URL: https://www.agentpmt.com/docs/api-reference/autonomous-agents?format=agent-md
- Credit-Based Access Using AgentAddress: https://www.agentpmt.com/docs/autonomous-agents/credit-based-tool-usage-with-agentaddress
- AgentAddress is preferred for persistent file access, stored platform state, and maximum tool use ability across repeated calls.
- Direct x402 is for independent one-off tool calls that do not require shared files or stored platform state.
- Direct x402 public payments: USDC on Base, Arbitrum, Optimism, Polygon, and Avalanche.

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "request": {
      "description": "Make an HTTP request to a specified URL. Supports all standard HTTP methods, multiple authentication schemes, and flexible body/response formats.",
      "properties": {
        "url": {
          "type": "string",
          "description": "The full URL to send the request to (must be http or https).",
          "required": true
        },
        "request_method": {
          "type": "string",
          "description": "HTTP method to use.",
          "required": false,
          "default": "GET",
          "enum": [
            "GET",
            "POST",
            "PUT",
            "PATCH",
            "DELETE",
            "HEAD",
            "OPTIONS"
          ]
        },
        "headers": {
          "type": "object",
          "description": "Custom HTTP headers as key-value pairs.",
          "required": false,
          "properties": {}
        },
        "query_params": {
          "type": "object",
          "description": "URL query parameters as key-value pairs.",
          "required": false,
          "properties": {}
        },
        "body_json": {
          "type": "object",
          "description": "JSON object body. Sets Content-Type to application/json automatically. Only one body type allowed per request.",
          "required": false,
          "properties": {}
        },
        "body_text": {
          "type": "string",
          "description": "Plain text body payload. Only one body type allowed per request.",
          "required": false
        },
        "body_base64": {
          "type": "string",
          "description": "Base64-encoded binary body payload. Only one body type allowed per request.",
          "required": false
        },
        "auth_type": {
          "type": "string",
          "description": "Authentication scheme to use.",
          "required": false,
          "default": "none",
          "enum": [
            "none",
            "basic",
            "bearer",
            "header"
          ]
        },
        "auth_username": {
          "type": "string",
          "description": "Username for basic authentication. Required when auth_type is basic.",
          "required": false
        },
        "auth_password": {
          "type": "string",
          "description": "Password for basic authentication. Required when auth_type is basic.",
          "required": false
        },
        "auth_token": {
          "type": "string",
          "description": "Bearer token for authentication. Required when auth_type is bearer.",
          "required": false
        },
        "auth_header_name": {
          "type": "string",
          "description": "Custom header name for header-based authentication. Required when auth_type is header.",
          "required": false
        },
        "auth_header_value": {
          "type": "string",
          "description": "Custom header value for header-based authentication. Required when auth_type is header.",
          "required": false
        },
        "timeout_seconds": {
          "type": "integer",
          "description": "Request timeout in seconds.",
          "required": false,
          "default": 30,
          "minimum": 1,
          "maximum": 120
        },
        "response_mode": {
          "type": "string",
          "description": "How to return the response body. Auto detects based on Content-Type.",
          "required": false,
          "default": "auto",
          "enum": [
            "auto",
            "json",
            "text",
            "base64"
          ]
        },
        "max_response_bytes": {
          "type": "integer",
          "description": "Maximum response size to return in bytes.",
          "required": false,
          "default": 1048576,
          "minimum": 1024,
          "maximum": 20971520
        },
        "allow_private": {
          "type": "boolean",
          "description": "Set to true to allow requests to private or loopback IP addresses.",
          "required": false,
          "default": false
        }
      }
    }
  },
  "properties": {}
}
```

### Usage Instructions

# Webhook - HTTP Request

## Overview
A general-purpose HTTP client that can make requests to any public URL. Supports all standard HTTP methods, multiple authentication schemes, flexible body formats, and configurable response handling. Use it to call REST APIs, fetch web resources, post webhooks, or interact with any HTTP-based service.

## Actions

### request
Make an HTTP request to a specified URL.

**Required Fields:**
- `url` — the full URL to send the request to (must be http or https)

**Optional Fields:**
- `request_method` — HTTP method: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS` (default: `GET`)
- `headers` — object of custom HTTP headers (e.g., `{"Accept": "application/xml"}`)
- `query_params` — object of URL query parameters (e.g., `{"page": "2", "limit": "10"}`)
- `body_json` — JSON object body (sets Content-Type to application/json automatically)
- `body_text` — plain text body
- `body_base64` — base64-encoded binary body (for file uploads or binary data)
- `auth_type` — authentication scheme: `"none"`, `"basic"`, `"bearer"`, or `"header"` (default: `"none"`)
- `auth_username` — username for basic auth (required when auth_type is `"basic"`)
- `auth_password` — password for basic auth (required when auth_type is `"basic"`)
- `auth_token` — token for bearer auth (required when auth_type is `"bearer"`)
- `auth_header_name` — custom header name for header auth (required when auth_type is `"header"`)
- `auth_header_value` — custom header value for header auth (required when auth_type is `"header"`)
- `timeout_seconds` — request timeout in seconds, 1-120 (default: 30)
- `response_mode` — how to return the response body: `"auto"`, `"json"`, `"text"`, `"base64"` (default: `"auto"`)
- `max_response_bytes` — maximum response size in bytes, 1024-20971520 (default: 1048576 / 1 MB)
- `allow_private` — set to `true` to allow requests to private/loopback IPs (default: `false`)

**Note:** Only one body field can be used per request (`body_json`, `body_text`, or `body_base64`).

**Example — Simple GET request:**
```json
{
  "action": "request",
  "request_method": "GET",
  "url": "https://api.example.com/data",
  "query_params": {"format": "json"}
}
```

**Example — POST with JSON body:**
```json
{
  "action": "request",
  "request_method": "POST",
  "url": "https://api.example.com/items",
  "headers": {"X-Custom-Header": "my-value"},
  "body_json": {"name": "Widget", "quantity": 5}
}
```

**Example — Bearer token authentication:**
```json
{
  "action": "request",
  "request_method": "GET",
  "url": "https://api.example.com/protected/resource",
  "auth_type": "bearer",
  "auth_token": "eyJhbGciOiJIUzI1NiIs..."
}
```

**Example — Basic authentication:**
```json
{
  "action": "request",
  "request_method": "GET",
  "url": "https://api.example.com/account",
  "auth_type": "basic",
  "auth_username": "myuser",
  "auth_password": "mypassword"
}
```

**Example — Custom header authentication (API key):**
```json
{
  "action": "request",
  "request_method": "GET",
  "url": "https://api.example.com/v2/search",
  "auth_type": "header",
  "auth_header_name": "X-API-Key",
  "auth_header_value": "abc123def456"
}
```

**Example — PUT to update a resource:**
```json
{
  "action": "request",
  "request_method": "PUT",
  "url": "https://api.example.com/items/42",
  "body_json": {"name": "Updated Widget", "quantity": 10}
}
```

**Example — DELETE a resource:**
```json
{
  "action": "request",
  "request_method": "DELETE",
  "url": "https://api.example.com/items/42"
}
```

**Example — Get binary response as base64:**
```json
{
  "action": "request",
  "request_method": "GET",
  "url": "https://example.com/image.png",
  "response_mode": "base64"
}
```

## Response Format
Successful requests return:
- `status_code` — HTTP status code (e.g., 200, 404)
- `headers` — response headers as an object
- `content_type` — the Content-Type header value
- `url` — the final URL (after any redirects)
- `body_json`, `body_text`, or `body_base64` — response body in the format determined by `response_mode`

## Common Workflows

1. **Call a REST API** — Use GET/POST/PUT/DELETE with `body_json` and `auth_type` to interact with any REST service.
2. **Send a webhook** — POST a JSON payload to a webhook URL to trigger external automations.
3. **Fetch a web page** — GET any public URL and receive the HTML as text.
4. **Download binary content** — GET a file URL with `response_mode: "base64"` to receive binary data encoded for further processing.
5. **Check endpoint availability** — Use HEAD or OPTIONS to verify a service is reachable without downloading the full response body.

## Important Notes
- Only `http` and `https` URLs are supported.
- Requests to private or loopback IP addresses are blocked by default. Set `allow_private` to `true` to override.
- Only one body type can be provided per request. Supplying more than one of `body_json`, `body_text`, or `body_base64` will cause an error.
- When `response_mode` is `"auto"`, JSON responses are parsed automatically; otherwise text is returned, or base64 for binary content.
- Responses exceeding `max_response_bytes` will be rejected. Increase the limit (up to ~20 MB) for larger payloads.
- The maximum timeout is 120 seconds.

### Frequently Asked Questions

#### How do I connect this tool to an external agent?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

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 does an external agent use this tool?

- Page URL: https://www.agentpmt.com/faq
- Markdown URL: https://www.agentpmt.com/faq?format=agent-md

After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:

> Call the AgentPMT-Tool-Search-and-Execution tool with action 'get\_schema' and tool\_id 695c37c5767df5adfd9bc873 ("Webhook - HTTP Request"). Then call the same tool with action 'call\_tool', tool\_id 695c37c5767df5adfd9bc873, and the parameters needed for my request.

The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.

### Dependencies

This product has no public dependency products.