Getting started
APIs
Business SMS
Automation
Use cases
Create Trello Card for Voicemails Received
Send Call Data to Google Sheets
Slack Notifications from Call Events
Trigger SMS Messages from Your CRM
VirtualText API is intended for integrating external platforms and business tools.
Our API allows you to send outbound SMS and MMS messages, list, create and update contacts as well as list. Please read the documentation below for implementing the API.
<aside> 💡 Outbound Marketing Use is not supported on this API. Any outbound marketing messages sent via API may result in termination of your API access.
</aside>
<aside> 💡 VirtualText Pro support marketing using Drip Campaigns and Campaigns to contact lists. Please contact our team to learn more.
</aside>
All API requests require an Authorization header that includes a valid Bearer token composed of an Account User ID and Access Token.
Type | Value |
---|---|
Authorization | Bearer accountUid:accessToken |
Relay is a feature that enables the synchronization of messages that are sent or received to a user's phone number with external systems like CRMs, Support Desk software, and more.
In VirtualText under Integrations, a webhook can be configure to relay all SMS and MMS messages received by a user to external systems.
Relay sends a POST to the Relay Webhook URL when a message is sent or received. The POST body is formatted as such:
{
MessageID: 'abc123xyz', // the unique message ID
ConversationID: "xyz321cba", //the unique contact ID
ToNumber: "+15555555555", //the number the message was sent to
FromNumber: "+13333333333", //the number the message was sent from
MessageBody: "Hello, world!", //the message body
MessageDirection: "in", //the message direction (either "in" or "out")
TextableUserID: "lmnopqrstuv", //the user id of the account that sent or received the message,
ContactName: "John Doe", //the Full Name property of the contact,
ContactEmail: "[email protected]", //the e-mail address of the contact (if available),
Media: ["<https://sampleUrl.com/URL1","https://sampleUrl.com/URL2>"], //all MMS attachment urls associated with the message (if any)
}
You may send individual SMS and/or MMS message using this API endpoint.
Type | Value |
---|---|
Authorization | Bearer accountUid:accessToken |
Content-type | application/json |
Name | Type | Description |
---|---|---|
to | String | This should be an e.164 formatted phone number (e.g. +15555555555). |
from | String | This should the e.164 formatted phone number assigned to the user (e.g. +15555555555). |
message | String | This is the message body as a string. |
media | Array | (Optional) This should be an array of media files as publicly available URLs. |
sendStatus | String | (Optional) Set to "sent". This is useful if you interact directly with your carrier API's but want to store the message in the conversation history. When set, we will NOT send this through the carrier APIs and assume that you already have. |
{
"to":"+15555555555"
"from":+14444444444
"message": "Hello, world!",
"media": [
"<https://picsum.photos/200/300>" ]
}
{
"status": "true"
}
{
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
Creates an contact in VirtualText for the authenticated user.
Type | Value |
---|---|
Authorization | Bearer accountUid:accessToken |
Content-type | application/json |
Name | Type | Description |
---|---|---|
phoneNumber | String | Required. This should be an e.164 formatted phone number (e.g. +15555555555). |
fullName | String | (Optional) If not set, fullName will be set to the phoneNumber value. |
String | (Optional) |
{
"phoneNumber":"+15554442222",
"fullName":"John Doe",
"email": "[email protected]"
}
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "[email protected]"
}
{
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
Updates a contact.
POST https://public-api.virtualtext.com/api/contacts/{id}
| --- | --- |
| --- | --- | --- |
{
"phoneNumber":"+15554442222",
"fullName":"John Doe",
"email": "[email protected]"
}
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "[email protected]"
}
{
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
Get a contact.
GET https://public-api.virtualtext.com/api/contacts/{id}
| --- | --- |
{
"id": "xyzabc123"
"fullName": "John Doe"
"phoneNumber": "+15554442222"
"email": "[email protected]"
}
{
"errors":['Missing parameter '[fieldName]' (e.g. accountUid, accessToken, etc.).', ]
}
Gets a list of contact contact for the authenticated user.
GET https://public-api.virtualtext.com/api/contacts