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:
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Action type: condition, extract_json, http_request, run_script, store_variable, modify_response |
name | string | Yes | Display name (1-255 characters) |
config | object | Yes | Action configuration (varies by type) |
enabled | boolean | No | Whether 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:
| Status | Code | Description |
|---|---|---|
| 403 | feature_not_available | Automations not available on your plan |
| 403 | action_limit_reached | Endpoint has reached the maximum number of actions for your plan |
| 422 | Validation error | Invalid 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:
| Field | Type | Description |
|---|---|---|
id | string | Action ID |
type | string | Action type |
name | string | Display name |
config | object | Action configuration |
position | integer | Execution order (0-based) |
enabled | boolean | Whether the action runs during execution |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |