Custom Ring Back

Display user’s custom ring back

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/

Retrieve the settings of the Custom Ring Back service of the user.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
     "criteria": [
          {
               "name": "test",
               "active": true,
               "callsFrom": "All calls",
               "doNotPerformAction": false,
               "fromDnCriteria": {
                    "includeAnonymousCallers": false,
                    "selection": "Any",
                    "phoneNumbers": [],
                    "includeUnavailableCallers": false
               }
          }
     ]
}
Response JSON Object:
Status Codes:

Update a user’s custom ring back

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/

Update the settings of the Custom Ring Back service of the user.

This API allows to manage several criteria at a time including creating, deleting, updating.

However it is recommanded (from REST point of view) to used the dedicated individual end points described later in this page.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "criteria": [
          {
               "name": "test",
               "active": true
          },
          {
               "name": "test2",
               "active": false,
               "callsFrom": "All calls",
               "doNotPerformAction": false,
               "fromDnCriteria": {
                    "includeAnonymousCallers": false,
                    "selection": "Any",
                    "phoneNumbers": [],
                    "includeUnavailableCallers": false
               }
          },
          {
               "name": "test3",
               "delete": true
          }
     ]
}

Example response:

HTTP/1.1 200 OK
Request JSON Object:
Status Codes:

Display user’s custom ring back criteria

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/criteria/(string: instance_name)/

Retrieve the settings of the specified Custom Ring Back’s criteria.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/criteria/foocriteria/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
     "name": "test",
     "active": true,
     "timeSchedule": {
          "level": "User",
          "name": "Every Friday",
          "type": "Time"
     },
     "holidaySchedule": {
          "level": "User",
          "name": "Every Easter",
          "type": "Holiday"
     },
     "fromDnCriteria": {
          "selection": "Any",
          "includeAnonymousCallers": false,
          "includeUnavailableCallers": true,
          "phoneNumbers": [
               "+3225126777"
          ]
     },
     "doNotPerformAction": false
}
Response JSON Object:
Status Codes:

Create a user’s custom ring back criteria

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/criteria/

Update the settings of the Custom Ring Back’s criteria.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/criteria/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "name": "test",
     "active": true,
     "timeSchedule": {
          "level": "User",
          "name": "Every Friday",
          "type": "Time"
     },
     "holidaySchedule": {
          "level": "User",
          "name": "Every Easter",
          "type": "Holiday"
     },
     "fromDnCriteria": {
          "selection": "Any"
          "includeAnonymousCallers": false,
          "includeUnavailableCallers": true,
          "phoneNumbers": [
               "+3225126777"
          ]
     },
     "audioSelection": "File",
     "audioFile": {
          "name": "APIO User Test Announcement"
     },
     "callWaitingAudioSelection": "File",
     "callWaitingAudioFile": {
          "name": "Call Waiting Announcement"
     },
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Response JSON Object:
Status Codes:

Update a user’s custom ring back criteria

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/criteria/(string: instance_name)/

Update the settings of the Custom Ring Back service of the user.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/criteria/foocriteria/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "name": "test",
     "newName": "test_new",
     "active": true,
     "timeSchedule": {
          "level": "User",
          "name": "Every Friday",
          "type": "Time"
     },
     "holidaySchedule": {
          "level": "User",
          "name": "Every Easter",
          "type": "Holiday"
     },
     "fromDnCriteria": {
          "selection": "Any"
          "includeAnonymousCallers": false,
          "includeUnavailableCallers": true,
          "phoneNumbers": [
               "+3225126777"
          ]
     }
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Response JSON Object:
Status Codes:

Disassign a user’s custom ring back criteria

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/services/custom_ringback/criteria/(string: instance_name)/

Disassign the settings of the specified Custom Ring Back’s criteria.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/custom_ringback/criteria/foocriteria/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
     "name": "test"
}

Example response:

HTTP/1.1 200 OK
Response JSON Object:
Status Codes: