Create a new webhook for an agent
curl -i -X POST \
'https://api-docs.yumeru.ai/_mock/openapi/agents/{agentId}/webhooks' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "http://example.com",
"enabled": true,
"events": [
"call_started",
"call_ended",
"call_analyzed"
]
}'
{ "success": true, "data": { "id": 0, "agentId": 0, "url": "http://example.com", "secret": "string", "enabled": true, "events": [ … ], "createdAt": "string", "updatedAt": "string" } }
curl -i -X GET \
'https://api-docs.yumeru.ai/_mock/openapi/agents/{agentId}/webhooks' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "success": true, "data": [ { … } ] }
curl -i -X GET \
'https://api-docs.yumeru.ai/_mock/openapi/agents/{agentId}/webhooks/{webhookId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "success": true, "data": { "id": 0, "agentId": 0, "url": "http://example.com", "secret": "string", "enabled": true, "events": [ … ], "createdAt": "string", "updatedAt": "string" } }
curl -i -X PUT \
'https://api-docs.yumeru.ai/_mock/openapi/agents/{agentId}/webhooks/{webhookId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"url": "http://example.com",
"enabled": true,
"events": [
"call_started",
"call_ended",
"call_analyzed"
]
}'
{ "success": true, "data": { "id": 0, "agentId": 0, "url": "http://example.com", "secret": "string", "enabled": true, "events": [ … ], "createdAt": "string", "updatedAt": "string" } }
curl -i -X DELETE \
'https://api-docs.yumeru.ai/_mock/openapi/agents/{agentId}/webhooks/{webhookId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
{ "success": true, "data": null }