Edit an alarm

Edit the configuration of an alarm.

Request URL

POST {base_url}/{api_path}/wakeupcall/update?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
id Yes Integer The unique ID of an alarm.
Note: You can query alarm's ID using Query Alarm List.
alarm_time No String The alarm time in 24-hour clock format. For example: 07:30.
repeat_type No String The schedule and specific days for repeating the alarm.
Valid value:
  • never (default)
  • every_monday
  • every_tuesday
  • every_wednesday
  • every_thursday
  • every_friday
  • every_saturday
  • every_sunday
Note:
  • Use a comma to separate multiple types.
  • If repeat_type is set to never, PBX will delete the alarm after the alarm has been repeated for the designated repeat times.
number_of_snoozes No Integer How many times will the alarm be repeated.
Valid value:
  • 0 (default)
  • 1
  • 2
  • 3
snooze_duration No Integer The interval in minutes between each repeat.

Default value: 10

alarm_prompt No String The name of alarm prompt.
Note:
  • If you don't set the parameter, the system will play the Music on Hold (MoH).
  • This must be a custom prompt. You can obtain the custom prompt name on PBX web portal (Path: PBX Settings > Voice Prompt > Custom Prompt).
alarm_day No String Alarm date.

Time format: YYYY/MM/DD, where Y represents the year, M represents the Month, and D represents the Day. For example, enter 2025/01/05.

repeat_option No String The frequency for repeating the alarm.
Valid value:
  • never
  • every_day
  • every_week
  • every_month
ring_timeout No Integer The amount of time in seconds that the alarm will ring before timeout.
fail_dest_type No String The failover destination type.
Valid value:
  • hangup
  • ext
  • ringgroup
fail_dest_data No Integer The specific failover destination if fail_dest_type is set to ext or ringgroup.
Note: You can query extension's ID using Search Specific Extensions and query ring group's ID using Get Menu Options.
remark No String Add additional information about the alarm.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

Change alarm time to 07:00 (ID: "14").

POST /openapi/v1.0/wakeupcall/update?access_token=ojPrvnfzPdwc8OCcRmhG16gEHuZcwFco HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "id":14,
    "alarm_time":"07:00"
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}