# Chats/{chat\_id}

**if you need to get a specific chat on WhatsApp using chat ID ( mobile number )**

## get a specific chat with messages on WhatsApp using chat ID ( mobile number )

<mark style="color:blue;">`GET`</mark> `https://api.cartat.net/chats/9665xxxxxxx`

please make sure to pass the mobile number with the country code without + or 0 at the start of the number, eg.

&#x20;✅ 966500000000\
&#x20;❌ 0096650000000\
&#x20;❌ +96605000000

#### Headers

| Name                                            | Type             | Description                                                                           |
| ----------------------------------------------- | ---------------- | ------------------------------------------------------------------------------------- |
| Accept<mark style="color:red;">\*</mark>        | application/json |                                                                                       |
| Content-Type<mark style="color:red;">\*</mark>  | application/json |                                                                                       |
| Authorization<mark style="color:red;">\*</mark> | Bearer {{token}} | you can find your access token [here](https://docs.cartat.net/cartat-api/get-started) |

#### Request Body

| Name  | Type | Description                                                                                                                                                                                                                                                                                               |
| ----- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| limit | 50   | The amount of messages to return. If no limit is specified, the available messages will be returned. Note that the actual number of returned messages may be smaller if there aren't enough messages in the conversation. Set this to <mark style="color:blue;">**Infinity**</mark> to load all messages. |

{% tabs %}
{% tab title="200: OK Successful response" %}

```json
{
    "status": "success",
    "chat": {
        "id": {
            "server": "c.us",
            "user": "9665000000000",
            "_serialized": "9665000000000@c.us"
        },
        "name": "Jhone Due",
        "isGroup": false,
        "isReadOnly": false,
        "unreadCount": 0,
        "timestamp": 1698317263,
        "archived": false,
        "pinned": false,
        "isMuted": false,
        "muteExpiration": 0
    },
    "messages": [
        {
            "_data": {
                "id": {
                    "fromMe": false,
                    "remote": "9665000000000@c.us",
                    "id": "3A1F984EA234C4",
                    "_serialized": "false_9665000000000@c.us_3A1F984EA23D284164C4"
                },
                "rowId": 1001213641,
                "viewed": false,
                "body": "بوت",
                "type": "chat",
                "t": 1691347263,
                "from": {
                    "server": "c.us",
                    "user": "9665000000000",
                    "_serialized": "9665000000000@c.us"
                },
                "to": {
                    "server": "c.us",
                    "user": "966531896270",
                    "_serialized": "966531896270@c.us"
                },
                "self": "in",
                "ack": 3,
                "invis": true,
                "star": false,
                "kicNotified": false,
                "isFromTemplate": false,
                "pollOptions": [],
                "pollInvalidated": false,
                "latestEditMsgKey": null,
                "latestEditSenderTimestampMs": null,
                "mentionedJidList": [],
                "groupMentions": [],
                "isVcardOverMmsDocument": false,
                "isForwarded": false,
                "labels": [],
                "hasReaction": false,
                "productHeaderImageRejected": false,
                "lastPlaybackProgress": 0,
                "isDynamicReplyButtonsMsg": false,
                "isMdHistoryMsg": false,
                "stickerSentTs": 0,
                "isAvatar": false,
                "lastUpdateFromServerTs": 0,
                "requiresDirectConnection": false,
                "invokedBotWid": null,
                "links": []
            },
            "id": {
                "fromMe": false,
                "remote": "9665000000000@c.us",
                "id": "3A1F984EA23D284164C4",
                "_serialized": "false_9665000000000@c.us_3B1F982EA23184164C4"
            },
            "ack": 3,
            "hasMedia": false,
            "body": "بوت",
            "type": "chat",
            "timestamp": 16983472633,
            "from": "9665000000000@c.us",
            "to": "966531896270@c.us",
            "deviceType": "ios",
            "isForwarded": false,
            "forwardingScore": 0,
            "isStatus": false,
            "isStarred": false,
            "fromMe": false,
            "hasQuotedMsg": false,
            "hasReaction": false,
            "vCards": [],
            "mentionedIds": [],
            "isGif": false,
            "links": []
        }
    ]
}
```

{% endtab %}
{% endtabs %}
