Approval
Submit a contact approval/rejection from the webchat widget
Unauthenticated endpoint called from the webchat widget when a contact taps approve/reject on an approval card. The atomic transition only succeeds for pending CONTACT-type requests whose webchatId matches the supplied value; approvals trigger execution of the deferred tool and (on failure) record a failureReason.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/approval/respond" \ -H "Content-Type: application/json" \ -d '{ "approvalRequestId": "64d2f9c5e8a1d4e001a0b1c2", "webchatId": "wc_8f3a1b2c4d5e6f70", "response": "approved" }'{ "success": true, "status": "approved", "result": { "bookingId": "bk_64a1b2c3d4e5f60012345678", "confirmedAt": "2026-04-22T10:14:00.000Z" }}