# Contacts and Location Messages

## Sending a contact message

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

**Request Example**

`{`

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

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

&#x20;   `"contact": {`

&#x20;       "addresses": \[

&#x20;           `{`

&#x20;             `"city": "Chennai",`&#x20;

&#x20;             `"country": "India",`&#x20;

&#x20;                              "country\_code": "in",&#x20;

&#x20;             `"state": "TN",`&#x20;

&#x20;             `"street": "Venugopal Street",`&#x20;

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

&#x20;             `"zip": "600037"`

&#x20;           `}`

&#x20;       `],`

&#x20;       `"birthday": "2000-01-20",`&#x20;

&#x20;       `"emails": [`&#x20;

&#x20;           `{`&#x20;

&#x20;               `"email": "test@domain-name.com",`&#x20;

&#x20;               `"type": "WORK"`&#x20;

&#x20;           `}`&#x20;

&#x20;       `],`&#x20;

&#x20;       `"name": {`&#x20;

&#x20;           `"first_name": "Siva",`&#x20;

&#x20;           `"formatted_name": "Siva Radhakrishnan",`&#x20;

&#x20;           `"last_name": "Radhakrishnan"`&#x20;

&#x20;       `},`&#x20;

&#x20;       `"org": {`&#x20;

&#x20;           `"company": "Qikberry",`&#x20;

&#x20;           `"department": "Design",`&#x20;

&#x20;           `"title": "Manager"`&#x20;

&#x20;       `},`&#x20;

&#x20;       `"phones": [`&#x20;

&#x20;           `{`&#x20;

&#x20;                `"phone": "+919944857332",`&#x20;

&#x20;                `"type": "HOME"`&#x20;

&#x20;           `}`&#x20;

&#x20;       `],`&#x20;

&#x20;       `"urls": [`&#x20;

&#x20;           `{`&#x20;

&#x20;                `"url": "https://www.qikberry.com",`&#x20;

&#x20;                `"type": "WORK"`&#x20;

&#x20;           `}`&#x20;

&#x20;       `]`                                                                        &#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 | contact                                           |
| contact                                       | object | contains contact details                          |

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

```json
{
    "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 %}

## Sending a location message

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

**Request Example**

`{`

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

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

&#x20;   `"location": {`

&#x20;       `"longitude": 13.081996,`&#x20;

&#x20;       `"latitude": 80.180565,`&#x20;

&#x20;       `"name": "Qikberry Technologies Private Limited",`  &#x20;

&#x20;       `"address": "No.9, The Palms, 2nd floor, Sai Avenue, Madhiraved, Chennai, Thiruvallur - 600077"`     &#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 | location                                          |
| location<mark style="color:red;">\*</mark>    | object | contains location object                          |

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

```json
{
    "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 %}
