Webhooks

We provide several webhook endpoints for three use cases:
  • Handle Messages
  • Handover Case from Chatbot to Agent
  • Close Case: Close an open case
The endpoint used for all webhook use cases will be like this:
POST
https://onetalk-api.taptalk.io/api/visitor/v1/webhook/chatbot/custom/:organizationID/:chatbotID
IMPORTANT!
To construct a request, be sure to add "Secret-Key" on your HTTP Header Field. The value for the "Secret-Key" can be found in the Chatbot Details in OneTalk Dashboard.

Base Parameters

Field
Type
Description
caseID
string
The case ID.
eventType
string
The type of the event. Accepted values are: "messages", "handover_case", "close_case"
Each use case will be using the base parameters stated above, the difference between each use case webhook request will be from the eventType parameter given in the request parameter as stated and from the required parameters from each use case as stated in the next section.

Success Response

Success
HTTP/1.1 200 OK
ok

Error Response

SecretKeyValidationFailed
ParamValidationFailed
InternalServerError
HTTP/1.1 401 Unauthorized
secret key is invalid
HTTP/1.1 400 Bad Request
case id is required
HTTP/1.1 500 Internal Server Error
internal server error