رفض إجراء محتجز
POST
/v1/agent-action-requests/:id/rejectكتابة API
لن يُنفّذ الإجراء أبدًا. يُبلَّغ الوكيل بذلك مع سببك إن ذكرته، ويشرحه للعميل بأسلوبه. يُرجع 409 إذا أجاب عليه شخص آخر أو انتهت مهلته.
الصلاحية: agents:approve · 60 طلب / دقيقة
معاملات المسار
- idstringمطلوب
- قيمة requestId من القائمة أو من حدث الـ webhook.
محتوى الطلب
- reasonstringاختياري
- سبب الرفض، حتى 500 حرف.
curl -X POST "https://public-api.wsmartsender.com/v1/agent-action-requests/667f1a2b3c4d5e6f7a8b9c0d/reject" \
-H "X-Api-Key: wss_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"reason": "Price is wrong; the agent should offer 199."
}'حقول الرد200
{ requestId, conversationId, contactId, agentId, toolName, summary, status: rejected, reviewedBy, reviewedAt, rejectionReason }