curl --request POST \
--url https://api.v1.sleak.chat/api/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "5fc020e6-d603-4069-890e-a231c8e9003c",
"message": "Hallo, ik heb een vraag over jullie producten"
}
'{
"messages": [
{
"id": "da7f334a-ae05-417b-96f0-8067283acb44",
"message_type": "default_bot",
"body": "Hallo! Ik help je graag met vragen over onze producten."
}
],
"conversation_id": "5fc020e6-d603-4069-890e-a231c8e9003c",
"source_documents": [
{}
]
}{
"detail": "Invalid attachment 'https://example.com/': Attachment is not a supported image (jpeg, png, gif or webp)"
}{
"detail": "Invalid API key"
}{
"detail": "Organization subscription is not active"
}{
"detail": "Invalid API key"
}{
"detail": [
{
"type": "literal_error",
"loc": [
"body",
"attachments",
0,
"type"
],
"msg": "Input should be 'image'"
}
]
}{
"detail": {
"error": "Rate limit exceeded",
"message": "Too many requests. Please try again later.",
"limit": 100,
"remaining": 0,
"reset": "2023-11-07T05:31:56Z",
"retry_after": 42
}
}{
"detail": "Invalid API key"
}Verstuur een bericht
Verstuurt een bericht naar een bestaande conversatie en ontvangt een AI-gegenereerd antwoord
curl --request POST \
--url https://api.v1.sleak.chat/api/message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"conversation_id": "5fc020e6-d603-4069-890e-a231c8e9003c",
"message": "Hallo, ik heb een vraag over jullie producten"
}
'{
"messages": [
{
"id": "da7f334a-ae05-417b-96f0-8067283acb44",
"message_type": "default_bot",
"body": "Hallo! Ik help je graag met vragen over onze producten."
}
],
"conversation_id": "5fc020e6-d603-4069-890e-a231c8e9003c",
"source_documents": [
{}
]
}{
"detail": "Invalid attachment 'https://example.com/': Attachment is not a supported image (jpeg, png, gif or webp)"
}{
"detail": "Invalid API key"
}{
"detail": "Organization subscription is not active"
}{
"detail": "Invalid API key"
}{
"detail": [
{
"type": "literal_error",
"loc": [
"body",
"attachments",
0,
"type"
],
"msg": "Input should be 'image'"
}
]
}{
"detail": {
"error": "Rate limit exceeded",
"message": "Too many requests. Please try again later.",
"limit": 100,
"remaining": 0,
"reset": "2023-11-07T05:31:56Z",
"retry_after": 42
}
}{
"detail": "Invalid API key"
}Authorizations
Gebruik je API sleutel als Bearer token.
Voorbeeld: Authorization: Bearer <jouw-api-sleutel>
Body
Identifier van de conversatie
"5fc020e6-d603-4069-890e-a231c8e9003c"
Het bericht dat naar de chatbot wordt gestuurd
1"Hallo, ik heb een vraag over jullie producten"
Optionele afbeeldingen bij het bericht. De url moet een publiek bereikbare https-link naar de afbeelding zijn. De afbeelding wordt opgehaald en opgeslagen bij de conversatie. Ondersteund: jpeg, png, gif en webp, maximaal 10 MB. Een url die niet bereikbaar is of geen afbeelding bevat geeft een 400.
5Show child attributes
Show child attributes
Response
Bericht succesvol verwerkt
Berichten van de chatbot als antwoord op dit bericht
Show child attributes
Show child attributes
ID van de conversatie
"5fc020e6-d603-4069-890e-a231c8e9003c"
Brondocumenten die gebruikt zijn voor het antwoord. Ontbreekt als er geen bronnen zijn gebruikt.

