Send API Request
unfour.api.send_requestSend saved or ad-hoc API requests to reproduce failures during troubleshooting. Non-2xx responses return structured status and body data with sensitive fields masked.
Instructions
Sends either a saved API request by requestId or one ad-hoc request described by method/url/headers/query/body through the Unfour command bus. Use it to reproduce API failures during agent troubleshooting. Dev allows all HTTP methods; test allows sends but marks mutating methods as write risk; prod only allows GET/HEAD/OPTIONS. Non-2xx HTTP responses return structured status/body data rather than MCP tool failure. Sensitive headers, cookies, URL tokens, and JSON body fields are masked.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL for ad-hoc sends. | |
| body | No | Optional request body for ad-hoc sends. | |
| name | No | Optional display name for ad-hoc request history. | |
| query | No | Optional query parameters as an object or array of {key,value,enabled}. | |
| method | No | HTTP method for ad-hoc sends, such as GET, POST, PUT, PATCH, DELETE. | |
| headers | No | Optional headers as an object or array of {key,value,enabled}. Sensitive values are redacted in results. | |
| bodyKind | No | Optional body kind for ad-hoc sends (json, text, form, xml). Defaults to json. | |
| requestId | No | Optional saved API request ID to replay. Omit when sending method/url directly. | |
| timeoutMs | No | Optional timeout in milliseconds. Omitted or null defaults to 60000ms; 0 means unlimited; positive values are used exactly. | |
| workspaceId | No | Optional workspace ID for ad-hoc requests. Uses the active workspace if omitted. | |
| environmentId | No | Optional per-call environment override. It is used for variable resolution and saved request scripts without changing the workspace active environment. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| source | Yes | ||
| status | No | ||
| headers | No | ||
| bodyType | No | ||
| sizeBytes | No | ||
| truncated | No | ||
| durationMs | No | ||
| statusText | No | ||
| bodyPreview | No |