Pre Alerting Announcement

Display user’s pre alerting alerting announcement

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

Retrieve the settings of the Pre Alerting Announcement service of the user; i.e. the announcement that will be played to the calling party before the called party will start ringing.

Example request:

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

Example response:

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

{
     "active": false,
     "audioSelection": "File",
     "audioFile": {
          "name": "APIO User Test Announcement"
     },
     "criteria": [
          {
               "name": "test",
               "active": true,
               "callsFrom": "All calls",
               "doNotPerformAction": false,
               "fromDnCriteria": {
                    "includeAnonymousCallers": false,
                    "selection": "Any",
                    "phoneNumbers": [],
                    "includeUnavailableCallers": false
               }
          }
     ]
}
Response JSON Object:
  • active (boolean) – the status of the service.

  • audioSelection (string) – the the selection of the file to be played.

  • audioFile (object) – an objects as defined as Audio File attributes.

  • criteria (array) – a list of criteria objects as defined as Criteria in List attributes.

Status Codes:

Update a user’s pre alerting announcement

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

Update the settings of the Pre Alerting Announcement service of the user.

Example request:

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

{
     "active": true,
     "audioSelection": "Default",
     "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:
  • active (boolean) – the status of the service.

  • audioSelection (string) – the the selection of the file to be played.

  • audioFile (object) – an objects as defined as Audio File attributes. Or None to remove the currently configured audioFile.

  • criteria (array) – a list of criteria objects as defined as Criteria attributes.

Status Codes:

Display user’s pre alerting announcement criteria

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

Retrieve the settings of the specified Pre Alerting Announcement’s criteria.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/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 pre alerting announcement criteria

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

Create a new Pre Alerting Announcement’s criteria.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/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"
          ]
     }
}
Request JSON Object:

Example response:

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

Update a user’s pre alerting announcement criteria

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

Update the settings of the Pre Alerting Announcement service of the user.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/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:

Delete a user’s pre alerting announcement criteria

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

Delete the specified Pre Alerting Announcement’s criteria.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/services/pre_announcement/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: