API Integration for YourGPT Chatbot | Installation Guide
Welcome to the Documentation page for YourGPT Chatbot APIs
Generating Keys
- Go to your
Integration
and click onmanage API integration
- Now create one key.
- Copy your
Generated API key
API Usage
success code : 200, type: RXSUCCESS
error code 400, type RXERROR
Create Session API
Response
Response
{
"type": "RXSUCCESS",
"message": "Chatbot session created successfully",
"data": {
"id": 1910677,
"session_uid": 17226012685401506,
"chat_mode": "1",
"project_id": 197,
"integration_id": 17,
"state": "pending",
"segment": "chat",
"status": "open",
"device_type": null,
"platform": null,
"ip": null,
"country": "IN",
"visitor_id": null,
"is_emulator": false,
"data": {},
"contact_id": null,
"updatedAt": "2024-08-02T12:21:08.540Z",
"createdAt": "2024-08-02T12:21:08.540Z"
}
}
Send Message API
Response
Response
{
"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
}
]
}
}