What is the Webhook Approval Step?
The Webhook Approval Step enables you to pause your agent’s execution and wait for approval from an external system before continuing. This is perfect for workflows that require human review, compliance checks, or integration with your existing approval processes.Common Use Cases
- Financial Approvals: Pause before processing transactions above a certain threshold
- Compliance Reviews: Get legal team approval before sending sensitive communications
- Quality Gates: Integrate with your CI/CD pipeline for deployment approvals
- Customer Onboarding: Route high-value leads through your CRM approval workflow
- IT Operations: Require manager approval before executing infrastructure changes
How It Works
- Agent pauses: When the agent reaches this step, execution pauses automatically
- Webhook sent: Airia sends a POST request to your configured URL with execution details
- You decide: Your system receives the request and applies your business logic
- Send response: Your system calls back to Airia with “Approved” or “Denied”
- Agent continues: Based on your decision, the agent follows the appropriate path
Configuration Guide
1. Webhook URL
What it is: The endpoint where Airia will send approval requests. Requirements:- Must be a publicly accessible HTTPS URL
- Must accept POST requests
- Must return a 2xx status code to confirm receipt
- Use a dedicated endpoint for Airia approvals
- Ensure the URL is stable and won’t change
- Test accessibility from external networks
- For development, use tools like ngrok to expose local servers
2. Authentication
What it is: Security method to verify requests are coming from Airia. Options:None
No authentication required. Only use for internal testing.API Key
Airia will include your API key in theX-API-Key header.
When to use: Simple authentication for internal systems.
Configuration:
Bearer Token
Airia will include your token in theAuthorization: Bearer header.
When to use: Standard OAuth-style authentication.
Configuration:
Basic Auth
Airia will include username and password in theAuthorization: Basic header.
When to use: Legacy systems requiring basic authentication.
Configuration:
Custom Header
Airia will include a custom header with your specified name and value. When to use: Your system uses non-standard authentication headers. Configuration:3. Advanced Settings
Timeout (seconds)
Default: 300 (5 minutes) What it is: Maximum time Airia will wait for your endpoint to respond. Recommendations:- Fast APIs: 30-60 seconds
- Standard processing: 300 seconds (default)
- Complex workflows: 600 seconds (10 minutes)
Max Retry Attempts
Default: 3 What it is: How many times Airia will retry if your endpoint is unavailable. How it works:- Retry 1: After 2 seconds
- Retry 2: After 4 seconds
- Retry 3: After 8 seconds
- (Exponential backoff)
- Reliable endpoints: 1-2 retries
- Less reliable: 3-5 retries
- Development/testing: 1 retry
4. Message
What it is: Optional custom message included in the webhook payload to provide context. Examples:- Keep it concise (under 500 characters recommended)
- Include context that helps the approver make a decision
- Use dynamic variables if your system supports them
- Can be left blank if your webhook URL is specific enough
Setting Up Your Webhook Endpoint
What You’ll Receive
When your agent reaches the Webhook Approval step, Airia will POST this to your endpoint:callbackId: Unique ID for this approval (you’ll need this to respond)callbackToken: Security token (REQUIRED to respond - store this securely!)agentName: Name of the agent requesting approvalmessage: Your custom message from configurationstepInput: Data passed into this steppreviousResults: Results from all previous steps in the workflow
How to Respond
Your system must call this endpoint to approve or deny: Endpoint:POST https://api.airia.com/v1/AgentExecutionWebhookApproval/callback
Request Body:
callbackId: From the webhook you receivedcallbackToken: From the webhook you received (MUST match exactly)status: Must be exactly"Approved"or"Denied"(case-sensitive)
comment: Explanation for the decision (visible in execution logs)
