Edit an Alarm

Edit alarm settings of a specific extension.

Request URL

{base_url}/{api_path}/wakeupcall/update?token={token}

Request parameters

Parameter Required Type Description
number Yes String Extension number.
wakeupid Yes Integer The unique ID of an alarm.
wakeup Yes Object <ExtensionWakeup> Alarm information.
ExtensionWakeup
Parameter Required Type Description
time Yes String Alarm time.
type Yes String Alarm type.

Valid values:

  • onetime

    The alarm will be automatically deleted after it is repeated for the designated times.

  • everyday
  • custom

    If type is set to custom, weekdays is required.

weekdays No Integer The applicable days of week when type is set to custom.

Valid values: 0-6.

0 means Sunday, and 1-6 means Monday to Saturday.

Note:

If type is set to custom, weekdays is required.

repeats Yes Integer How many times will the alarm be repeated.

Valid values: 1-3

repeatinterval No String The interval in minutes between each repeat.

Set repeats and repeatinterval at the same time. After the phone rings for the first time, it will ring again after the interval.

prompt No String Alarm prompt.

prompt must be custom prompt. If prompt is not set, the default prompt "macroform-cold_day" will be played.

Response parameters

Parameter Type Description
status String Request result.
  • Success
  • Failed

Examples

Request example

Edit alarm settings of extension 4000.
POST /api/v2.0.0/wakeupcall/update?token=1e3b3ebb6a974cb42ed31de5413df52d
Content-Type:application/json; charset=utf-8
Host: 192.168.5.150

{
	"number": "4001",
	"wakeupid": "25",
	"wakeup": 
		{
			"time": "12:00",
			"type": "onetime"
		}
}
Response example
HTTP/1.1 200 OK
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: close
Content-Type: application/json
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE

{
    "status": "Success"
}