cURL
curl --request PATCH \ --url https://api.pro.daya.co/public/v1/webhooks/{id} \ --header 'Content-Type: application/json' \ --header 'X-Api-Key: <x-api-key>' \ --data ' { "url": "<string>", "events": [ {} ], "status": "<string>", "description": "<string>" } '
{ "success": true, "message": "Webhook updated successfully", "data": { "id": "770e8400-e29b-41d4-a716-446655440000", "url": "https://example.com/webhooks/daya", "description": "Order notifications", "events": ["order.filled", "trade.executed"], "status": "active", "failure_count": 0, "last_success_at": "2024-01-15T10:30:00Z", "last_failure_at": null, "last_failure_reason": null, "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-15T12:00:00Z" }, "timestamp": "2024-01-15T12:00:00Z" }
Update a webhook’s configuration
X-Api-Key: daya_sk_YOUR_API_KEY
770e8400-e29b-41d4-a716-446655440000
order.created
order.filled
order.partially_filled
order.cancelled
order.rejected
trade.executed
active
paused
curl --request PATCH \ --url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \ --header 'X-Api-Key: daya_sk_YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "events": ["order.filled", "trade.executed"] }'
curl --request PATCH \ --url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \ --header 'X-Api-Key: daya_sk_YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{ "status": "paused" }'
curl --request PATCH \ --url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \ --header 'X-Api-Key: daya_sk_YOUR_API_KEY' \ --header 'Content-Type: application/json' \ --data '{"status": "active"}'
Show webhook properties
disabled
{ "success": false, "message": "Validation error", "error": { "code": "VALIDATION_ERROR", "message": "Invalid status. Allowed values: active, paused" } }