Message2Give Logo
Message2Give DocsVersion 1.2.8

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}}/msns

Authentication Required: Yes

Description

Retrieves all the VNs in your workspace.

Path Parameters

  • workspace_id: the ID of your workspace.
Example JSON Response
{
  "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

Example JSON Response
{
"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

PropertyTypeDescription
aliasstringDisplay 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}/forwarding

Authentication 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

RequiredTypeDefaultValid Forwarder TypeDescription
destinationYesStringConsole, Email, HTTP, and SMSThe destination of the message.
enabledYesBooleanConsole, Email, HTTP, and SMSWhether the forwarding destination is currently active.
typeYesStringConsole, Email, HTTP, and SMSThe type of forwarding destination. Accepts values Console, Email, HTTP, and SMS
noChunkedTransferEncodingBooleanfalseHTTPDisables chunked transfer encoding for the HTTP request
httpMethodStringPOSTHTTPThe method of the HTTP request (eg "POST", "GET")
encodingStringHTTPThe encoding type for the HTTP request body (eg "json")
includeContextBooleanfalseHTTPAdds extra information to the forwarded request body like organisation ID.
historyMessagesNumber10EmailNumber of previous messages to show from the conversation. Pulls a transcript (eg "5")
historyTimezoneStringEmailTimezone to use for the history transcript (eg "UTC")
prefixStringSMSA message that will be prefixed to the forwarderd message.
suffixStringSMSA 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?

On this page