# WhatsApp Automation Server Status API

This API request will fetch the WhatsApp Automation Server Status also able to remotely control your WhatsApp Server by giving Commands like Server Reboot, App Restart, Clear Queue etc&#x20;

## WhatsApp Server Status Request

<mark style="color:green;">`POST`</mark> `https://pickyassist.com/app/api/v2/device-status`

This API request will fetch the WhatsApp Server Status&#x20;

#### Request Body

| Name        | Type   | Description                  |
| ----------- | ------ | ---------------------------- |
| token       | string | Your API Token               |
| application | string | 10 = WhatsApp Web Automation |

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

```javascript
{
   "project_id":"929",
   "status":"CONNECTED",
   "connected_number":"1341881114",
   "version":"2.2119.6",
   "message_queue_count":0,
   "time":"2021-06-01T14:05:26+05:30"
}
```

{% endtab %}
{% endtabs %}

### Sample Request

```javascript
{
  "token": "2fb9da4f0544f6c57883a0122188121f29",
  "application" : 10
}

```

### Sample Response

```javascript
{
   "project_id":"929",
   "status":"CONNECTED",
   "connected_number":"1341881114",
   "version":"2.2119.6",
   "message_queue_count":0,
   "time":"2021-06-01T14:05:26+05:30"
}
```

### Response Variables&#x20;

| **Variable**          | **Type** | **Description**                                                                                                                                                                     |
| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| project\_id           | Numeric  | Project id associated with the Server                                                                                                                                               |
| status                | String   | <p>CONNECTED = Connection Established <br></p><p>TIMEOUT = Please check your Phone Internet Connection <br></p><p>UNPAIRED = WhatsApp Web is not paired with our Server </p><p></p> |
| connected\_number     | Numeric  | WhatsApp Number Connected to the Server                                                                                                                                             |
| version               | String   | WhatsApp Web Version                                                                                                                                                                |
| message\_queue\_count | Numeric  | Messages Queue count if any in the WhatsApp Server                                                                                                                                  |
| time                  | Date     | ISO Standard Date & Time as per the Timezone configuration in your Profile                                                                                                          |

## Server Command API's

The Server Command API allows you to manage the Server with various commands which can be used in various situations as below;

{% hint style="info" %}
You need to pass your command through **“command”** tag&#x20;
{% endhint %}

| **Command**          | **Description**                                                                                                                                                                   |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| restart              | This will restart the WhatsApp Automation App installed in the Server, you need to call this API if the QR code is not showing or facing some connection issues                   |
| restart-server       | This will restart the WhatsApp Automaton Server along with its App & Database, this API needs to be triggered only if you are facing any issues which "restart" app is not solved |
| delete-message-queue | This command will delete all messages which are in Queue                                                                                                                          |
| disconnect           | This will disconnect the existing connected number with the Server, you must call this API before connecting another number to the Server                                         |
| clearlogs            | This will clear all data and logs stored in your server, you need to trigger this command before connecting another number to your WhatsApp Server                                |

## Server Command API's

<mark style="color:green;">`POST`</mark> `https://pickyassist.com/app/api/v2/device-action`

This API allows you to command your server remotely like , clearing a queue , restart the app or server etc.

#### Path Parameters

| Name        | Type   | Description                       |
| ----------- | ------ | --------------------------------- |
| token       | string | API Token                         |
| command     | string | Command Which need to be executed |
| application | number | 10 = WhatsApp Web Automation      |

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

```
{
  "status": 100,
  "message": "Success"
}
```

{% endtab %}
{% endtabs %}

### Sample Request&#x20;

```javascript
{
   "token":"f068950cf8a61e666bd8644c26dbf556e3bd",
   "command":"disconnect",
   "application":10
}
```

### Sample Response

```javascript
{
  "status": 100,
  "message": "Success"
}
```


---

# Agent Instructions: 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://help.pickyassist.com/api-documentation-v2/device-manage-apis/whatsapp-automation-server-status-api.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.
