# Document

## Sending a document message

<mark style="color:green;">`POST`</mark> `https://api.qikchat.in/v1/messages`

To send a document, use the request URL and the following body parameters.

accepted formats: `Any valid MIME-type.`

**Request Example**

`{`

&#x20;   `"to_contact": "+918080808080",`

&#x20;   `"type": "document",`

&#x20;   `"document": {`

&#x20;       "link": "http(s)://the-url",                                                                               &#x20;

&#x20;       `"caption": "your-document-caption",`

&#x20;       `"filename": "your-document-filename"` &#x20;

&#x20;   `}`

`}`

#### Request Body

| Name                                          | Type   | Description                                       |
| --------------------------------------------- | ------ | ------------------------------------------------- |
| to\_contact<mark style="color:red;">\*</mark> | string | customer whatsapp number you want to send message |
| type<mark style="color:red;">\*</mark>        | string | document                                          |
| document<mark style="color:red;">\*</mark>    | object | contains link field                               |

{% tabs %}
{% tab title="200: OK " %}
A successful response includes a data object with an ID for the message sent.

```javascript
{
    "status": true,
    "message": "Messages queued successfully",
    "data": [
        {
            "id": "52JH6WmuSruAVyXvBBYemd0Ia",
            "channel": "whatsapp",
            "from": "919099999916",
            "recipient": "+918080808080",
            "created_at": "2023-02-19T12:52:25.222Z",
            "status": "queued"
        }
    ]
}
```
{% endtab %}
{% endtabs %}
