Virtual Numbers
Manage your virtual numbers (VNs). Sometimes VNs are referred to as MSNs. They are phone numbers with inbound and outbound functionality. You can communicate with customers through them, or setup automatic communications with them. Learn more about VNs at https://developer.message2give.com/channels/virtual-numbers.
GET Virtual Numbers
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}}/msnsAuthentication Required: Yes
Description
Retrieves all the VNs in your workspace.
Path Parameters
- workspace_id: the ID of your workspace.
{
"msns": {
"61000001234": {"alias": "Dev Alias"}
},
"status": "Found 1 MSN",
}Code Snippet
GET Virtual Number
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/msns/{msn_id}Authentication Required: Yes
Description
Retrieves the details of one VN.
Path Parameters
-
workspace_id: the ID of your workspace.
-
msn_id: the phone number of the VN - eg
61400000000
{
"alias": "John",
"forwarding": {
"61400004321": {
"enabled": false,
"type": "SMS"
},
"Message2Give Chat": {
"enabled": true,
"type": "Console"
},
"john@email.com": {
"enabled": false,
"historyMessages": "2",
"type": "Email"
},
},
"voice": {
"61400005678": {
"enabled": true,
"notifySms": true
}
},
"replies": {
"AgentsOffline": {
"message": "Agent Offline",
"enabled": true
},
"AgentsOnline": {
"message": "Agent Online",
"enabled": false
}
},
"status": "MSN Found"
}Code Snippet
POST Virtual Number
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/msns/{msn_id}Authentication Required: Yes
Description
Updates the configuration of one of your workspace's VNs. The body of the request will update those properties for the selected VN.
Path Parameters
-
workspace_id: the ID of your workspace.
-
msn_id: the phone number of the VN - eg
61400000000
Body Properties
| Property | Type | Description |
|---|---|---|
| alias | string | Display name of the VN. |
Code Snippet
POST Virtual Number SMS Forwarding
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/msns/{msn_id}/forwardingAuthentication Required: Yes
Description
Add an SMS Forwarding route to a Virtual Number.
Path Parameters
-
workspace_id: the ID of your workspace.
-
msn_id: the phone number of the VN - eg
61400000000
Body Properties
| Required | Type | Default | Valid Forwarder Type | Description | |
|---|---|---|---|---|---|
| destination | Yes | String | Console, Email, HTTP, and SMS | The destination of the message. | |
| enabled | Yes | Boolean | Console, Email, HTTP, and SMS | Whether the forwarding destination is currently active. | |
| type | Yes | String | Console, Email, HTTP, and SMS | The type of forwarding destination. Accepts values Console, Email, HTTP, and SMS | |
| noChunkedTransferEncoding | Boolean | false | HTTP | Disables chunked transfer encoding for the HTTP request | |
| httpMethod | String | POST | HTTP | The method of the HTTP request (eg "POST", "GET") | |
| encoding | String | HTTP | The encoding type for the HTTP request body (eg "json") | ||
| includeContext | Boolean | false | HTTP | Adds extra information to the forwarded request body like organisation ID. | |
| historyMessages | Number | 10 | Email | Number of previous messages to show from the conversation. Pulls a transcript (eg "5") | |
| historyTimezone | String | Email | Timezone to use for the history transcript (eg "UTC") | ||
| prefix | String | SMS | A message that will be prefixed to the forwarderd message. | ||
| suffix | String | SMS | A message that will be appended to the end of the forwarderd message. |
Code Snippet
DELETE Virtual Number SMS Forwarding
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/msns/{msn_id}}/forwarding/{value}Authentication Required: Yes
Description
In the Portal, you can setup SMS Forwarding for your VNs. This will forward all the VN's received SMSs to various other destinations. This endpoint will remove one of the SMS forwarding destinations on the VN.
Read more about SMS Forwarding at https://developer.message2give.com/channels/virtual-numbers#sms-forwarding.
Path Parameters
-
workspace_id: the ID of your workspace.
-
msn_id: the phone number of the VN - eg
61400000000 -
value: the SMS forwarding destination you are removing - eg
61400000001. This works for all SMS forwarding destinations - HTTP, email, SMS etc. The destination must be URI encoded.
Code Snippet
Code Snippet
DELETE Virtual Number Voice Forwarding
https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}}/msns/{msn_id}/voice/{value}Authentication Required: Yes
Description
In the Portal, you can setup Voice Forwarding for your VNs. This will forward all the VN's received phone calls to various other destinations. This endpoint will remove one of the voice forwarding destinations on the VN.
Read more about Voice Forwarding at https://developer.message2give.com/channels/virtual-numbers#voice-forwarding.
Path Parameters
-
workspace_id: the ID of your workspace.
-
msn_id: the phone number of the VN - eg
61400000000 -
value: the voice forwarding destination you are removing - eg
61400000001
Code Snippet
How is this guide?