API Interfaces & Events Summary

This topic provides the Yeastar P-Series PBX System API interfaces list and events list.

Important: You MUST include a User-Agent header with every request that you submit to the Yeastar P-Series PBX System API, so that the PBX can identify your application and respond to the request. For example, User-Agent: OpenAPI.

API Authentication

HTTP method API endpoint Description
POST get_token Get API access token.
POST refresh_token Refresh API access token.
GET del_token Revoke API access token.

System

HTTP method API endpoint Description
GET system/information Query PBX information.
GET system/capacity Query PBX capacity, including the number of extensions and concurrent calls.
GET system/get_menuoptions Query the menu option information when creating and updating features.
Note: The interface supports to query the option information (ID, name, or type) of specific features including FXS channel, extension, extension group, organization list, trunk, user role, phonebook, group voicemail, IVR, ring group, queue and agent, conference, and PIN list.

Extension

HTTP method API endpoint Description
GET extension/list Query the extension list.
GET extension/search Search specific extensions.
GET extension/get Query the information of an extension.
GET extension/query Query the information of multiple extensions.
POST extension/create Add an extension.
POST extension/send_welcome_email Send Linkus welcome emails to specified extensions.
POST extension/update Edit an extension.
GET extension/delete Delete an extension.

Organization

HTTP method API endpoint Description
GET organization/list Query the organization list.
GET organization/search Search specific organizations.
GET organization/get Query the information of an organization.
GET organization/query Query the information of multiple organizations.
POST organization/create Add an organization.
POST organization/update Edit an organization.
GET organization/delete Delete an organization.

Trunk

HTTP method API endpoint Description
GET trunk/list Query the trunk list.
GET trunk/search Search specific trunks.
GET trunk/get Query the information of a trunk.
GET trunk/query Query the information of multiple trunks.
GET trunk/itsp_list Query the ITSP list of SIP trunks.
POST trunk/create Add a SIP trunk.
POST trunk/update Edit a SIP trunk.
GET trunk/delete Delete a SIP trunk.

Contacts

HTTP method API endpoint Description
GET company_contact/list Query the company contacts list.
GET company_contact/search Search specific company contacts.
GET company_contact/get Query the information of a company contact.
GET company_contact/query Query the information of multiple company contacts.
POST company_contact/create Add a company contact.
POST company_contact/update Edit a company contact.
GET company_contact/delete Delete a company contact.

Phonebook

HTTP method API endpoint Description
GET phonebook/list Query the phonebook list.
GET phonebook/search Search specific phonebooks.
GET phonebook/get Query the information of a phonebook.
GET phonebook/query Query the information of multiple phonebooks.
POST phonebook/create Add a phonebook.
POST phonebook/update Edit a phonebook.
GET phonebook/delete Delete a phonebook.

Auto Provisioning

HTTP method API endpoint Description
GET phone/search Search specific IP phones.
GET phone/get Query the information of an IP phone.
GET auto_provisioning/compatibility Query the information of configuration options required when adding IP phone(s) for auto provisioning.
POST phone/batchcreate Bulk add IP phones of the same vendor and model.
POST phone/batchupdate Bulk edit IP phones of the same model that use the same template.
POST phone/batchreprovision Bulk reprovision IP phones.
POST phone/batchreboot Bulk reboot IP phones.
POST phone/batchdelete Bulk delete IP phones.

Inbound Route

HTTP method API endpoint Description
GET inbound_route/list Query the inbound route list.
GET inbound_route/search Search specific inbound routes.
GET inbound_route/get Query the information of an inbound route.
GET inbound_route/query Query the information of multiple inbound routes.
POST inbound_route/create Add an inbound route.
POST inbound_route/update Edit an inbound route.
GET inbound_route/delete Delete an inbound route.

Outbound Route

HTTP method API endpoint Description
GET outbound_route/list Query the outbound route list.
GET outbound_route/search Search specific outbound routes.
GET outbound_route/get Query the information of an outbound route.
GET outbound_route/query Query the information of multiple outbound routes.
POST outbound_route/create Add an outbound route.
POST outbound_route/update Edit an outbound route.
GET outbound_route/delete Delete an outbound route.

Voicemail

HTTP method API endpoint Description
GET vm/query Query the voicemail messages of multiple extensions or group voicemails.
GET vm/get Query the voicemail messages of a specific extension or a group voicemail.
GET vm/download Get the download URL to download a vociemail message.
POST vm/create Add a voicemail message to a specific extension.
POST vm/update Update the read status of a voicemail message.
GET vm/delete Delete a voicemail message.
GET vm/delete_extension_vm Delete all the voicemail messages of an extension.

IVR

HTTP method API endpoint Description
GET ivr/list Query the IVR list.
GET ivr/search Search specific IVRs.
GET ivr/get Query the information of an IVR.
GET ivr/query Query the information of multiple IVRs.
POST ivr/create Add an IVR.
POST ivr/update Edit an IVR.
GET ivr/delete Delete an IVR.

Queue

HTTP method API endpoint Description
GET queue/list Query the queue list.
GET queue/search Search specific queues.
GET queue/get Query the information of a queue.
GET queue/query Query the information of multiple queues.
POST queue/create Add a queue.
POST queue/update Edit a queue.
GET queue/delete Delete a queue.
GET queue/call_status Query call status of a queue.
GET queue/agent_status Query agent status of a queue.
GET queue_pause_reason/list Query queue pause reason list.
POST queue_pause_reason/update Edit queue pause reason list.
POST queue/honor_wrapup_time Enable or disable shared wrap-up time among queues.
GET queue/agent_login Queue management - Log in or log out agents.
GET queue/agent_pause Queue management - Pause or unpause agents.
GET agent/login Agent management - Log in to or log out of queues.
GET agent/pause Agent management - Pause or unpause queue service.

PIN List

HTTP method API endpoint Description
GET pin_list/list Query the PIN list.
GET pin_list/search Search specific PIN lists.
GET pin_list/get Query the information of a PIN list.
GET pin_list/query Query the information of multiple PIN lists.
POST pin_list/create Add a PIN list.
POST pin_list/update Edit a PIN list.
GET pin_list/delete Delete a PIN list.

Blocked/Allowed Numbers

HTTP method API endpoint Description
Blocked Numbers
GET block_numbers/list Query the call blocklists.
GET block_numbers/search Search specific call blocklist rules.
GET block_numbers/get Query the information of a call blocklist rule.
GET block_numbers/query Query the information of multiple call blocklist rules.
POST block_numbers/create Add a call blocklist rule.
POST block_numbers/update Edit a call blocklist rule.
GET block_numbers/delete Delete a call blocklist rule.
Allowed Numbers
GET allow_numbers/list Query the call allowlists.
GET allow_numbers/search Search specific call allowlist rules.
GET allow_numbers/get Query the information of a call allowlist rule.
GET allow_numbers/query Query the information of multiple call allowlist rules.
POST allow_numbers/create Add a call allowlist rule.
POST allow_numbers/update Edit a call allowlist rule.
GET allow_numbers/delete Delete a call allowlist rule.

System Log

HTTP method API endpoint Description
GET system_log/list Query the system log list.
GET system_log/download Get the download URL to download one or multiple system log file(s).

Recording

HTTP method API endpoint Description
GET recording/list Query the recording list.
GET recording/download Get the download URL to download a recording file.

CDR

HTTP method API endpoint Description
GET cdr/list Query the CDR list.
GET cdr/search Search specific CDR.
GET cdr/download Get the download URL to download a CDR file.

Call report

HTTP method API endpoint Description
GET call_report/list Query the instant call report list.
GET call_report/detail

Query call details in specific IVR/Queue/Agent report.

GET call_report/download Get the download URL to download an instant call report.
GET call_schedule_report/list Query the scheduled call report list.
GET call_schedule_report/download Get the download URL to download a scheduled call report.

Hotel

HTTP method API endpoint Description
GET wakeupcall/list Query the alarm list.
GET wakeupcall/get Query an extension's alarm information.
GET wakeupcall/query Query multiple extensions' alarm information.
POST wakeupcall/create Add an alarm for a specific extension.
POST wakeupcall/update Edit an alarm.
GET wakeupcall/delete Delete alarm(s) for a specific extension.
POST hotel/checkout Perform checkout for hotel guests.

SMS

HTTP method API endpoint Description
POST sms/create Send an SMS message to a mobile number through a GSM/3G/4G trunk.

Call control

HTTP method API endpoint Description
GET call/query Query a specified call or query calls by call types.
POST call/dial Make a call.
POST call/accept_inbound Accept an inbound call.
POST call/refuse_inbound Refuse an inbound call.
POST call/listen Monitor a call.
POST call/hold Hold a call.
POST call/unhold Resume a held call.
POST call/mute Mute a call.
POST call/unmute Unmute a call.
POST call/park Park a call.
GET call/park_status Query status of parked calls.
POST call/transfer Transfer a call, including blind transfer and attended transfer.
POST call/add_member During a call, invite a member to join the call.
POST call/play_prompt Play custom prompt audio files.
POST call/hangup Hang up a call.
POST call/record_start Start call recording.
POST call/record_pause Pause call recording.
POST call/record_unpause Resume call recording.

uaCSTA call control

HTTP method API endpoint Description
POST uacsta_call/accept Accept an incoming call by uaCSTA control.
POST uacsta_call/refuse Refuse an incoming call by uaCSTA control.
POST uacsta_call/hangup Hang up an incoming call by uaCSTA control.

Events

Note: You can monitor the following events via WebSocket. For more information, see Monitor Events via WebSocket.
Event Description
(30005) Organization Status Changed Indicate that the organization feature status is changed, and return the current feature status.
(30006) Organization Configuration Changed Indicate that the organization configuration is changed, and return the change information.
(30007) Extension Registration Status Changed Indicate that the extension registration status is changed, and return the extension details.
(30008) Extension Call Status Changed Indicate that the extension call status is changed, and return the current extension call status.
(30009) Extension Presence Status Changed Indicate that the extension presence status is changed, and return the current extension presence status.
(30010) Trunk Registration Status Changed Indicate that the trunk registration status is changed, and return the current trunk status.
(30011) Call Status Changed Indicate that the call status is changed, and return the current call status.
(30012) New CDR Indicate that a new CDR is generated, and return the call details.
(30013) Call Transfer Indicate that a call is transferred, and return the call details.
(30014) Call Forward Indicate that a call is forwarded, and return the call details.
(30015) Call Failed Indicate that a call is failed, and return the call details.
(30016) Inbound Call Invitation Indicate that an inbound call comes from the monitored trunk, and return the call details.
(30017) DTMF Indicate that a key is pressed during a call, and return the call details as well as key pressing information.
(30018) Play Prompt End Indicate the end of prompt playing, and return the call details and the audio prompt name.
(30019) Satisfaction Indicate that caller has completed a satisfaction survey, and return the survey result.
(30020) uaCSTA Call Indicate that a call status of an extension, which is registered to an IP phone, is changed, and return the uaCSTA call details.
(30022) Extension Configuration Changed Indicate that the extension configuration is changed, and return the change information.
(30023) Trunk Configuration Changed Indicate that the trunk configuration is changed, and return the change information.
(30024) No Host in an Audio Conference Indicate that the host leaves the audio conference, and return the audio conference ID as well as host's extension number.
(30025) Agent Auto Pause Indicate that the agent is automatically paused due to reaching the maximum number of missed calls, and return the information of the agent and missed calls.
(30026) Agent Ringing Timeout Indicate that the agent missed a call due to ringing timeout, and return the information of the agent and missed call.
(30027) Report Download

Indicate that the requested data is retrieved, and return the download URL of the call report.