> For the complete documentation index, see [llms.txt](https://safidocs.insolify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://safidocs.insolify.com/simple-messaging.md).

# Simple Messaging

{% hint style="info" %}
Note:  This does not save conversations. To save conversations, check "Conversation Thread" section of this documentation.
{% endhint %}

<mark style="color:yellow;">`POST`</mark> `/conversation`

**Headers**

<table><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td>apikey</td><td><pre><code>string
</code></pre></td></tr><tr><td>secret</td><td>string</td></tr></tbody></table>

**Body**

| Name             | Type   | Description      |
| ---------------- | ------ | ---------------- |
| `inlanguage`     | string | Name of the user |
| `outputlanguage` | string | Age of the user  |

**Response**

{% tabs %}
{% tab title="Request" %}

```json
{
    "inlanguage":"hausa", //The language to begin with, can be switched updated mid conversation
    "outputlanguage":"english", //The language to get response in
    "responsetype":"voice", //what you need as response. Can be voice, image, video or text. If you need voice and text use voice,text.
    "agentId":"", //If you are referring to a specific agent. Its ID
    "stream":false,
    "messages":[
        {
    "message":"Your name is Bami, you are an Ai assistant for Ashobe members.", //The message can be text or url of voice or video 
    "messagetype":"text", //The message type, if voice specify and supply in message.
    "owner":"machine", //user or machine.
    "topic":"instruction" //optional. instruction(to tell the machine who it is), change topic, refresh memory.
    },
        {
    "message":"https://safiloop.com/vm/83776377272.mp3", //The message can be text or url of voice or video 
    "messagetype":"voice", //The message type, if voice specify and supply in message.
    "owner":"machine", //user or machine.
    "topic":"instruction" //optional. instruction(to tell the machine who it is), change topic, refresh memory.
    },
        {
    "message":"https://test.com/sample.mp3", //The message can be text or url of voice or video 
    "messagetype":"voice", //The message type, if voice specify and supply in message.
    "owner":"user", //user or machine.
    "topic":"" //optional. instruction(to tell the machine who it is), change topic, refresh memory.
    },
    ] // messages, the one on top is the latest one.
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://safidocs.insolify.com/simple-messaging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
