Message Status API

End Point: https://wbiztool.com/api/v1/message/status/<message_id>/
Request Type: POST
Required Fields in Request
  • client_id (Integer) - Your Client Id (Given on API Keys page)
  • api_key (String) - Your API Key (Given on API Keys page)
  • message_id (Integer) - Message ID received from Send Message API response (in URL path)
Fields in Response
  • status (Integer) - Message delivery status code (0=Pending, 1=Sent, 2=Failed, 3=Cancelled, 4=Expired)
  • status_text (String) - Human-readable status description
  • message (String) - Response message
  • error (String) - Error message if the message failed (only if status is failed)
Example

Use this API to check the delivery status of a message you sent. Replace <message_id> with the actual message ID from the Send Message API response.

curl -X POST https://wbiztool.com/api/v1/message/status/12345/  -d '{
    "client_id": "client_id",
    "api_key": "api_key"
}'

// Response (Success)
{"status": 1, "status_text": "Sent", "message": "connected"}

// Response (Failed)
{"status": 2, "status_text": "Failed", "message": "connected", "error": "Invalid phone number"}

Check Message Status with Python

Use our official Python package: We recommend using our official Python client for easier integration.
Install it with: pip install wbiztool-client
import requests

# Message ID received from Send Message API
message_id = 12345  

data = {
    "client_id": "client_id",
    "api_key": "api_key"
}

url = f'https://wbiztool.com/api/v1/message/status/{message_id}/'
response = requests.post(url, data=data)
result = response.json()

print(f"Status Code: {result['status']}")
print(f"Status Text: {result['status_text']}")
print(f"Message: {result['message']}")

if 'error' in result:
    print(f"Error: {result['error']}")

Check Message Status with PHP


Check Message Status with Node.js

Use our official Node.js package: We recommend using our official Node.js client for easier integration.
Install it with: npm install wbiztool-client
const request = require('request');

// Message ID received from Send Message API
const messageId = 12345;

const data = {
    client_id: "client_id",
    api_key: "api_key"
};

const options = {
    url: `https://wbiztool.com/api/v1/message/status/${messageId}/`,
    method: 'POST',
    form: data
};

request(options, (error, response, body) => {
    if (!error && response.statusCode === 200) {
        const result = JSON.parse(body);
        console.log(`Status Code: ${result.status}`);
        console.log(`Status Text: ${result.status_text}`);
        console.log(`Message: ${result.message}`);
        
        if (result.error) {
            console.log(`Error: ${result.error}`);
        }
    } else {
        console.log('Request failed:', error);
    }
});