# 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 %}
