This API allows your application to send messages to a chatbot session that has been previously created.
curl --location 'https://api.yourgpt.ai/chatbot/v1/sendMessage' \--header 'Content-Type: application/x-www-form-urlencoded' \--header 'api-key: pks-3e0a221e3d0d78cf0ecd73be363a728e1dfa2a0ee01cc4ff8b8c99c21a45cff9' \--data-urlencode 'widget_uid=8449240d-8454-4173-af6e-569477ac9013' \--data-urlencode 'session_uid=39772b8d-d1c8-4d5a-a473-a6841bc4c880' \--data-urlencode 'message=hey there?'
{ "type": "RXSUCCESS", "message": "AI reply", "data": { "send_by": "assistant", "origin": "api", "session_uid": "39772b8d-d1c8-4d5a-a473-a6841bc4c880", "type": "text", "message_id": 241043, "message": "Hello! How can I assist you today?", "content_type": "picker", "id": 241043, "choices": [ { "icon": "👍", "text": "I am satisfied", "value": "like", "enabled": true }, { "icon": "👎", "text": "I am not satisfied", "value": "dislike", "enabled": true }, { "icon": "🦸", "text": "Request a human operator", "value": "requesthumanoperator", "enabled": true } ] }}