API Request

Action network

action.api_request

Make HTTP requests to external APIs and services. Supports all standard HTTP methods, custom headers, JSON request bodies, and multiple authentication schemes including Basic Auth, Bearer tokens, and API keys.

The response body and status code are available on separate output ports, making it easy to branch on success/failure using a downstream Condition node.

Destructive action

When the HTTP method is DELETE (and for some destructive POST/PUT patterns), this node removes resources on the remote service. Most APIs do not undo a DELETE. Workflows configured with DELETE prompt for confirmation on every arm.

Ports

DirectionNameData TypeDescription
InputInputAnyIncoming payload for URL and body interpolation
OutputResponseJSONParsed response body
OutputStatusNumberHTTP status code

Configuration

FieldTypeDefaultDescription
methodDropdownGETHTTP method: GET, POST, PUT, PATCH, DELETE
urlTextRequest URL. Supports {{var}} interpolation.
bodyJSON EditorRequest body as JSON. Visible when method is not GET.
Headers
headersKey-ValueCustom HTTP headers as key-value pairs
Authorization
authTypeDropdownnoneAuth scheme: None, Basic Auth, Bearer Token, API Key
authUsernameTextBasic auth username. Visible when authType = basic.
authPasswordTextBasic auth password. Visible when authType = basic.
authBearerTokenTextBearer token value. Visible when authType = bearer.
authApiKeyNameTextAPI key header/param name. Visible when authType = api_key.
authApiKeyValueTextAPI key value. Visible when authType = api_key.
authApiKeyInDropdownheaderWhere to send the key: Header or Query Param. Visible when authType = api_key.

Output Variables

VariableTypeDescription
responseBodyJSONResponse body content
statusCodeNumberHTTP response status code
responseHeadersJSONResponse headers

Example

Post a Slack message when a webhook fires: