Enviar mensaje
curl --request POST \
--url https://api.example.com/conversations/{uuid}/messages \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'import requests
url = "https://api.example.com/conversations/{uuid}/messages"
payload = { "message": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.example.com/conversations/{uuid}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/conversations/{uuid}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/conversations/{uuid}/messages"
payload := strings.NewReader("{\n \"message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/conversations/{uuid}/messages")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/conversations/{uuid}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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 found two slots. Which one do you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_week"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: invalid tool output"
}
{
"status": false,
"error": "message is required"
}
Chatbot de IA
Enviar mensaje
Envía un mensaje de usuario a una conversación existente y recibe la respuesta del asistente
POST
/
conversations
/
{uuid}
/
messages
Enviar mensaje
curl --request POST \
--url https://api.example.com/conversations/{uuid}/messages \
--header 'Content-Type: application/json' \
--data '
{
"message": "<string>"
}
'import requests
url = "https://api.example.com/conversations/{uuid}/messages"
payload = { "message": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({message: '<string>'})
};
fetch('https://api.example.com/conversations/{uuid}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/conversations/{uuid}/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/conversations/{uuid}/messages"
payload := strings.NewReader("{\n \"message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/conversations/{uuid}/messages")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/conversations/{uuid}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"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 found two slots. Which one do you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_week"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: invalid tool output"
}
{
"status": false,
"error": "message is required"
}
API de Famulor 1.0 (legado). Esta página se aplica únicamente a Famulor 1.0 (
app.famulor.de) y se conserva por compatibilidad. Para la plataforma actual, usa la referencia de la API de Famulor 2.0.Parámetros de ruta
string
requerido
UUID de la conversación existente
Cuerpo de la solicitud
string
requerido
Mensaje de usuario que se va a enviar (máx. 2000 caracteres)
Ejemplos de solicitud
Campos de la respuesta
boolean
requerido
Indica si la solicitud se realizó correctamente
string
requerido
Texto de la respuesta del asistente
array
Ejemplos de respuesta
{
"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 found two slots. Which one do you prefer?",
"function_calls": [
{
"name": "check_calendar_availability",
"arguments": {
"date_range": "next_week"
},
"result": {
"available_slots": ["2025-01-10 14:00", "2025-01-12 10:00"]
}
}
]
}
{
"status": false,
"error": "Conversation not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
{
"status": false,
"error": "Failed to process message: invalid tool output"
}
{
"status": false,
"error": "message is required"
}
Notas
- Conversaciones widget: 0,01 $ por mensaje de usuario; las conversaciones de prueba son gratis.
- Guarda el UUID de la conversación para reanudar chats más tarde.
- Muestra estados de carga, ya que las llamadas a herramientas pueden tardar unos segundos.
- Combínalo con
Obtener conversaciónpara el historial yCrear conversaciónpara iniciar nuevos chats.
⌘I