Webhook Setup
How It Works
Step 1: Set Your Callback URL
curl -X PATCH https://api.suwappu.bot/v1/agent/me \
-H "Authorization: Bearer suwappu_sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"callback_url": "https://your-server.com/webhooks/suwappu"}'Response
{
"success": true,
"agent": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "my-trading-bot",
"description": "Automated portfolio rebalancer",
"rate_limit_tier": "standard",
"stats": {
"total_requests": 14833,
"total_swaps": 247
},
"created_at": "2026-01-15T08:30:00Z",
"last_active_at": "2026-03-07T14:25:00Z"
}
}Step 2: Test Webhook Delivery
Step 3: Handle Webhook Events
Event Types
Event
Description
Webhook Payload
Step 4: View Webhook Events
Complete Example: curl
Complete Example: Python Flask Receiver
Complete Example: Python Setup Script
Complete Example: TypeScript
Webhook Receiver in TypeScript (Node.js)
Tips
Last updated