AI
Generate customer-facing AI agent preview reply
POST
/
v1
/
ai
/
agents
/
{agentID}
/
preview
/
messages
Generate customer-facing AI agent preview reply
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"message": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"session_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '<string>',
message: '<string>',
messages: [{content: '<string>', role: '<string>'}],
session_id: '<string>'
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages"
payload = {
"contact_id": "<string>",
"message": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"session_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "<string>",
"message": "<string>",
"model": "<string>",
"provider": "<string>",
"confidence_score": 123,
"created_at": "<string>",
"message_id": "<string>",
"session_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Path Parameters
Body
application/json
⌘I
Generate customer-facing AI agent preview reply
curl --request POST \
--url https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"message": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"session_id": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '<string>',
message: '<string>',
messages: [{content: '<string>', role: '<string>'}],
session_id: '<string>'
})
};
fetch('https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/ai/agents/{agentID}/preview/messages"
payload = {
"contact_id": "<string>",
"message": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"session_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"agent_id": "<string>",
"message": "<string>",
"model": "<string>",
"provider": "<string>",
"confidence_score": 123,
"created_at": "<string>",
"message_id": "<string>",
"session_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}