Skip to main content

Endpoint Actions API

Manage automation actions on debug endpoints. Actions execute in order when a webhook is received.

List actions

GET /api/v1/endpoints/:endpoint_id/actions

Returns all actions for the endpoint, ordered by position.

Response:

{
"data": [
{
"id": "a1b2c3d4-...",
"type": "extract_json",
"name": "Extract order ID",
"config": {
"source": "body",
"extractions": [{"path": "order.id", "variable": "order_id"}]
},
"position": 0,
"enabled": true,
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:00Z"
}
]
}

Create action

POST /api/v1/endpoints/:endpoint_id/actions

Request body:

FieldTypeRequiredDescription
typestringYesAction type: condition, extract_json, http_request, run_script, store_variable, modify_response
namestringYesDisplay name (1-255 characters)
configobjectYesAction configuration (varies by type)
enabledbooleanNoWhether the action is active (default: true)

Example:

curl -X POST https://app.hooklistener.com/api/v1/endpoints/<endpoint-id>/actions \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"type": "http_request",
"name": "Forward to backend",
"config": {
"url": "https://api.example.com/webhook",
"method": "POST",
"body": "$request.body.json$"
}
}'

Response: 201 Created with the created action.

Errors:

StatusCodeDescription
403feature_not_availableAutomations not available on your plan
403action_limit_reachedEndpoint has reached the maximum number of actions for your plan
422Validation errorInvalid type, name, or config

Get action

GET /api/v1/endpoints/:endpoint_id/actions/:id

Response:

{
"data": {
"id": "a1b2c3d4-...",
"type": "http_request",
"name": "Forward to backend",
"config": {"url": "https://api.example.com/webhook", "method": "POST"},
"position": 0,
"enabled": true,
"created_at": "2026-04-01T12:00:00Z",
"updated_at": "2026-04-01T12:00:00Z"
}
}

Update action

PATCH /api/v1/endpoints/:endpoint_id/actions/:id

Request body: Any subset of name, config, enabled.

curl -X PATCH https://app.hooklistener.com/api/v1/endpoints/<endpoint-id>/actions/<action-id> \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Forward to production backend",
"enabled": false
}'

Response: 200 OK with the updated action.

Delete action

DELETE /api/v1/endpoints/:endpoint_id/actions/:id

Response: 204 No Content

Reorder actions

PUT /api/v1/endpoints/:endpoint_id/actions/reorder

Set the execution order of all actions on the endpoint.

Request body:

{
"action_ids": ["id-3", "id-1", "id-2"]
}

The action_ids array must contain the IDs of all actions on the endpoint in the desired execution order.

Example:

curl -X PUT https://app.hooklistener.com/api/v1/endpoints/<endpoint-id>/actions/reorder \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{"action_ids": ["a1b2c3d4-...", "e5f6g7h8-...", "i9j0k1l2-..."]}'

Response: 200 OK with the reordered list of actions.

Action response format

All action responses share the same structure:

FieldTypeDescription
idstringAction ID
typestringAction type
namestringDisplay name
configobjectAction configuration
positionintegerExecution order (0-based)
enabledbooleanWhether the action runs during execution
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp