Skip to main content
POST
/
v1
/
api
/
human_approval_action
curl -X POST "https://api.hookpulse.io/v1/api/human_approval_action/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "approve",
    "execution_plan_uuid": "{{execution_plan_uuid}}"
  }'
{
  "success": true,
  "message": "Workflow approved and resumed"
}
Approve or reject a pending workflow approval. Use this endpoint to take action on workflows that are waiting for human approval. Approving allows the workflow to continue, while rejecting skips the current step and moves to the failure path.

Base URL

All API requests should be made to:
https://api.hookpulse.io

Example request

curl -X POST "https://api.hookpulse.io/v1/api/human_approval_action/" \
  -H "x-hookpulse-api-key: {{x-hookpulse-api-key}}" \
  -H "x-brand-uuid: {{x-brand-uuid}}" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "approve",
    "execution_plan_uuid": "{{execution_plan_uuid}}"
  }'

Request body

FieldTypeRequiredDescription
actionstringYesAction to take: "approve" or "reject"
execution_plan_uuidstringYesUUID of the execution plan waiting for approval

Example response

Approve Response

{
  "success": true,
  "message": "Workflow approved and resumed"
}

Reject Response

{
  "success": true,
  "message": "Workflow rejected and skipped"
}

Response fields

FieldTypeDescription
successbooleanIndicates if the action was processed successfully
messagestringSuccess message indicating the action taken

Action Types

ActionDescriptionResult
"approve"Approve the pending workflow stepWorkflow continues to the next step (or delay_to_next_step if configured)
"reject"Reject the pending workflow stepWorkflow moves to the failure path (on_fail_next_step_identifier if configured)

Workflow Behavior

Approve Action

When you approve a workflow:
  • The workflow resumes execution and continues to the next step
  • If delay_to_next_step is configured, the workflow waits for that duration before proceeding
  • The workflow follows the on_success_next_step_identifier path if configured
  • The execution status changes from "waiting_approval" to "active"

Reject Action

When you reject a workflow:
  • The workflow skips the current step and moves to the failure path
  • The workflow follows the on_fail_next_step_identifier path if configured
  • If no failure path is configured, the workflow may stop or continue based on workflow settings
  • The execution status changes from "waiting_approval" to the next appropriate status

Use Cases

  • Approval Workflows: Approve or reject steps that require human decision
  • Quality Control: Review and approve workflows before they proceed
  • Compliance: Ensure workflows meet compliance requirements before continuing
  • Error Handling: Reject workflows that need to be stopped or redirected
  • Manual Intervention: Allow humans to control workflow execution at critical points

Examples

Approve a Workflow

{
  "action": "approve",
  "execution_plan_uuid": "{{execution_plan_uuid}}"
}

Reject a Workflow

{
  "action": "reject",
  "execution_plan_uuid": "{{execution_plan_uuid}}"
}

Important Notes

  • Execution Plan UUID: Use the execution_plan_id from the Get All Pending Approvals endpoint
  • Immediate Effect: Actions take effect immediately when processed
  • One-Time Action: Each approval can only be acted upon once
  • Workflow Continuation: After approval or rejection, the workflow continues automatically based on the configured paths

Authorizations

x-hookpulse-api-key
string
header
required

API key for authentication. Get this from your dashboard by selecting a brand and going to API Keys section.

x-brand-uuid
string
header
required

Brand UUID for authentication. Get this from your dashboard after adding a brand - it will be displayed in the UI.

Body

application/json

Human approval action configuration

action
enum<string>
required

Action to take: 'approve' or 'reject'

Available options:
approve,
reject
execution_plan_uuid
string
required

UUID of the execution plan waiting for approval

Response

Action processed successfully

success
boolean

Indicates if the action was processed successfully

message
string

Success message indicating the action taken