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

Table 1.
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

Table 2.
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

Table 3.
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

Table 4.
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

Table 5.
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

Table 6.
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

Table 7.
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.

Inbound Route

Table 8.
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

Table 9.
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.

PIN List

Table 10.
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.

IVR

Table 11.
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

Table 12.
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.
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.

Recording

Table 13.
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

Table 14.
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

Table 15.
HTTP method API endpoint Description
GET call_report/list Query the instant call report list.
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

Table 16.
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

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

Call control

Table 18.
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

Table 19.
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.
Table 20.
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.