V Pixel Pro SMS API Documentation

V Pixel Pro SMS API Documentation

Introduction

This documentation provides instructions and examples for using the V Pixel Pro SMS API to integrate SMS messaging into your applications. Before you begin, make sure you have your API key ready. You can find it in your V Pixel Pro SMS account dashboard.

Send Single Message

Sends a single SMS or MMS message.

Parameters

Parameter Type Description
`$number` string The recipient’s mobile number.
`$message` string The message content.
`$device` int|string, optional The device ID or SIM slot to use (e.g., 1, “1|0”). Defaults to 0 (primary device).
`$schedule` int, optional The timestamp for scheduled sending. Defaults to null (send immediately).
`$isMMS` bool, optional Set to true to send as MMS. Defaults to false (SMS).
`$attachments` string, optional Comma-separated list of image URLs for MMS attachments.
`$prioritize` bool, optional Set to true to prioritize the message. Defaults to false.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/send.php \
-d "key=YOUR_API_KEY" \
-d "number=+11234567890" \
-d "message=This is a test message."
      

PHP Example


sendSingleMessage("+11234567890", "This is a test message.");
      

C# Example


// Assuming you have a function named 'sendSingleMessage' available in your C# code

sendSingleMessage("+11234567890", "This is a test message."); 
      

Send Messages

Sends multiple SMS or MMS messages.

Parameters

Parameter Type Description
`$messages` array An array of messages, where each message is an array containing `number` and `message` keys.
`$option` int, optional Device selection option. Can be `USE_SPECIFIED` (0), `USE_ALL_DEVICES` (1), or `USE_ALL_SIMS` (2). Defaults to `USE_SPECIFIED`.
`$devices` array, optional An array of device IDs or SIM slots to use. Required if `$option` is `USE_SPECIFIED`.
`$schedule` int, optional The timestamp for scheduled sending. Defaults to null (send immediately).
`$useRandomDevice` bool, optional Set to true to use a random device from the selected devices. Defaults to false.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/send.php \
-d "key=YOUR_API_KEY" \
-d "messages=[{\"number\":\"+11234567890\",\"message\":\"Message 1\"},{\"number\":\"+19876543210\",\"message\":\"Message 2\"}]"
      

PHP Example


$messages = [
  ["number" => "+11234567890", "message" => "Message 1"],
  ["number" => "+19876543210", "message" => "Message 2"]
];
sendMessages($messages);
      

C# Example


// Assuming you have a function named 'sendMessages' available in your C# code

var messages = new[] 
{
  new { number = "+11234567890", message = "Message 1" },
  new { number = "+19876543210", message = "Message 2" }
};
sendMessages(messages);
      

URL Example


https://sms.vpixelpro.com/services/send.php?key=YOUR_API_KEY&number[]=12345678790&number[]=0987654321&message=Your+Messages&devices=2&type=sms&prioritize=0
      

Send Message To Contacts List

Sends a message to a list of contacts.

Parameters

Parameter Type Description
`$listID` int The ID of the contact list.
`$message` string The message content.
`$option` int, optional Device selection option. Can be `USE_SPECIFIED` (0), `USE_ALL_DEVICES` (1), or `USE_ALL_SIMS` (2). Defaults to `USE_SPECIFIED`.
`$devices` array, optional An array of device IDs or SIM slots to use. Required if `$option` is `USE_SPECIFIED`.
`$schedule` int, optional The timestamp for scheduled sending. Defaults to null (send immediately).
`$isMMS` bool, optional Set to true to send as MMS. Defaults to false (SMS).
`$attachments` string, optional Comma-separated list of image URLs for MMS attachments.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/send.php \
  -d "key=YOUR_API_KEY" \
  -d "listID=1" \
  -d "message=This is a test message to a contact list."
        

PHP Example


sendMessageToContactsList(1, "This is a test message to a contact list.");
        

C# Example


// Assuming you have a function named 'sendMessageToContactsList' available in your C# code

sendMessageToContactsList(1, "This is a test message to a contact list.");
        

Get Message By ID

Retrieves a message by its ID.

Parameters

Parameter Type Description
`$id` int The ID of the message.

Return Value

An array containing information about the message.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/read-messages.php \
  -d "key=YOUR_API_KEY" \
  -d "id=123" 
        

PHP Example


getMessageByID(123);
        

C# Example


// Assuming you have a function named 'getMessageByID' available in your C# code

getMessageByID(123);
        

Get Messages By Group ID

Retrieves messages by their group ID.

Parameters

Parameter Type Description
`$groupID` string The group ID of the messages.

Return Value

An array containing information about the messages.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/read-messages.php \
  -d "key=YOUR_API_KEY" \
  -d "groupId=YOUR_GROUP_ID" 
        

PHP Example


getMessagesByGroupID("YOUR_GROUP_ID");
        

C# Example


// Assuming you have a function named 'getMessagesByGroupID' available in your C# code

getMessagesByGroupID("YOUR_GROUP_ID");
        

Get Messages By Status

Retrieves messages by their status.

Parameters

Parameter Type Description
`$status` string The status of the messages (e.g., “Pending”, “Sent”, “Delivered”).
`$deviceID` int, optional The device ID to filter messages by.
`$simSlot` int, optional The SIM slot to filter messages by.
`$startTimestamp` int, optional The starting timestamp for filtering messages.
`$endTimestamp` int, optional The ending timestamp for filtering messages.

Return Value

An array containing information about the messages.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/read-messages.php \
  -d "key=YOUR_API_KEY" \
  -d "status=Pending" 
        

PHP Example


getMessagesByStatus("Pending");
        

C# Example


// Assuming you have a function named 'getMessagesByStatus' available in your C# code

getMessagesByStatus("Pending");
        

Resend Message By ID

Resends a message by its ID.

Parameters

Parameter Type Description
`$id` int The ID of the message to resend.

Return Value

An array containing information about the resent message.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/resend.php \
  -d "key=YOUR_API_KEY" \
  -d "id=123" 
        

PHP Example


resendMessageByID(123);
        

C# Example


// Assuming you have a function named 'resendMessageByID' available in your C# code

resendMessageByID(123);
        

Resend Messages By Group ID

Resends messages by their group ID.

Parameters

Parameter Type Description
`$groupID` string The group ID of the messages to resend.
`$status` string, optional The status of messages to resend (e.g., “Failed”).

Return Value

An array containing information about the resent messages.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/resend.php \
  -d "key=YOUR_API_KEY" \
  -d "groupId=YOUR_GROUP_ID" 
        

PHP Example


resendMessagesByGroupID("YOUR_GROUP_ID");
        

C# Example


// Assuming you have a function named 'resendMessagesByGroupID' available in your C# code

resendMessagesByGroupID("YOUR_GROUP_ID");
        

Resend Messages By Status

Resends messages by their status.

Parameters

Parameter Type Description
`$status` string The status of the messages to resend (e.g., “Failed”).
`$deviceID` int, optional The device ID to filter messages by.
`$simSlot` The SIM slot to filter messages by.
`$startTimestamp` int, optional The starting timestamp for filtering messages.
`$endTimestamp` int, optional The ending timestamp for filtering messages.

Return Value

An array containing information about the resent messages.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/resend.php \
  -d "key=YOUR_API_KEY" \
  -d "status=Failed" 
        

PHP Example


resendMessagesByStatus("Failed");
        

C# Example


// Assuming you have a function named 'resendMessagesByStatus' available in your C# code

resendMessagesByStatus("Failed");
        

Add Contact

Adds a new contact to a contact list.

Parameters

Parameter Type Description
`$listID` int The ID of the contact list.
`$number` string The mobile number of the contact.
`$name` string, optional The name of the contact.
`$resubscribe` bool, optional Set to true to resubscribe the contact if it already exists. Defaults to false.

Return Value

An array containing information about the added contact.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/manage-contacts.php \
  -d "key=YOUR_API_KEY" \
  -d "listID=1" \
  -d "number=+11234567890" \
  -d "name=John Doe" 
        

PHP Example


addContact(1, "+11234567890", "John Doe");
        

C# Example


// Assuming you have a function named 'addContact' available in your C# code

addContact(1, "+11234567890", "John Doe");
        

Unsubscribe Contact

Unsubscribes a contact from a contact list.

Parameters

Parameter Type Description
`$listID` int The ID of the contact list.
`$number` string The mobile number of the contact.

Return Value

An array containing information about the unsubscribed contact.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/manage-contacts.php \
  -d "key=YOUR_API_KEY" \
  -d "listID=1" \
  -d "number=+11234567890" \
  -d "unsubscribe=true" 
        

PHP Example


unsubscribeContact(1, "+11234567890");
        

C# Example


// Assuming you have a function named 'unsubscribeContact' available in your C# code

unsubscribeContact(1, "+11234567890");
        

Get Balance

Retrieves your remaining message credits.

Return Value

A string representing the number of message credits or “Unlimited”.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/send.php \
  -d "key=YOUR_API_KEY" 
        

PHP Example


getBalance();
        

C# Example


// Assuming you have a function named 'getBalance' available in your C# code

getBalance();
        

Send USSD Request

Sends a USSD request.

Parameters

Parameter Type Description
`$request` string The USSD request string (e.g., “*150#”).
`$device` int The device ID to use.
`$simSlot` int, optional The SIM slot to use. Defaults to null.

Return Value

An array containing information about the sent USSD request.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/send-ussd-request.php \
  -d "key=YOUR_API_KEY" \
  -d "request=*150#" \
  -d "device=1" 
        

PHP Example


sendUssdRequest("*150#", 1);
        

C# Example


// Assuming you have a function named 'sendUssdRequest' available in your C# code

sendUssdRequest("*150#", 1);
        

Get USSD Request By ID

Retrieves a USSD request by its ID.

Parameters

Parameter Type Description
`$id` int The ID of the USSD request.

Return Value

An array containing information about the USSD request.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/read-ussd-requests.php \
  -d "key=YOUR_API_KEY" \
  -d "id=123" 
        

PHP Example


getUssdRequestByID(123);
        

C# Example


// Assuming you have a function named 'getUssdRequestByID' available in your C# code

getUssdRequestByID(123);
        

Get USSD Requests

Retrieves USSD requests.

Parameters

Parameter Type Description
`$request` string The request text to filter by.
`$deviceID` int, optional The device ID to filter by.
`$simSlot` int, optional The SIM slot to filter by.
`$startTimestamp` int, optional The starting timestamp for filtering.
`$endTimestamp` int, optional The ending timestamp for filtering.

Return Value

An array containing information about the USSD requests.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/read-ussd-requests.php \
  -d "key=YOUR_API_KEY" \
  -d "request=*150#" 
        

PHP Example


getUssdRequests("*150#");
        

C# Example


// Assuming you have a function named 'getUssdRequests' available in your C# code

getUssdRequests("*150#");
        

Get Devices

Retrieves all enabled devices.

Return Value

An array containing information about the devices.

cURL Example


curl -X POST https://sms.vpixelpro.com/services/get-devices.php \
  -d "key=YOUR_API_KEY" 
        

PHP Example


getDevices();
        

C# Example


// Assuming you have a function named 'getDevices' available in your C# code

getDevices();