WA message API API WhatsApp Web

Change Profile Picture

Concept

In this section, we will cover how you can change the profile picture of your instance.

To do this, simply send a PUT request to the following URL:

Base URL

Base URL: https://apiwhatsappweb.com/api/config/image

Authentication

To authenticate the requests, you must include the API Key (apiKey) and the instance ID ID in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}

Request Body

The request body should be a JSON object with the following structure:

{
    "image": "imageFile" // Send the image in the body
}

API Responses

The API can respond with the following messages:

โœ… Success Response:

{
    "200": { "success": "Image changed" } 
} // Image changed successfully

โŒ Error: Image not found

{
    "500": { "error": "No image provided. Please upload a file, send a Base64 string, or provide a URL." } 
}

โŒ Error: Invalid image format

{
    "500": { "error": "Image format error" } 
}

โŒ Error: Instance not found

{
    "400": { "error": "Instance not found" } 
} // Check the instance data

Enable Auto Read

Concept

In this section, we cover how you can enable automatic message reading on the Instance.

Send a POST request to the following URL to enable auto-read:

Base URL

Base URL: https://apiwhatsappweb.com/api/config/automatic

Authentication

To authenticate the requests, you must include the API Key (apiKey) and the instance ID ID in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}

How to Set Up Auto Read

Request Body

The request body should be a JSON object with the following structure:

{
    "read": true // Send true to enable auto-read and false to disable
}

Responses

The API may return the following responses:

Success Response:

{
    "200": { "success": "Automatic reading Updated" } 
} // Auto-read updated

Format Error:

{
    "500": { "error": "Body in wrong format" } 
} // Request body in incorrect format

Instance Not Found:

{
    "400": { "error": "instance not found" } 
} // Instance not found, check the data

Change Name

Concept

In this section, we cover how you can change the name of your account on the Instance.

Send a POST request to the following URL:

This API allows you to change the WhatsApp profile name through a POST request.

Base URL

Base URL: https://apiwhatsappweb.com/api/config/name

Authentication

To authenticate the requests, you must include the API Key (apiKey) and the instance ID ID (identification) in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}

Request Body

The request body should be a JSON object with the following structure:

{
    "name": "Jonatan" // Send the new name for the account
}

Response

The response can be one of the following messages:

Response 1 (Success):

{
    "200": { "success": "Name Updated" } 
} // Name updated

Response 2 (Body format error):

{
    "500": { "error": "Body in wrong format" } 
} // Request body in incorrect format

Response 3 (Instance not found):

{
    "400": { "error": "Instance not found" } 
} // Instance not found, check the data

Change Description

Concept

In this section, we cover how you can change the description of your account in the Instance.

Send a POST request to the following URL:

Base URL

Base URL: https://apiwhatsappweb.com/api/config/description

Authentication

To authenticate the requests, you must include the API Key (apiKey) and the instance ID ID (identification) in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}

Request Body

The request body should be a JSON object with the following structure:

{
    "description": "This is my small store on WhatsApp"
}

Response

The response can be one of the following messages:

Response 1:

{
    "200": { "success": "Description Updated" } 
} // Description updated

Response 2:

{
    "500": { "error": "Body in wrong format" } 
} // Incorrect body format

Response 3:

{
    "400": { "error": "Instance not found" } 
} // Instance not found, check the data

Send QR-CODE

Concept

In this section, we cover how you can receive the QR-CODE of the Instance via the API.

Send a POST request to the following URL:

Base URL

Base URL: https://apiwhatsappweb.com/api/config/qr

Authentication

To authenticate the requests, include the API Key (apiKey) and the instance ID Id (identification) in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}

Response

You will receive the QR-CODE in response:

{
    "200": { "success": "QR-CODE sent", "QR": "base64" } // Response in BASE64 format
}

Attention!

If the instance is not found, you will receive the error below. Please check if the data is correct.

Error Example

{
    "400": { "error": "instance not found" } 
}

Disconnect Instance

Concept

In this section, we cover how you can disconnect the Instance via the API.

Send a POST request to the following URL to disconnect the WhatsApp instance.

Base URL

URL: https://apiwhatsappweb.com/api/config/disconnect

Authentication

To authenticate the requests, include the API Key (apiKey) and the Instance ID (id) in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}
    

Responses

The API may return the following responses:

Instance disconnected:

{
    "200": { "success": "instance disconnected" }
}
            

Instance was already disconnected:

{
    "200": { "success": "instance was already disconnected" }
}
            

Instance not found:

{
    "400": { "error": "instance not found" }
}
            

Instance Status

Concept

In this section, we cover how to check the status of the Instance via the API.

To get the instance status, send a POST request to the following URL:

Base URL

URL: https://apiwhatsappweb.com/api/config/status

Authentication

To authenticate the requests, include the API Key (apiKey) and the Instance ID (id) in the request header.

{
    "apiKey": "Your API key here",
    "id": "Your instance ID here"
}
    

API Responses

The API can return the following responses:

โœ… Instance is active:

{
    "200": { "success": "Instance active" }
}
            

โš ๏ธ Instance is disconnected:

{
    "200": { "success": "Instance inactive" }
}
            

โŒ Instance not found:

{
    "400": { "error": "Instance not found" }
}