curl -X POST "https://app.gloriagent.ai//api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7/messages" \
-H "Content-Type: application/json" \
-d '{
"message": "I would like to schedule a demo for next week"
}'
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.gloriagent.ai//api/conversations/${conversationId}/messages`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'I would like to schedule a demo for next week'
})
}
);
const data = await response.json();
console.log(data.message);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.post(
f'https://app.gloriagent.ai//api/conversations/{conversation_id}/messages',
json={
'message': 'I would like to schedule a demo for next week'
}
)
data = response.json()
print(data['message'])
{
"status": true,
"message": "I'd be happy to help you schedule a demo! I have availability on Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which time works best for you?",
"function_calls": []
}
{
"status": true,
"message": "I've checked our calendar and found several available slots for next week. I can offer you Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which would you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"start_date": "2025-01-13",
"end_date": "2025-01-17"
},
"result": {
"available_slots": [
"2025-01-13 14:00",
"2025-01-15 10:00",
"2025-01-17 15:00"
]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: Connection timeout"
}
{
"message": "The message field is required.",
"errors": {
"message": ["The message field is required."]
}
}
Conversations
Send Message
Send a message in an existing conversation and receive the assistant’s response
POST
/
conversations
/
{uuid}
/
messages
curl -X POST "https://app.gloriagent.ai//api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7/messages" \
-H "Content-Type: application/json" \
-d '{
"message": "I would like to schedule a demo for next week"
}'
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.gloriagent.ai//api/conversations/${conversationId}/messages`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'I would like to schedule a demo for next week'
})
}
);
const data = await response.json();
console.log(data.message);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.post(
f'https://app.gloriagent.ai//api/conversations/{conversation_id}/messages',
json={
'message': 'I would like to schedule a demo for next week'
}
)
data = response.json()
print(data['message'])
{
"status": true,
"message": "I'd be happy to help you schedule a demo! I have availability on Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which time works best for you?",
"function_calls": []
}
{
"status": true,
"message": "I've checked our calendar and found several available slots for next week. I can offer you Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which would you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"start_date": "2025-01-13",
"end_date": "2025-01-17"
},
"result": {
"available_slots": [
"2025-01-13 14:00",
"2025-01-15 10:00",
"2025-01-17 15:00"
]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: Connection timeout"
}
{
"message": "The message field is required.",
"errors": {
"message": ["The message field is required."]
}
}
This endpoint sends a user message to an existing conversation and returns the assistant’s response. The assistant processes the message using the configured AI model and any available tools.
Path Parameters
string
required
The unique UUID identifier of the conversation
Request Body
string
required
The user’s message to send to the assistant. Maximum length: 2000 characters.
Response Fields
boolean
Indicates whether the request was successful
string
The assistant’s response to the user’s message
array
Error Responses
boolean
Will be
false when an error occursstring
Error message. Possible values:
Conversation not found- The provided UUID does not match any conversationInsufficient balance. Please top up your account.- The assistant owner’s account balance is too lowFailed to process message: [details]- An error occurred while processing the message
curl -X POST "https://app.gloriagent.ai//api/conversations/7c9e6679-7425-40de-944b-e07fc1f90ae7/messages" \
-H "Content-Type: application/json" \
-d '{
"message": "I would like to schedule a demo for next week"
}'
const conversationId = '7c9e6679-7425-40de-944b-e07fc1f90ae7';
const response = await fetch(
`https://app.gloriagent.ai//api/conversations/${conversationId}/messages`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: 'I would like to schedule a demo for next week'
})
}
);
const data = await response.json();
console.log(data.message);
import requests
conversation_id = '7c9e6679-7425-40de-944b-e07fc1f90ae7'
response = requests.post(
f'https://app.gloriagent.ai//api/conversations/{conversation_id}/messages',
json={
'message': 'I would like to schedule a demo for next week'
}
)
data = response.json()
print(data['message'])
{
"status": true,
"message": "I'd be happy to help you schedule a demo! I have availability on Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which time works best for you?",
"function_calls": []
}
{
"status": true,
"message": "I've checked our calendar and found several available slots for next week. I can offer you Monday at 2 PM, Wednesday at 10 AM, or Friday at 3 PM. Which would you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"start_date": "2025-01-13",
"end_date": "2025-01-17"
},
"result": {
"available_slots": [
"2025-01-13 14:00",
"2025-01-15 10:00",
"2025-01-17 15:00"
]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: Connection timeout"
}
{
"message": "The message field is required.",
"errors": {
"message": ["The message field is required."]
}
}
Pricing
Each user message in a widget conversation costs $0.01. Test conversations are free.Function Calls
The assistant may execute functions during message processing, such as:- Calendar operations: Checking availability, booking appointments
- Knowledge base queries: Searching documentation or FAQs
- Custom integrations: Calling your configured webhook endpoints
Best Practices
- Handle errors gracefully: Display user-friendly messages when errors occur
- Show loading states: The assistant may take a few seconds to respond, especially when executing functions
- Preserve conversation ID: Store the conversation UUID to allow users to resume conversations
- Respect rate limits: Implement appropriate delays between messages if needed

