Daita Webhook
List and view webhook URLs for your deployed agents and workflows. Webhooks allow external services to trigger your agents and workflows via HTTP POST requests.
Syntax
daita webhook list [OPTIONS]
Options
| Option | Type | Default | Description |
|---|---|---|---|
--api-key-only | flag | false | Show only webhooks created with current API key |
--verbose, -v | flag | false | Show detailed information including field mappings |
Requirements
DAITA_API_KEYenvironment variable must be set- Webhooks must be configured in
daita-project.yamland deployed
Examples
List All Webhooks
# List all webhook URLs for your organization
daita webhook list
# List with verbose output showing field mappings
daita webhook list --verbose
Filter by API Key
# Show only webhooks created with current API key
daita webhook list --api-key-only
Output Format
With Webhooks Configured
$ daita webhook list
🔗 Webhook URLs (Organization: My Organization)
Agent Webhooks:
data_processor:
github_trigger → https://api.daita.cloud/webhook/org_123/agent/data_processor/github_trigger
slack_notification → https://api.daita.cloud/webhook/org_123/agent/data_processor/slack_notification
Workflow Webhooks:
data_pipeline:
webhook_start → https://api.daita.cloud/webhook/org_123/workflow/data_pipeline/webhook_start
💡 Usage:
• Copy webhook URLs to your external services (GitHub, Slack, etc.)
• Send HTTP POST requests with JSON payloads
• Field mapping will transform payloads automatically
🔧 Example:
curl -X POST '<webhook-url>' \
-H 'Content-Type: application/json' \
-d '{"your": "payload"}'
With Verbose Flag
$ daita webhook list --verbose
📡 Fetching webhooks from https://api.daita.cloud/api/v1/webhooks/list
🔗 Webhook URLs (Organization: My Organization)
Agent Webhooks:
data_processor:
github_trigger → https://api.daita.cloud/webhook/org_123/agent/data_processor/github_trigger
Field mapping: {'action': 'action', 'repository': 'repo_name'}
Workflow Webhooks:
data_pipeline:
webhook_start → https://api.daita.cloud/webhook/org_123/workflow/data_pipeline/webhook_start
Field mapping: {'data': 'input_data'}
💡 Usage:
• Copy webhook URLs to your external services (GitHub, Slack, etc.)
• Send HTTP POST requests with JSON payloads
• Field mapping will transform payloads automatically
🔧 Example:
curl -X POST '<webhook-url>' \
-H 'Content-Type: application/json' \
-d '{"your": "payload"}'
No Webhooks Found
$ daita webhook list
❌ No webhook URLs found
💡 To create webhooks:
1. Add webhook configurations to your daita-project.yaml
2. Deploy with 'daita push production'
Configuring Webhooks
Webhooks are configured in your daita-project.yaml file:
Agent Webhook Configuration
agents:
- name: data_processor
display_name: Data Processing Agent
webhooks:
- slug: github_trigger
field_mapping:
action: action
repository: repo_name
- slug: slack_notification
field_mapping:
text: message
user: sender
Workflow Webhook Configuration
workflows:
- name: data_pipeline
display_name: Data Processing Pipeline
webhooks:
- slug: webhook_start
field_mapping:
data: input_data
source: event_source
Field Mapping
Field mapping transforms incoming webhook payloads to match your agent/workflow input format:
field_mapping:
incoming_field: agent_parameter
nested.field: another_parameter
Example:
If your agent expects {"message": "hello"} but GitHub sends {"text": "hello"}:
webhooks:
- slug: github_hook
field_mapping:
text: message # Maps GitHub's "text" to agent's "message"
Using Webhooks
Basic HTTP POST Request
# Send a simple webhook request
curl -X POST 'https://api.daita.cloud/webhook/org_123/agent/my_agent/webhook_slug' \
-H 'Content-Type: application/json' \
-d '{"message": "Hello from webhook"}'
GitHub Webhook Integration
- Copy the webhook URL from
daita webhook list - Go to your GitHub repository → Settings → Webhooks
- Add webhook:
- Payload URL: Your webhook URL
- Content type:
application/json - Events: Choose events (push, pull request, etc.)
Slack Webhook Integration
- Create a Slack outgoing webhook
- Set the URL to your Daita webhook URL
- Configure trigger words or channels
- Use field mapping to transform Slack's payload
Custom Service Integration
# Python example
import requests
webhook_url = "https://api.daita.cloud/webhook/org_123/agent/my_agent/process"
payload = {
"data": "some input",
"priority": "high"
}
response = requests.post(webhook_url, json=payload)
print(response.json())
Common Errors
No API Key
$ daita webhook list
❌ No DAITA_API_KEY found.
Get your API key at https://dashboard.daita-tech.io
Then: export DAITA_API_KEY='your-key-here'
Solution: Set your API key:
export DAITA_API_KEY='your-api-key-here'
Authentication Failed
$ daita webhook list
❌ Authentication failed - check your DAITA_API_KEY
Get a new API key at https://dashboard.daita-tech.io
Solution: Verify your API key is valid or generate a new one.
Connection Failed
$ daita webhook list
❌ Cannot connect to Daita API
Check your internet connection and try again
Solution: Check your internet connection and firewall settings.
Webhook Security
Best Practices
- Keep URLs Private: Webhook URLs should be treated as secrets
- Use HTTPS: All webhook URLs use HTTPS by default
- Validate Payloads: Implement validation in your agent/workflow code
- Rate Limiting: Be aware of rate limits on webhook endpoints
- Monitor Usage: Check webhook invocations in deployment logs
Organization-Level Security
- Webhooks are scoped to your organization
- Each deployment creates new webhook URLs
- API key authentication required to list webhooks
- Use
--api-key-onlyto see only webhooks you created
Workflow
Initial Setup
# 1. Configure webhooks in daita-project.yaml
vim daita-project.yaml
# 2. Deploy to create webhook URLs
daita push production
# 3. List webhook URLs
daita webhook list
# 4. Copy URLs to external services
Updating Webhooks
# 1. Update webhook configuration in daita-project.yaml
vim daita-project.yaml
# 2. Redeploy to apply changes
daita push production
# 3. Verify new webhook URLs
daita webhook list
Testing Webhooks
# 1. Get webhook URL
daita webhook list
# 2. Test with curl
curl -X POST 'your-webhook-url' \
-H 'Content-Type: application/json' \
-d '{"test": "data"}'
# 3. Check logs to verify execution
daita logs production
Related Commands
- daita push - Deploy with webhook configurations
- daita logs - View webhook invocations in deployment logs
- daita status - Check deployment status
- Configuration Guide - Learn about webhook configuration options