Voicemail Inboxes

The /voicemail_inboxes resource represents XBP's local voicemail inboxes. Inboxes can be attached either as direct destination or destination failovers.

GET /voicemail_inboxes

Example Request

curl https://api.xbp.io/voicemail_inboxes -u API_KEY:

Sample Response

{
  "voicemail_inboxes": [
    {
      "id": 1,
      "url": "/voicemail_inboxes/1",
      "name": "John's Inbox",
      "pin": "",
      "pin_required": false,
      "new_messages": 0,
      "total_messages": 0,
      "email_notification": {
        "enabled": true,
        "attach_voicemail": true,
        "email_addresses": [
          {
            "id": 4,
            "address": "john@example.com",
            "type": "TO",
            "created_at": "2012-08-26T21:53:50Z"
          }
        ]
      }
    },...
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 50,
    "page_size": 44,
    "total_pages": 1,
    "total_records": 44
  }
}

GET /voicemail_inboxes/{id}

Example Request

curl "https://api.xbp.io/voicemail_inboxes/1" \
     -u API_KEY:

Sample Response

{
  "id": 1,
  "url": "/voicemail_inboxes/1",
  "name": "John's Inbox",
  "pin": "1234",
  "pin_required": true,
  "new_messages": 5,
  "total_messages": 7,
  "email_notification": {
    "enabled": true,
    "attach_voicemail": true,
    "email_addresses": [
      {
        "id": 1,
        "address": "john@example.com",
        "type": "TO",
        "created_at": "2012-09-26T20:56:42Z"
      },
      {
        "id": 2,
        "address": "john@example.com",
        "type": "BCC",
        "created_at": "2013-02-02T02:02:03Z"
      }
    ]
  },
  "created_at": "2012-09-26T20:56:42Z",
  "updated_at": "2013-10-26T20:56:42Z"
}

Voicemail Inbox Properties

Name Description
id The id of the voicemail inbox
url The url of the voicemail inbox
pin PIN code of the voicemail inbox.
pin_required When pin_required is set to true, the inbox owners have to enter it every time they want to check their voicemails from their desk phones.
new_messages

Number of new messages.

total_messages

Total messages. The sum of old and new messages.

email_notification

A JSON object representing inbox email settings for notification purposes.

When email notification is enabled, upon receiving any new voicemails, they get emailed to the array email objects listed in email_addresses

created_at The date that this resource was created in ISO 8601 format.
updated_at The date that this resource was updated in ISO 8601 format.

GET /voicemail_inboxes/{id}/voicemails

Example Request

curl https://api.xbp.io/voicemail_inboxes/1/voicemails -u API_KEY:

Sample Response

{
  "voicemails": [
    {
      "id": 3956,
      "url": "/voicemails/3956",
      "duration": 5,
      "is_new": false,
      "from": {
        "type": "Phone",
        "number": "+18885551234"
      },
      "via_phone_number": {
        "number": "+14085553344",
        "url": "/phone_numbers/+14085553344"
      },
      "download_url": "/voicemails/3956.mp3",
      "created_at": "2015-06-02T15:52:10Z"
    }...
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 50,
    "page_size": 2,
    "total_pages": 1,
    "total_records": 2
  }
}

Response

For voicemail properties please check out Get Single Voicemail