API Reference guide for the legacy ProxyAPI and the newer OpenAPI JSON endpoint, including authentication, object scope, request patterns, examples, and error handling. OpenAPI OpenAPI JSON endpoint reference and examples. Overview and Examples The MiRTA PBX OpenAPI endpoint exposes configuration and reporting APIs as an OpenAPI 3.0.3 JSON specification. OpenAPI describes the available paths, methods, authentication schemes, request bodies, and response schemas in a machine-readable format. Using the OpenAPI specification makes integrations easier to test and maintain: developers can generate client code, import the API into tools such as Postman or Swagger UI, validate request shapes, and keep documentation aligned with the endpoint implementation. Base URL https://pbx.example.com/pbx/openapi.php https://pbx.example.com/pbx/openapi.php?spec=1 https://pbx.example.com/pbx/openapi.php/openapi.json https://pbx.example.com/pbx/openapi.php/swagger.json Authentication Send the API key as a key query parameter, an X-API-Key header, or an Authorization: Bearer token. Tenant API keys require a tenant parameter. Global keys can access global administration objects and can list tenant-scoped objects across tenants when no tenant parameter is supplied. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" curl -H "Authorization: Bearer TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/number/100?tenant=CANISTRACCI" curl "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI&key=TENANT_API_KEY" Endpoint Patterns Action Pattern List GET https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI Get extension by number GET https://pbx.example.com/pbx/openapi.php/extensions/number/100?tenant=CANISTRACCI Get live extension state GET https://pbx.example.com/pbx/openapi.php/extensions/state?tenant=CANISTRACCI&number=100 Dial POST https://pbx.example.com/pbx/openapi.php/dial?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI Modify PATCH https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI Supported Objects Each supported object has its own page in this chapter. Most configuration objects support CRUD operations. CDR, Simple CDR, and AI Analysis are read-only reporting endpoints. The examples use fictional IDs, numbers, names, and keys; replace them with values from the target PBX. Object Primary path Authentication scope Operations or required fields Auth Token /auth/token Global full API key POST generate, DELETE reset Dial /dial Tenant full API key POST only; requires source and dest CDR /cdrs Tenant API key or global key; GET only GET only Simple CDR /simplecdrs Tenant API key or global key; GET only GET only AI Analysis /aianalysis Tenant API key or global key; GET only GET only; requires uniqueid Extension /extensions Tenant API key number or ex_number; GET /extensions/state for live state Tenant /tenants Global API key te_name, te_code User /users Global API key us_username User Profile /userprofiles Global API key up_name Routing Profile /routingprofiles Global API key rp_name Provider /providers Global API key pr_name Voicemail /voicemails Tenant API key mailbox IVR /ivrs Tenant API key iv_name Custom Destination /customdestinations Tenant API key or global key with global=1 cu_name, cu_ct_id Condition /conditions Tenant API key co_type Hunt List /huntlists Tenant API key hu_name DID /dids Tenant API key di_number Queue /queues Tenant API key No required create field listed Setting /settings Tenant API key or global key with global=1 se_code Media File /mediafiles Tenant API key or global key with global=1 me_name Music On Hold /musiconholds Tenant API key or global key with global=1 mu_name Paging Group /paginggroups Tenant API key pa_name, pa_number Conference Room /conferencerooms Tenant API key cr_name, cr_number Flow /flows Tenant API key fl_name Tenant Variable /tenantvariables Tenant API key tv_al_id DISA /disas Tenant API key ds_name Caller ID Blacklist /calleridblacklists Tenant API key or global key with global=1 bl_callerid Campaign /campaigns Tenant API key ca_name Campaign Number /campaignnumbers Tenant API key cn_ca_id, cn_number Cron Job /cronjobs Tenant API key or global key with global=1 cr_name Feature Code /featurecodes Tenant API key or global key with global=1 fe_code Short Number /shortnumbers Tenant API key or global key with global=1 sn_number Phone Book /phonebooks Tenant API key pb_name Phone Book Entry /phonebookentries Tenant API key phonebook_id, at least one value Provisioning Phone /provisioningphones Tenant API key ph_name, ph_mac Errors Errors are returned as JSON with an error code and message. Common errors include missing_api_key, invalid_api_key, tenant_not_found, invalid_json, missing_required_field, read_only_api_key, method_not_allowed, and not_found. Extension State The Extension State endpoint returns live call-state information for one extension. It is a read-only OpenAPI endpoint and supports GET only. This endpoint checks the extension registration server and queries Asterisk manager for the active channel, matching the purpose of proxyapi.php?reqtype=info&info=extstate. The regular extension GET endpoint still returns the cached st_states value. Endpoint GET https://pbx.example.com/pbx/openapi.php/extensions/state?tenant=CANISTRACCI&number=100 Parameter Required Description tenant Yes Tenant code or tenant name. number Yes, unless ext is used Extension number to check. ext Yes, unless number is used Compatibility alias for number. key No, if using headers API key. The key can also be sent with X-API-Key or Authorization: Bearer. Examples curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/state?tenant=CANISTRACCI&number=100" curl -H "Authorization: Bearer TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/state?tenant=CANISTRACCI&ext=100" Response When an active matching channel is found, the endpoint returns the live channel fields used to identify the call and the other party. { "UniqueID": "1717240000.42", "LinkedID": "1717240000.42", "Connected Line ID": "39055123456", "Connected Line ID Name": "Customer", "Context": "authenticated", "Extension": "39055123456", "Direction": "IN", "OtherParty": "39055123456" } When the extension exists but no registration server is available, the endpoint returns: { "UniqueID": "KO", "LinkedID": "Extension not registered", "Connected Line ID": "", "Connected Line ID Name": "", "Context": "", "Extension": "", "Direction": "", "OtherParty": "" } Notes The endpoint requires a tenant context, even when using a global API key. If the extension is registered but has no active channel, the live fields are returned empty. The response is always JSON. Auth Token The Auth Token endpoint generates or resets temporary login tokens for web users and extension web identities. The generated token can be used in place of the user password on the MiRTA PBX login page. Authentication Scope This endpoint always requires the global full API key. Tenant API keys and read-only API keys are rejected. The token is returned only once when it is generated, so store it securely in the calling system if it needs to be delivered to the user. Operation Path API key Generate token POST https://pbx.example.com/pbx/openapi.php/auth/token GLOBAL_API_KEY Reset token DELETE https://pbx.example.com/pbx/openapi.php/auth/token GLOBAL_API_KEY Supported Identities The user value is resolved in the same order as the legacy ProxyAPI token feature: MiRTA PBX web users first, then extension web users, then SIP extension usernames, then PJSIP endpoint IDs when the extension does not have a separate web user. Identity type Matched field Web user us_users.us_username Extension web user ex_extensions.ex_webuser SIP extension username sipfriends.name when ex_webuser is empty PJSIP endpoint ID ps_endpoints.id when ex_webuser is empty Generate Token Use validity set to ONCE for a single-use token, or provide a date/time string to make the token valid until that time. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"user":"100","validity":"ONCE"}' \ "https://pbx.example.com/pbx/openapi.php/auth/token" Successful response: { "token": "generated-token-value", "user": "100", "target_type": "WEBPASSWORD" } Generate Expiring Token curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"user":"api.operator","validity":"2026-06-30 23:59:59"}' \ "https://pbx.example.com/pbx/openapi.php/auth/token" Reset Token Resetting a token clears the stored token hash and validity for the resolved user identity. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"user":"100"}' \ "https://pbx.example.com/pbx/openapi.php/auth/token" Successful response: { "reset": true, "user": "100", "target_type": "WEBPASSWORD" } Important Notes Only the generated token value is returned. MiRTA PBX stores a SHA-256 hash of the token. A single-use token is cleared after a successful login. Generating a new token replaces any previous token for that user identity. This endpoint manages login tokens only. It does not create or rotate OpenAPI API keys. Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match a valid API key. admin_required A global API key is required. read_only_api_key The supplied key is read-only and cannot generate or reset tokens. missing_user The request body did not include a user value. invalid_validity The validity value was not ONCE and could not be parsed as a date/time. user_not_found No supported web user or extension identity matched the requested user value. Dial The Dial endpoint originates a call between a source extension and a destination number. It is the OpenAPI equivalent of proxyapi.php?reqtype=DIAL and uses the same PBX dialplan contexts. The endpoint requires a tenant context and a full API key. Read-only API keys cannot originate calls. Endpoint POST https://pbx.example.com/pbx/openapi.php/dial?tenant=CANISTRACCI Parameter Required Description tenant Yes Tenant code or tenant name. key No, if using headers Full API key. The key can also be sent with X-API-Key or Authorization: Bearer. Request Body Field Required Description source Yes Source extension. Compatibility aliases are exten and ?exten. dest Yes Destination number. Compatibility alias is phone. dialtimeout No Originate timeout in seconds. Defaults to 30. timeout No Sets the dialplan variable SETTIMEOUT. sourceclid No Sets SETSOURCECLID. destclid No Sets SETDESTCLID. logqueueoutbound No Sets SETLOGQUEUEOUTBOUND. recording No Sets SETRECORDING. autoanswer No Sets AUTOANSWER. nofollow No Sets SETNOFOLLOWEXTENSION. account No Peer account name to set as SETPEERNAME. Use SOURCE to resolve it from the source extension. server No PBX node peer name to use when the source or destination registration server cannot be found. var No Comma-separated custom variables, for example campaign=summer,lead=42. vars No Custom variables as a JSON object. Variables are tenant-prefixed and listed in VARLIST. Example curl -X POST "https://pbx.example.com/pbx/openapi.php/dial?tenant=CANISTRACCI" \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": "100", "dest": "39055123456", "dialtimeout": 30, "sourceclid": "100", "recording": "yes", "vars": { "campaign": "summer", "lead": "42" } }' Response The response includes the Asterisk manager originate result, the generated originate ID, and the selected PBX node. { "Response": "Success", "Message": "Originate successfully queued", "ID": "6867c1c5.12345678", "source": "100", "dest": "39055123456", "server": "pbx-node-1", "node": "PBX Node 1" } Compatibility Notes source=ACCOUNT resolves the source extension number from the account peer name. account=SOURCE resolves the peer name from the source extension and sets SETPEERNAME. If a source or destination registration server is found, that node is used. If no registration server is found, pass server with the node peer name. The endpoint returns JSON only. CDR The CDR endpoint is a read-only reporting endpoint. It supports GET only; create, update, and delete methods return method_not_allowed. Tenant API keys must include tenant=CANISTRACCI. Global API keys can query one tenant by code or name, or use SQL-style % wildcards in the tenant parameter. Object Summary Property Value Object cdr Primary path /cdrs Path aliases /cdr, /cdrs, /call, /calls Supported method GET Default format json Compatibility formats template, xml Endpoint Patterns Action Example pattern List records GET https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI Filter by date range GET https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59 Filter by ID from the path GET https://pbx.example.com/pbx/openapi.php/cdrs/RECORD_ID?tenant=CANISTRACCI Template/XML compatibility output GET https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&format=template&template=Docs%20Export Query Parameters Parameter Description tenant Tenant code or tenant name. Global API keys can use % wildcards; tenant API keys are restricted to their tenant. start Start date and time. Defaults to today at 00:00:00. end End date and time. Defaults to today at 23:59:59. id Comma-separated CDR ID values. A path value such as /cdrs/123 also maps to this filter. uniqueid Comma-separated Asterisk unique ID values. linkedid Comma-separated linked ID values used to group call legs. src Comma-separated source values. firstdst Comma-separated first destination values. disposition Comma-separated disposition values such as ANSWERED, NO ANSWER, BUSY, or FAILED. direction Direction filter based on the CDR userfield mapping. Accepted values are IN, OUT, IN,OUT, and OUT,IN. phone Comma-separated phone values searched across src, dst, firstdst, lastdst, realsrc, and wherelanded. format Response format. Defaults to json. Use template or xml for template-based compatibility output. template Template name from the tenant XML templates. Used only with format=template or format=xml. contenttype Optional Content-Type header for rendered template output. Response Fields Field Description accountcode Tenant code stored on the CDR. ID Internal CDR row ID. start Call start timestamp. answer Answer timestamp when the call was answered. end Call end timestamp. clid Full caller ID string. realsrc Normalized or real source value. firstdst First dialed destination tracked by MiRTA PBX. duration Total call duration in seconds. billsec Answered talk time in seconds. disposition Asterisk call disposition. cc_cost Calculated tenant-side call cost when available. dcontext Asterisk destination context. dstchannel Destination channel. userfield MiRTA PBX call marker, commonly including inbound or outbound direction information. uniqueid Asterisk unique ID for the CDR leg. prevuniqueid Previous unique ID for linked call-leg processing. lastdst Last destination reached by the call. wherelanded Final PBX object or destination where the call landed. src Asterisk source value. dst Asterisk destination value. lastapp Last Asterisk application executed. srcCallID Source SIP Call-ID when available. linkedid Asterisk linked ID used to group related CDR legs. peeraccount Asterisk peer account value. originateid Origination tracking ID when available. cc_country Rated country when rating data is available. cc_network Rated network when rating data is available. pincode PIN code associated with the call when present. cc_buy Calculated buy-side cost when available. Important Notes When neither id nor uniqueid is supplied, the endpoint applies the start/end date range. When neither id nor linkedid is supplied, the endpoint also applies the start/end date range. Template and XML compatibility output require the request to resolve to exactly one tenant. The endpoint may repair attended-transfer and where-landed CDR metadata while preparing results. Examples List Today CDRs Returns CDR rows for the selected tenant using today as the default date range. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI" CDR Date Range Limits results to an explicit date and time window. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59" CDR by Path ID Uses the path segment after /cdrs as a CDR ID filter. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs/123456?tenant=CANISTRACCI" CDR by ID and Unique ID Filters by one or more CDR row IDs and one or more Asterisk unique IDs. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&id=123456%2C123457&uniqueid=1717240000.42" CDR by Linked ID Returns all matching CDR legs associated with one linked call. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&linkedid=1717240000.42" CDR Source Destination and Disposition Combines source, first destination, and disposition filters. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&src=100&firstdst=15551234567&disposition=ANSWERED" CDR Direction Filters by outbound calls using the MiRTA PBX CDR userfield mapping. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&direction=OUT" CDR Phone Search Searches phone values across the main CDR source and destination columns. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&phone=100%2C15551234567" CDR Global Tenant Wildcard Uses a global key and a tenant wildcard to query matching tenants. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CAN%25&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59" CDR Template Output Renders rows through a tenant XML/template definition. This requires exactly one tenant. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&format=template&template=Docs%20CDR%20Export&contenttype=text%2Fcsv" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code or tenant name is required when using a tenant API key. single_tenant_required Template output requires the request to resolve to exactly one tenant. template_not_found The selected XML/template output template does not exist for the tenant. method_not_allowed The endpoint is read-only and only supports GET. Simple CDR The Simple CDR endpoint is a read-only reporting endpoint. It supports GET only; create, update, and delete methods return method_not_allowed. Tenant API keys must include tenant=CANISTRACCI. Global API keys can query one tenant by code or name, or use SQL-style % wildcards in the tenant parameter. Object Summary Property Value Object simplecdr Primary path /simplecdrs Path aliases /simplecdr, /simplecdrs, /simple_cdr, /simple_cdrs Supported method GET Default format json Compatibility formats template, xml Endpoint Patterns Action Example pattern List records GET https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI Filter by date range GET https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59 Filter by ID from the path GET https://pbx.example.com/pbx/openapi.php/simplecdrs/RECORD_ID?tenant=CANISTRACCI Template/XML compatibility output GET https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&format=template&template=Docs%20Export Query Parameters Parameter Description tenant Tenant code or tenant name. Global API keys can use % wildcards; tenant API keys are restricted to their tenant. start Start date and time. Defaults to today at 00:00:00. end End date and time. Defaults to today at 23:59:59. id Comma-separated simple CDR ID values. A path value such as /simplecdrs/123 also maps to this filter. uniqueid Comma-separated Asterisk unique ID values. calleridnum Comma-separated caller ID number values. calleridname Comma-separated caller ID name values. disposition Comma-separated disposition values such as ANSWERED, NO ANSWER, BUSY, or FAILED. direction Comma-separated simple CDR directions, such as IN, OUT, or LOCAL. dialednum Comma-separated dialed number values. whoanswered Comma-separated values for the extension, user, or object that answered. phone Comma-separated phone values searched across sc_whoanswered, sc_calleridnum, and sc_dialednum. minduration Minimum total call duration in seconds, exclusive. mintalktime Minimum answered talk time in seconds, exclusive. format Response format. Defaults to json. Use template or xml for template-based compatibility output. template Template name from the tenant XML templates. Used only with format=template or format=xml. contenttype Optional Content-Type header for rendered template output. Response Fields Field Description sc_te_id Internal tenant ID. tenantcode Tenant code. sc_start Simple CDR start timestamp. sc_direction Simple direction value, such as IN, OUT, or LOCAL. sc_calleridnum Caller ID number. sc_calleridname Caller ID name. sc_dialednum Dialed number. sc_disposition Call disposition. sc_duration Total call duration in seconds. sc_billsec Answered talk time in seconds. sc_uniqueid Asterisk unique ID represented by the simple CDR row. sc_whoanswered Extension, user, or object that answered the call. Template Variables When format=template or format=xml is used, variables inside the {row_loop} section are replaced for each returned row. Variable Description {$end} Computed end timestamp from sc_start plus sc_duration seconds. {$clid} CDR-style caller ID formatted as "sc_calleridname" . {$callerid_number} Alias for sc_calleridnum. {$callerid_name} Alias for sc_calleridname. {$firstdst} Alias for sc_dialednum. {$talk_time} Alias for sc_billsec. {$who_answered} Alias for sc_whoanswered. Important Notes When neither id nor uniqueid is supplied, the endpoint applies the start/end date range. The mintalktime filter uses the stored simple CDR billsec/talk-time value. Template and XML compatibility output require the request to resolve to exactly one tenant. Examples List Today Simple CDRs Returns simplified call history rows for the selected tenant using today as the default date range. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI" Simple CDR Date Range Limits simple CDR results to an explicit date and time window. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59" Simple CDR by Path ID Uses the path segment after /simplecdrs as a simple CDR ID filter. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs/98765?tenant=CANISTRACCI" Simple CDR by ID and Unique ID Filters by one or more simple CDR row IDs and unique IDs. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&id=98765%2C98766&uniqueid=1717240000.42" Simple CDR Caller and Dialed Number Combines caller number, caller name, and dialed number filters. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&calleridnum=15551234567&calleridname=Docs%20Caller&dialednum=100" Simple CDR Direction and Disposition Filters by simple direction values and disposition. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&direction=IN%2COUT&disposition=ANSWERED" Simple CDR Who Answered Filters by the extension or object that answered the call. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&whoanswered=100" Simple CDR Phone Search Searches across caller ID number, dialed number, and who answered. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&phone=100%2C15551234567" Simple CDR Minimum Durations Returns calls longer than the supplied total duration and talk-time thresholds. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&minduration=30&mintalktime=10" Simple CDR Global Tenant Wildcard Uses a global key and a tenant wildcard to query matching tenants. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CAN%25&start=2026-06-01%2000%3A00%3A00&end=2026-06-01%2023%3A59%3A59" Simple CDR Template Output Renders simple CDR rows through a tenant XML/template definition. This requires exactly one tenant. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&format=template&template=Docs%20Simple%20CDR%20Export&contenttype=text%2Fcsv" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code or tenant name is required when using a tenant API key. single_tenant_required Template output requires the request to resolve to exactly one tenant. template_not_found The selected XML/template output template does not exist for the tenant. method_not_allowed The endpoint is read-only and only supports GET. Extension The Extension object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object extension Primary path /extensions ID field ex_id Label field ex_number Primary source table ex_extensions Required on create number or ex_number Path aliases /extensions Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field number ex_number name ex_name tech ex_tech sipusername username mailbox ex_mailbox email ex_email password technology secret/password callgroups ex_callgroup pickupgroups ex_pickupgroup realextensions virtual_items Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases EXT-UNCONDITIONAL unconditional EXT-NOANSWER onnoanswer, noanswer, no_answer EXT-BUSY onbusy, busy EXT-OFFLINE onoffline, offline EXT-ONCONDITION oncondition, condition EXT-DIALBYNAME dialbyname, dial_by_name EXT-ONLYALLOWCALL onlyallowcall, only_allow_call EXT-DONOTCALL donotcall, do_not_call Important Notes Supported technologies are SIP, PJSIP, CUSTOM, and VIRTUAL. When username is not supplied, the API generates number-tenantcode, for example 100-CANISTRACCI. Nested technology data can be supplied with sipfriends, ps_endpoints, ps_aors, ps_auths, ce_customextensions, or ve_virtualextensions. Examples List Extensions Returns extension ID, number, name, and technology for the tenant. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" Get Extension Reads one extension by internal ID and includes related technology data. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Get Extension by Number Reads an extension by PBX number. Keep the tenant parameter when the same number may exist in multiple tenants. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/number/100?tenant=CANISTRACCI" Create PJSIP Extension Creates a PJSIP extension and optional endpoint/AOR details. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "100", "name": "Ada Rivera", "tech": "PJSIP", "password": "change-this-secret", "email": "ada.rivera@example.com", "ps_endpoints": { "transport": "transport-udp", "direct_media": "no" }, "ps_aors": { "max_contacts": 1, "remove_existing": "yes" } }' \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" Create SIP Extension Creates a chan_sip extension and optional SIP peer fields. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "101", "name": "Bruno Long", "tech": "SIP", "password": "change-this-secret", "sipfriends": { "host": "dynamic", "nat": "force_rport,comedia" } }' \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" Create Custom Extension Creates an extension that points to a custom dial string or custom endpoint behavior. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "102", "name": "Custom Doorphone", "tech": "CUSTOM", "ce_customextensions": { "ce_peername": "doorphone-main", "ce_destination": "Local/100@from-internal" } }' \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" Create Virtual Extension Creates a virtual extension and maps it to real extension IDs. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "103", "name": "After Hours Virtual", "tech": "VIRTUAL", "realextensions": [ 100, 101 ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI" Edit Extension Updates only the supplied extension fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Ada Rivera - Desk", "email": "ada.desk@example.com", "callgroups": [ 1 ], "pickupgroups": [ 1 ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Delete Extension Deletes the extension, its technology row, and extension destinations. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Unconditional Destination Sets the EXT-UNCONDITIONAL destination using the unconditional alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "unconditional": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension No Answer Destination Sets the EXT-NOANSWER destination using the onnoanswer alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onnoanswer": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Busy Destination Sets the EXT-BUSY destination using the onbusy alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onbusy": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Offline Destination Sets the EXT-OFFLINE destination using the onoffline alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onoffline": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension On Condition Destination Sets the EXT-ONCONDITION destination using the oncondition alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "oncondition": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Dial by Name Destination Sets the EXT-DIALBYNAME destination using the dialbyname alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "dialbyname": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Only Allow Call Destination Sets the EXT-ONLYALLOWCALL destination using the onlyallowcall alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onlyallowcall": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Do Not Call Destination Sets the EXT-DONOTCALL destination using the donotcall alias. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "donotcall": [ "EXT-101" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension Destinations Object Form The destination aliases are convenient, but integrations can also send the database destination type names inside the destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destinations": { "EXT-BUSY": [ "EXT-101" ], "EXT-NOANSWER": [ "VOICEMAIL-100" ] } }' \ "https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI" Extension UNCONDITIONAL Destination Updates the EXT-UNCONDITIONAL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "unconditional": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension NOANSWER Destination Updates the EXT-NOANSWER destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onnoanswer": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension BUSY Destination Updates the EXT-BUSY destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onbusy": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension OFFLINE Destination Updates the EXT-OFFLINE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onoffline": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension ONCONDITION Destination Updates the EXT-ONCONDITION destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "oncondition": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension DIALBYNAME Destination Updates the EXT-DIALBYNAME destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "dialbyname": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension ONLYALLOWCALL Destination Updates the EXT-ONLYALLOWCALL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onlyallowcall": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Extension DONOTCALL Destination Updates the EXT-DONOTCALL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "donotcall": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Tenant The Tenant object is supported by the MiRTA PBX OpenAPI endpoint. This object is managed at system scope and requires a global API key. Object Summary Property Value Object tenant Primary path /tenants ID field te_id Label field te_name Primary source table te_tenants Required on create te_name, te_code Path aliases /tenants Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/tenants Get by ID GET https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID Create POST https://pbx.example.com/pbx/openapi.php/tenants Update PATCH https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID Delete DELETE https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID Accepted Field Aliases Request field Source field name te_name code te_code billingcode te_billingcode billing_code te_billingcode timezone te_timezone routing_profile_id te_rp_id campaign_routing_profile_id te_campaign_rp_id fax_routing_profile_id te_fax_rp_id Examples List Tenants Returns the tenants visible to the key and scope. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenants" Get Tenant Reads one object by its internal ID. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID" Create Tenant Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Tenant", "code": "DOCSAPI", "timezone": "Europe/Rome" }' \ "https://pbx.example.com/pbx/openapi.php/tenants" Edit Tenant Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "routing_profile_id": 3, "te_payment_type": "Post Paid" }' \ "https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID" Delete Tenant Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. User The User object is supported by the MiRTA PBX OpenAPI endpoint. This object is managed at system scope and requires a global API key. Object Summary Property Value Object user Primary path /users ID field us_id Label field us_username Primary source table us_users Required on create us_username Path aliases /user, /users, /nuser, /nusers, /us_user, /us_users Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/users Get by ID GET https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID Create POST https://pbx.example.com/pbx/openapi.php/users Update PATCH https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID Delete DELETE https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID Accepted Field Aliases Request field Source field username us_username name us_username description us_description email us_email profile_id us_up_id userprofile_id us_up_id password us_password use_ldap us_useldap ip_filter us_ipfilter two_factor_type us_2fatype never_expire us_neverexpire dynamic_ip us_dynamicip Examples List Users Returns the users visible to the key and scope. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/users" Get User Reads one object by its internal ID. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID" Create User Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "username": "docs-api-user", "description": "Documentation API user", "email": "docs-api-user@example.com", "profile_id": 2, "password": "change-this-password", "tenant_ids": [ 1 ] }' \ "https://pbx.example.com/pbx/openapi.php/users" Edit User Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "email": "docs-api-user-updated@example.com", "force_change": true }' \ "https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID" Delete User Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID" User Tenant and Routing Profile Relations Replaces the user tenant, routing profile, and allowed profile relations with the supplied IDs. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "tenant_ids": [ 1 ], "routingprofile_ids": [ 3 ], "allowed_userprofile_ids": [ 2 ] }' \ "https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID" User Object Restrictions Restricts the user to specific queues, extensions, or providers. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "queue_restrictions": [ 12 ], "extension_restrictions": [ 45 ], "provider_restrictions": [ 7 ] }' \ "https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. User Profile The User Profile object is supported by the MiRTA PBX OpenAPI endpoint. This object is managed at system scope and requires a global API key. Object Summary Property Value Object userprofile Primary path /userprofiles ID field up_id Label field up_name Primary source table up_userprofiles Required on create up_name Path aliases /userprofile, /userprofiles, /user_profile, /user_profiles Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/userprofiles Get by ID GET https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID Create POST https://pbx.example.com/pbx/openapi.php/userprofiles Update PATCH https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID Delete DELETE https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID Accepted Field Aliases Request field Source field name up_name description up_description reserved up_reserved userpanel up_userpanel user_panel up_userpanel extension_user_profile up_userpanel Examples List User Profiles Returns the user profiles visible to the key and scope. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/userprofiles" Get User Profile Reads one object by its internal ID. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID" Create User Profile Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Profile", "description": "Documentation profile", "user_panel": "yes" }' \ "https://pbx.example.com/pbx/openapi.php/userprofiles" Edit User Profile Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated documentation profile" }' \ "https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID" Delete User Profile Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID" User Profile Privileges Replaces the profile privilege list. Privilege IDs must exist in the system privilege table. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "privileges": [ { "id": 1, "param1": "read" }, { "id": 2, "param1": "write" } ] }' \ "https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Routing Profile The Routing Profile object is supported by the MiRTA PBX OpenAPI endpoint. This object is managed at system scope and requires a global API key. Object Summary Property Value Object routingprofile Primary path /routingprofiles ID field rp_id Label field rp_name Primary source table rp_routingprofiles Required on create rp_name Path aliases /routingprofiles, /routing_profiles, /routing_profile Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/routingprofiles Get by ID GET https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID Create POST https://pbx.example.com/pbx/openapi.php/routingprofiles Update PATCH https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID Delete DELETE https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID Accepted Field Aliases Request field Source field name rp_name description rp_description type rp_type Examples List Routing Profiles Returns the routing profiles visible to the key and scope. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/routingprofiles" Get Routing Profile Reads one object by its internal ID. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID" Create Routing Profile Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Voice Routing", "description": "Documentation outbound routing", "type": "VOICE" }' \ "https://pbx.example.com/pbx/openapi.php/routingprofiles" Edit Routing Profile Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated documentation routing profile" }' \ "https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID" Delete Routing Profile Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Provider The Provider object is supported by the MiRTA PBX OpenAPI endpoint. This object is managed at system scope and requires a global API key. Object Summary Property Value Object provider Primary path /providers ID field pr_id Label field pr_name Primary source table pr_providers Required on create pr_name Path aliases /provider, /providers Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/providers Get by ID GET https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID Create POST https://pbx.example.com/pbx/openapi.php/providers Update PATCH https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID Delete DELETE https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID Accepted Field Aliases Request field Source field name pr_name peername pr_peername peer_name pr_peername tech pr_tech host pr_host disabled pr_disabled penalty pr_penalty realtime pr_userealtime use_realtime pr_userealtime calleridmod_id pr_ca_id callerid pr_callerid caller_id pr_callerid callerid_number pr_callerid caller_id_number pr_callerid calleridname pr_calleridname callerid_name pr_calleridname caller_id_name pr_calleridname did_mod_id pr_did_ca_id max_out_channels pr_maxoutchannels ignore_sip_cause pr_ignoresipcause ignore_busy pr_ignorebusy sms_protocol pr_smsprotocol sms_url pr_smsurl sms_user pr_smsuser sms_password pr_smspassword canreinvite sipfriends.canreinvite for chan_sip direct media direct_media ps_endpoints.direct_media for PJSIP direct media Important Notes Providers are global system objects and always require a global API key. Readonly global API keys can list and read providers, but create, update, and delete require the full global API key. SIP providers manage the related sipfriends realtime row when realtime is enabled. PJSIP providers manage the related ps_endpoints, ps_aors, ps_auths, and ps_endpoint_id_ips rows when realtime is enabled. When a provider changes technology, the API removes old realtime rows before creating rows for the new technology. Provider callerid and callerid_name values are optional. When set, calls routed through the provider use those caller ID values instead of extension-derived caller ID. Use canreinvite for chan_sip direct media values. Use direct_media for PJSIP direct media values. Examples List Providers Returns the providers visible to the key and scope. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/providers" Get Provider Reads one object by its internal ID. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID" Create Provider Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API PJSIP Provider", "peername": "docs-pjsip-provider", "tech": "PJSIP", "realtime": "on", "host": "198.51.100.20", "username": "docs-trunk", "password": "change-this-secret", "transport": "UDP", "codecs": [ "ulaw", "alaw" ], "qualify": "yes", "qualifyfreq": 60, "direct_media": "no", "callerid": "+15551230000", "callerid_name": "Docs API Provider" }' \ "https://pbx.example.com/pbx/openapi.php/providers" Edit Provider Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "disabled": "", "penalty": 10, "max_out_channels": 25, "callerid": "+15551230001", "callerid_name": "Docs API Main" }' \ "https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID" Delete Provider Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID" Create SIP Provider Creates a chan_sip provider and the related sipfriends realtime peer. curl -X POST \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API SIP Provider", "peername": "docs-sip-provider", "tech": "SIP", "realtime": "on", "host": "198.51.100.10", "username": "docs-sip-trunk", "password": "change-this-secret", "transport": "UDP", "nat": "force_rport,comedia", "codecs": [ "ulaw", "alaw" ], "canreinvite": "no" }' \ "https://pbx.example.com/pbx/openapi.php/providers" Edit PJSIP Realtime Settings Updates provider fields and related PJSIP endpoint, AOR, auth, and endpoint identification rows. curl -X PATCH \ -H "X-API-Key: GLOBAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "host": "198.51.100.21", "password": "new-secret", "direct_media": "no", "sendrpid": "pai", "codecs": [ "ulaw", "alaw", "opus" ] }' \ "https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Voicemail The Voicemail object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object voicemail Primary path /voicemails ID field uniqueid Label field mailbox Primary source table voicemail Required on create mailbox Path aliases /voicemails Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name fullname number mailbox Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases VOICEMAIL-OPERATOR operator, voicemail_operator VOICEMAIL-FOLLOW follow, voicemail_follow VOICEMAIL-BROADCAST broadcast, voicemail_broadcast Examples List Voicemails Returns the voicemails visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI" Get Voicemail Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Create Voicemail Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "240", "name": "Docs API Mailbox", "email": "voicemail@example.com", "password": "1234" }' \ "https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI" Edit Voicemail Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Mailbox Updated", "email": "voicemail-updated@example.com" }' \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Delete Voicemail Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Voicemail OPERATOR Destination Updates the VOICEMAIL-OPERATOR destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "operator": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Voicemail FOLLOW Destination Updates the VOICEMAIL-FOLLOW destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "follow": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Voicemail BROADCAST Destination Updates the VOICEMAIL-BROADCAST destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "broadcast": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. IVR The IVR object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object ivr Primary path /ivrs ID field iv_id Label field iv_name Primary source table iv_ivrs Required on create iv_name Path aliases /ivrs Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name iv_name mediafile_id iv_me_id timeout iv_timeout digit_timeout iv_digittimeout Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases IVR_1 ivr_1, key_1, 1 IVR_2 ivr_2, key_2, 2 IVR_3 ivr_3, key_3, 3 IVR_4 ivr_4, key_4, 4 IVR_5 ivr_5, key_5, 5 IVR_6 ivr_6, key_6, 6 IVR_7 ivr_7, key_7, 7 IVR_8 ivr_8, key_8, 8 IVR_9 ivr_9, key_9, 9 IVR_0 ivr_0, key_0, 0 IVR_STAR ivr_star, key_star, star IVR_SHARP ivr_sharp, key_sharp, sharp IVR_WRONG ivr_wrong, wrong IVR_TIMEOUT ivr_timeout, timeout IVR_HANGUP ivr_hangup, hangup IVR_FEATURE ivr_feature, feature IVR_EXTENSION ivr_extension, extension IVR_MEDIAFILE ivr_mediafile, mediafile IVR_OPTIONSMEDIAFILE ivr_optionsmediafile, optionsmediafile CUSTOMIVR_SUPPORT customivr_support Important Notes Custom IVR destination names matching CUSTOMIVR_* are also accepted. Examples List IVRs Returns the ivrs visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI" Get IVR Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" Create IVR Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API IVR", "mediafile_id": 22, "timeout": 5, "digit_timeout": 3 }' \ "https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI" Edit IVR Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "timeout": 8, "digit_timeout": 4 }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" Delete IVR Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 1 Destination Updates the IVR_1 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_1": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 2 Destination Updates the IVR_2 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_2": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 3 Destination Updates the IVR_3 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_3": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 4 Destination Updates the IVR_4 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_4": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 5 Destination Updates the IVR_5 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_5": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 6 Destination Updates the IVR_6 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_6": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 7 Destination Updates the IVR_7 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_7": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 8 Destination Updates the IVR_8 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_8": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 9 Destination Updates the IVR_9 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_9": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR 0 Destination Updates the IVR_0 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_0": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR STAR Destination Updates the IVR_STAR destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_star": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR SHARP Destination Updates the IVR_SHARP destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_sharp": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR WRONG Destination Updates the IVR_WRONG destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_wrong": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR TIMEOUT Destination Updates the IVR_TIMEOUT destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_timeout": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR HANGUP Destination Updates the IVR_HANGUP destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_hangup": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR FEATURE Destination Updates the IVR_FEATURE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_feature": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR EXTENSION Destination Updates the IVR_EXTENSION destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_extension": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR MEDIAFILE Destination Updates the IVR_MEDIAFILE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_mediafile": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR OPTIONSMEDIAFILE Destination Updates the IVR_OPTIONSMEDIAFILE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ivr_optionsmediafile": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" IVR SUPPORT Destination Updates the CUSTOMIVR_SUPPORT destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "customivr_support": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Custom Destination The Custom Destination object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object customdestination Primary path /customdestinations ID field cu_id Label field cu_name Primary source table cu_customs Required on create cu_name, cu_ct_id Path aliases /custom, /customs, /customdestinations, /custom_destinations, /custom_destination Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name cu_name type_id cu_ct_id custom_type_id cu_ct_id Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases PRIVACY-DONTCALL privacy_dontcall, dontcall PRIVACY-TORTURE privacy_torture, torture CTONANSWER onanswer CALLBACK-CONNECTED callback_connected CTONCALLERHANGUP caller_hangup SPLITCHANNELACTION-CALLER split_caller SPLITCHANNELACTION-CALLED split_called RANDOMDESTINATION randomdestination, random_destination RANDOMDESTINATION1 randomdestination1, random_destination1 RANDOMDESTINATION2 randomdestination2, random_destination2 RANDOMDESTINATION3 randomdestination3, random_destination3 RANDOMDESTINATION4 randomdestination4, random_destination4 RANDOMDESTINATION5 randomdestination5, random_destination5 RANDOMDESTINATION6 randomdestination6, random_destination6 RANDOMDESTINATION7 randomdestination7, random_destination7 RANDOMDESTINATION8 randomdestination8, random_destination8 RANDOMDESTINATION9 randomdestination9, random_destination9 RANDOMDESTINATION10 randomdestination10, random_destination10 RANDOMDESTINATION11 randomdestination11, random_destination11 RANDOMDESTINATION12 randomdestination12, random_destination12 RANDOMDESTINATION13 randomdestination13, random_destination13 RANDOMDESTINATION14 randomdestination14, random_destination14 RANDOMDESTINATION15 randomdestination15, random_destination15 RANDOMDESTINATION16 randomdestination16, random_destination16 RANDOMDESTINATION17 randomdestination17, random_destination17 RANDOMDESTINATION18 randomdestination18, random_destination18 RANDOMDESTINATION19 randomdestination19, random_destination19 RANDOMDESTINATION20 randomdestination20, random_destination20 Examples List Custom Destinations Returns the custom destinations visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI" Get Custom Destination Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Create Custom Destination Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Custom Destination", "type_id": 1 }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI" Edit Custom Destination Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Custom Destination Updated" }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Delete Custom Destination Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" List Global Custom Destinations Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/customdestinations?global=1" Custom Destination DONTCALL Destination Updates the PRIVACY-DONTCALL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "privacy_dontcall": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination TORTURE Destination Updates the PRIVACY-TORTURE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "privacy_torture": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination Destination Updates the CTONANSWER destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onanswer": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination CONNECTED Destination Updates the CALLBACK-CONNECTED destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "callback_connected": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination Destination Updates the CTONCALLERHANGUP destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "caller_hangup": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination CALLER Destination Updates the SPLITCHANNELACTION-CALLER destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "split_caller": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination CALLED Destination Updates the SPLITCHANNELACTION-CALLED destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "split_called": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination Destination Updates the RANDOMDESTINATION destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 1 Destination Updates the RANDOMDESTINATION1 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination1": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 2 Destination Updates the RANDOMDESTINATION2 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination2": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 3 Destination Updates the RANDOMDESTINATION3 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination3": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 4 Destination Updates the RANDOMDESTINATION4 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination4": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 5 Destination Updates the RANDOMDESTINATION5 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination5": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 6 Destination Updates the RANDOMDESTINATION6 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination6": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 7 Destination Updates the RANDOMDESTINATION7 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination7": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 8 Destination Updates the RANDOMDESTINATION8 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination8": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 9 Destination Updates the RANDOMDESTINATION9 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination9": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 10 Destination Updates the RANDOMDESTINATION10 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination10": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 11 Destination Updates the RANDOMDESTINATION11 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination11": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 12 Destination Updates the RANDOMDESTINATION12 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination12": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 13 Destination Updates the RANDOMDESTINATION13 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination13": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 14 Destination Updates the RANDOMDESTINATION14 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination14": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 15 Destination Updates the RANDOMDESTINATION15 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination15": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 16 Destination Updates the RANDOMDESTINATION16 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination16": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 17 Destination Updates the RANDOMDESTINATION17 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination17": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 18 Destination Updates the RANDOMDESTINATION18 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination18": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 19 Destination Updates the RANDOMDESTINATION19 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination19": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination 20 Destination Updates the RANDOMDESTINATION20 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "randomdestination20": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Custom Destination Extended Data Adds or replaces custom destination extended rows when the custom type uses extra parameters. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "extended_infos": [ { "ce_name": "DOCS_VARIABLE", "ce_value": "example" } ] }' \ "https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Condition The Condition object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object condition Primary path /conditions ID field co_id Label field co_name Primary source table co_conditions Required on create co_type Path aliases /conditions Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name co_name type co_type timezone co_timezone Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases CONDITION condition, true, yes, destination NOTCONDITION notcondition, false, no, notdestination CONDITION1 condition1, destination1, destinationmvv1 CONDITION2 condition2, destination2, destinationmvv2 CONDITION3 condition3, destination3, destinationmvv3 CONDITION4 condition4, destination4, destinationmvv4 CONDITION5 condition5, destination5, destinationmvv5 CONDITION6 condition6, destination6, destinationmvv6 CONDITION7 condition7, destination7, destinationmvv7 CONDITION8 condition8, destination8, destinationmvv8 CONDITION9 condition9, destination9, destinationmvv9 CONDITION10 condition10, destination10, destinationmvv10 CONDITION11 condition11, destination11, destinationmvv11 CONDITION12 condition12, destination12, destinationmvv12 CONDITION13 condition13, destination13, destinationmvv13 CONDITION14 condition14, destination14, destinationmvv14 CONDITION15 condition15, destination15, destinationmvv15 CONDITION16 condition16, destination16, destinationmvv16 CONDITION17 condition17, destination17, destinationmvv17 CONDITION18 condition18, destination18, destinationmvv18 CONDITION19 condition19, destination19, destinationmvv19 CONDITION20 condition20, destination20, destinationmvv20 Examples List Conditions Returns the conditions visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI" Get Condition Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Create Condition Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Office Hours", "type": "WEEKTIME", "timezone": "Europe/Rome" }' \ "https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI" Edit Condition Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "timezone": "UTC" }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Delete Condition Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition Destination Updates the CONDITION destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition Destination Updates the NOTCONDITION destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "notcondition": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 1 Destination Updates the CONDITION1 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition1": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 2 Destination Updates the CONDITION2 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition2": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 3 Destination Updates the CONDITION3 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition3": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 4 Destination Updates the CONDITION4 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition4": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 5 Destination Updates the CONDITION5 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition5": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 6 Destination Updates the CONDITION6 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition6": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 7 Destination Updates the CONDITION7 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition7": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 8 Destination Updates the CONDITION8 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition8": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 9 Destination Updates the CONDITION9 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition9": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 10 Destination Updates the CONDITION10 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition10": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 11 Destination Updates the CONDITION11 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition11": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 12 Destination Updates the CONDITION12 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition12": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 13 Destination Updates the CONDITION13 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition13": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 14 Destination Updates the CONDITION14 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition14": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 15 Destination Updates the CONDITION15 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition15": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 16 Destination Updates the CONDITION16 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition16": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 17 Destination Updates the CONDITION17 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition17": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 18 Destination Updates the CONDITION18 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition18": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 19 Destination Updates the CONDITION19 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition19": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition 20 Destination Updates the CONDITION20 destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "condition20": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Condition Extended Rows Supplies the extended rows used by condition types that require additional values. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "extended_infos": [ { "ce_type": "weekday", "ce_value": "mon-fri" }, { "ce_type": "hours", "ce_value": "09:00-18:00" } ] }' \ "https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Hunt List The Hunt List object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object huntlist Primary path /huntlists ID field hu_id Label field hu_name Primary source table hu_huntlists Required on create hu_name Path aliases /huntlists Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name hu_name number hu_number type hu_type ringtime hu_ringtime Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases HUNTLIST extensions, members, huntlist HUNTLIST-TIMEOUT timeout, huntlist_timeout Examples List Hunt Lists Returns the hunt lists visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI" Get Hunt List Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI" Create Hunt List Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Hunt List", "number": "820", "type": "RINGALL", "ringtime": 20 }' \ "https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI" Edit Hunt List Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ringtime": 25 }' \ "https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI" Delete Hunt List Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI" Hunt List Destination Updates the HUNTLIST destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "extensions": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI" Hunt List TIMEOUT Destination Updates the HUNTLIST-TIMEOUT destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "timeout": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. DID The DID object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object did Primary path /dids ID field di_id Label field di_number Primary source table di_dids Required on create di_number Path aliases /dids Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field number di_number country di_country area di_area comment di_comment Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases DID destination, did DID-UNCONDITIONAL unconditional DID-SMS sms DID-FAXSUCCESS faxsuccess, fax_success Examples List DIDs Returns the dids visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI" Get DID Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" Create DID Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "+15551234567", "country": "US", "area": "212", "comment": "Docs API inbound DID" }' \ "https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI" Edit DID Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "comment": "Docs API DID updated" }' \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" Delete DID Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" DID Destination Updates the DID destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" DID UNCONDITIONAL Destination Updates the DID-UNCONDITIONAL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "unconditional": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" DID SMS Destination Updates the DID-SMS destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sms": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" DID FAXSUCCESS Destination Updates the DID-FAXSUCCESS destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "faxsuccess": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Queue The Queue object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object queue Primary path /queues ID field qu_id Label field qu_name Primary source table qu_queues Path aliases /queues Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name qu_name number qu_number Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases QUEUE-FULL full QUEUE-TIMEOUT timeout_destination, timeout QUEUE-EXITKEY exitkey QUEUE-ONCALLBACK oncallback QUEUE-NOBODYHOME nobodyhome QUEUE-NOFREEMEMBER nofreemember QUEUE-PERIODICANNOUNCE periodicannounce QUEUE-BEFORERINGING beforeringing QUEUE-ONAUTOPAUSE onautopause QUEUE-ONABANDONEDCALL onabandonedcall Examples List Queues Returns the queues visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI" Get Queue Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Create Queue Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Accounting Queue", "number": "700" }' \ "https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI" Edit Queue Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Accounting Queue Updated" }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Delete Queue Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue FULL Destination Updates the QUEUE-FULL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "full": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue TIMEOUT Destination Updates the QUEUE-TIMEOUT destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "timeout_destination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue EXITKEY Destination Updates the QUEUE-EXITKEY destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "exitkey": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue ONCALLBACK Destination Updates the QUEUE-ONCALLBACK destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "oncallback": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue NOBODYHOME Destination Updates the QUEUE-NOBODYHOME destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "nobodyhome": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue NOFREEMEMBER Destination Updates the QUEUE-NOFREEMEMBER destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "nofreemember": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue PERIODICANNOUNCE Destination Updates the QUEUE-PERIODICANNOUNCE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "periodicannounce": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue BEFORERINGING Destination Updates the QUEUE-BEFORERINGING destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "beforeringing": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue ONAUTOPAUSE Destination Updates the QUEUE-ONAUTOPAUSE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onautopause": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue ONABANDONEDCALL Destination Updates the QUEUE-ONABANDONEDCALL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onabandonedcall": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue Members Replaces queue members. Use extension IDs and optional member fields such as penalty when needed. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "members": [ { "extension_id": 45, "penalty": 0 }, { "extension_id": 46, "penalty": 1 } ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Queue Allowed Members Controls which extensions are allowed to be used as queue members. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "allowed_members": [ 45, 46, 47 ] }' \ "https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Setting The Setting object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object setting Primary path /settings ID field se_id Label field se_code Primary source table se_settings Required on create se_code Path aliases /settings Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field code se_code value se_value Examples List Settings Returns the settings visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI" Get Setting Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI" Create Setting Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "code": "API_DOCS_EXAMPLE", "value": "enabled" }' \ "https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI" Edit Setting Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "value": "disabled" }' \ "https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI" Delete Setting Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI" List Global Settings Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/settings?global=1" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Media File The Media File object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object mediafile Primary path /mediafiles ID field me_id Label field me_name Primary source table me_mediafiles Required on create me_name Path aliases /mediafiles, /media_files, /media_file Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name me_name description me_description format me_format type me_type text me_text engine me_engine language me_language data_base64 me_data Examples List Media Files Returns the media files visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI" Get Media File Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI" Create Media File Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Welcome Prompt", "description": "Generated prompt for documentation", "type": "tts", "text": "Welcome to Kartoon Cars. Press 1 for sales or 2 for support.", "engine": "azure", "language": "en-US" }' \ "https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI" Edit Media File Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "Updated generated prompt" }' \ "https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI" Delete Media File Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI" List Global Media Files Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/mediafiles?global=1" Media File Binary Upload Sends audio data as base64. Replace the shortened example with the complete encoded file. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Uploaded Prompt", "format": "wav", "data_base64": "UklGRiQAAABXQVZFZm10IBAAAAABAAEA..." }' \ "https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Music On Hold The Music On Hold object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object musiconhold Primary path /musiconholds ID field mu_id Label field mu_name Primary source table mu_musiconholds Required on create mu_name Path aliases /moh, /music, /musiconholds, /music_on_hold, /music_on_holds Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name mu_name custom mu_custom volume mu_volume randomizeorder mu_randomizeorder streamengine mu_streamengine format format application application mode mode Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases MUSICONHOLD mediafile, mediafiles, destination Examples List Music On Hold Classes Returns the music on hold classes visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI" Get Music On Hold Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI" Create Music On Hold Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Music On Hold", "custom": "yes", "volume": 0, "mode": "playlist", "format": "slin" }' \ "https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI" Edit Music On Hold Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "volume": -3 }' \ "https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI" Delete Music On Hold Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI" List Global Music On Hold Classes Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/musiconholds?global=1" Music On Hold Destination Updates the MUSICONHOLD destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "mediafile": [ 22 ] }' \ "https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI" Music On Hold Entries and Default Replaces music-on-hold entries and marks the class as the default class for the scope. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "entries": [ { "me_id": 22, "order": 1 }, { "me_id": 23, "order": 2 } ], "default": true }' \ "https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Paging Group The Paging Group object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object paginggroup Primary path /paginggroups ID field pa_id Label field pa_name Primary source table pa_paginggroups Required on create pa_name, pa_number Path aliases /paging, /pagings, /paginggroup, /paginggroups, /intercom, /intercoms Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name pa_name number pa_number pin pa_pin bidirectional pa_bidirectional checkinuse pa_checkinuse mediafile_id pa_me_id manualheader pa_manualheader Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases PAGING extensions, peers, members, destination Examples List Paging Groups Returns the paging groups visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI" Get Paging Group Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI" Create Paging Group Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Paging Group", "number": "830", "pin": "1234", "bidirectional": "no" }' \ "https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI" Edit Paging Group Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "bidirectional": "yes" }' \ "https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI" Delete Paging Group Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI" Paging Group Destination Updates the PAGING destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "extensions": [ 100, 101 ] }' \ "https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Conference Room The Conference Room object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object conferenceroom Primary path /conferencerooms ID field cr_id Label field cr_name Primary source table cr_conferencerooms Required on create cr_name, cr_number Path aliases /conference, /conferences, /conferencerooms, /conference_rooms, /conference_room Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name cr_name number cr_number hosted cr_hosted rate_id cr_rrid startdate starttime enddate endtime request_pin_mediafile_id cr_requestpinmeid Important Notes The API creates and updates the related meetme row. If confno is not supplied, the conference number is combined with the tenant code. Examples List Conference Rooms Returns the conference rooms visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI" Get Conference Room Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI" Create Conference Room Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Conference", "number": "840", "hosted": "yes", "meetme": { "pin": "1234", "adminpin": "4321", "opts": "T", "adminopts": "AaT" } }' \ "https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI" Edit Conference Room Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "meetme": { "pin": "2468", "adminpin": "8642" } }' \ "https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI" Delete Conference Room Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Flow The Flow object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object flow Primary path /flows ID field fl_id Label field fl_name Primary source table fl_flows Required on create fl_name Path aliases /flow, /flows Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name fl_name comment fl_comment number fl_number value fl_value variable_name fl_variable_name monitor_type fl_monitor_type monitor_type_id fl_monitor_type_id Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases FLOW destination, destinations Examples List Flows Returns the flows visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI" Get Flow Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI" Create Flow Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Flow", "number": "850", "variable_name": "DOCS_FLOW_STATE", "value": "open" }' \ "https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI" Edit Flow Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "value": "closed" }' \ "https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI" Delete Flow Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI" Flow Destination Updates the FLOW destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI" Flow State Change Sets the current flow state using one of the accepted state aliases: status, state, or st_state. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "status": "open" }' \ "https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Tenant Variable The Tenant Variable object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object tenantvariable Primary path /tenantvariables ID field tv_id Label field tv_value Primary source table tv_tenantvariables Required on create tv_al_id Path aliases /variable, /variables, /tenantvariable, /tenantvariables, /tenant_variable, /tenant_variables Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field variable_id tv_al_id value tv_value comment tv_comment locked tv_locked Examples List Tenant Variables Returns the tenant variables visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI" Get Tenant Variable Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI" Create Tenant Variable Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "variable_id": 1, "value": "docs-value", "comment": "Docs API variable value" }' \ "https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI" Edit Tenant Variable Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "value": "docs-updated-value" }' \ "https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI" Delete Tenant Variable Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. DISA The DISA object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object disa Primary path /disas ID field ds_id Label field ds_name Primary source table ds_disas Required on create ds_name Path aliases /disa, /disas Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name ds_name mediafile_id ds_me_id pin ds_pin outbound ds_outbound blockcid ds_blockcid calleridnum ds_calleridnum calleridname ds_calleridname digitstimeout ds_digitstimeout responsetimeout ds_responsetimeout looponattempt ds_looponattempt Examples List DISAs Returns the disas visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI" Get DISA Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI" Create DISA Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API DISA", "mediafile_id": 22, "pin": "2468", "outbound": "yes" }' \ "https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI" Edit DISA Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "pin": "1357" }' \ "https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI" Delete DISA Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Caller ID Blacklist The Caller ID Blacklist object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object calleridblacklist Primary path /calleridblacklists ID field bl_id Label field bl_callerid Primary source table bl_blacklists Required on create bl_callerid Path aliases /calleridblacklist, /calleridblacklists, /callerid_blacklist, /callerid_blacklists, /blacklist, /blacklists Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field callerid bl_callerid reason bl_reason inserted bl_inserted Examples List Caller ID Blacklists Returns the caller id blacklists visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI" Get Caller ID Blacklist Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI" Create Caller ID Blacklist Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "callerid": "+15559990000", "reason": "Docs API blocked caller" }' \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI" Edit Caller ID Blacklist Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "reason": "Updated documentation example" }' \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI" Delete Caller ID Blacklist Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI" List Global Caller ID Blacklists Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/calleridblacklists?global=1" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Campaign The Campaign object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object campaign Primary path /campaigns ID field ca_id Label field ca_name Primary source table ca_campaigns Required on create ca_name Path aliases /campaign, /campaigns Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name ca_name type ca_type tech ca_tech datestart ca_datestart dateend ca_dateend condition_id ca_co_id callerid ca_callerid calleridname ca_calleridname state ca_state queue_id ca_qu_id message ca_message confirmmessage_id ca_confirmmessage_me_id Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases CAMPAIGN-ONCONNECT onconnect, on_connect CAMPAIGN-DONOTCALL donotcall, do_not_call Examples List Campaigns Returns the campaigns visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI" Get Campaign Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Create Campaign Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Campaign", "type": "VOICE", "tech": "PJSIP", "callerid": "+15551234567", "state": "PAUSED" }' \ "https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI" Edit Campaign Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "state": "ACTIVE" }' \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Delete Campaign Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Campaign ONCONNECT Destination Updates the CAMPAIGN-ONCONNECT destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "onconnect": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Campaign DONOTCALL Destination Updates the CAMPAIGN-DONOTCALL destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "donotcall": [ 22 ] }' \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Campaign Binary File References Adds binary or fax-related files to the campaign. Use complete base64 data in production integrations. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "binary_files": [ { "name": "docs-script.txt", "data_base64": "VGhpcyBpcyBhIGRvY3VtZW50YXRpb24gZXhhbXBsZS4=" } ] }' \ "https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Campaign Number The Campaign Number object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object campaignnumber Primary path /campaignnumbers ID field cn_id Label field cn_number Primary source table cn_campaignnumbers Required on create cn_ca_id, cn_number Path aliases /campaignnumber, /campaignnumbers, /campaign_number, /campaign_numbers Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field campaign_id cn_ca_id number cn_number description cn_description disposition cn_disposition attempts cn_attempts lastattempt cn_lastattempt billsec cn_billsec Examples List Campaign Numbers Returns the campaign numbers visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI" Get Campaign Number Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI" Create Campaign Number Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "campaign_id": 44, "number": "+15557654321", "description": "Docs API campaign target" }' \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI" Edit Campaign Number Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "disposition": "CALLBACK", "attempts": 1 }' \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI" Delete Campaign Number Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI" List Campaign Numbers for One Campaign Filters the list by the parent campaign ID. The aliases caid and cn_ca_id are also accepted. curl -X GET \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI&campaign_id=44" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Cron Job The Cron Job object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object cronjob Primary path /cronjobs ID field cr_id Label field cr_name Primary source table cr_cronjobs Required on create cr_name Path aliases /cronjob, /cronjobs, /cron_job, /cron_jobs Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name cr_name type cr_type node_id cr_no_id active cr_active once cr_once minute cr_minute hour cr_hour day cr_day month cr_month year cr_year weekday cr_weekday timezone cr_timezone run cr_run Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases CRONJOB destination, destinations Examples List Cron Jobs Returns the cron jobs visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI" Get Cron Job Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI" Create Cron Job Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Nightly Job", "type": "CALL", "active": "yes", "minute": "0", "hour": "2", "timezone": "Europe/Rome" }' \ "https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI" Edit Cron Job Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "active": "no" }' \ "https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI" Delete Cron Job Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI" List Global Cron Jobs Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/cronjobs?global=1" Cron Job Destination Updates the CRONJOB destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Feature Code The Feature Code object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object featurecode Primary path /featurecodes ID field fe_id Label field fe_code Primary source table fe_features Required on create fe_code Path aliases /feature, /features, /featurecodes, /feature_codes, /feature_code Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field code fe_code comment fe_comment Destination Fields Destination fields accept one destination string or an array of destination strings such as EXT-100, VOICEMAIL-100, or another supported destination type and ID pair. Destination type Accepted aliases FEATURE destination, feature Examples List Feature Codes Returns the feature codes visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI" Get Feature Code Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI" Create Feature Code Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "code": "*880", "comment": "Docs API feature code" }' \ "https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI" Edit Feature Code Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "comment": "Docs API feature code updated" }' \ "https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI" Delete Feature Code Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI" List Global Feature Codes Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/featurecodes?global=1" Feature Code Destination Updates the FEATURE destination. The same value can also be sent inside a destinations object. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destination": [ "EXT-100" ] }' \ "https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Short Number The Short Number object is supported by the MiRTA PBX OpenAPI endpoint. This object is normally tenant-scoped. With a global API key, use global=1 to manage the shared/global record set. Tenant writes still require tenant=CANISTRACCI. Object Summary Property Value Object shortnumber Primary path /shortnumbers ID field sn_id Label field sn_number Primary source table sn_shortnumbers Required on create sn_number Path aliases /shortnumbers, /short_numbers, /short_number Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field number sn_number destination sn_destnumber destnumber sn_destnumber comment sn_comment Examples List Short Numbers Returns the short numbers visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI" Get Short Number Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI" Create Short Number Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "number": "901", "destination": "EXT-100", "comment": "Docs API shortcut" }' \ "https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI" Edit Short Number Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "destination": "QUEUE-700" }' \ "https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI" Delete Short Number Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI" List Global Short Numbers Uses the shared/global record set for object types that support global rows. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/shortnumbers?global=1" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Phone Book The Phone Book object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object phonebook Primary path /phonebooks ID field pb_id Label field pb_name Primary source table pb_phonebooks Required on create pb_name Path aliases /phonebook, /phonebooks, /phone_book, /phone_books Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name pb_name include_extensions pb_includeext includeext pb_includeext include_short_numbers pb_includeshortnum includeshortnum pb_includeshortnum layout pl_phonebooklayouts items pl_phonebooklayouts Important Notes The layout field replaces the phone book field layout. Values can be phone book item codes such as NAME, PHONE1, EMAIL, and ROUTING, or pi_phonebookitems IDs. When layout is omitted on create, the API creates the default layout NAME, PHONE1, PHONE2, EMAIL, ROUTING. Deleting a phone book removes its layout rows, entries, entry details, and phone assignment rows. Examples List Phone Books Returns the phone books visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI" Get Phone Book Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI" Create Phone Book Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Phone Book", "include_extensions": "no", "include_short_numbers": "no", "layout": [ "NAME", "PHONE1", "PHONE2", "EMAIL", "ROUTING" ] }' \ "https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI" Edit Phone Book Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Phone Book Updated", "layout": [ "NAME", "PHONE1", "EMAIL", "ROUTING" ] }' \ "https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI" Delete Phone Book Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI" Replace Phone Book Layout Replaces the pl_phonebooklayouts rows for the selected phone book. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "layout": [ "NAME", "PHONE1", "EMAIL", "ROUTING" ] }' \ "https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Phone Book Entry The Phone Book Entry object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object phonebookentry Primary path /phonebookentries ID field pe_id Label field pe_id Primary source table pe_phonebookentries Required on create phonebook_id, at least one value Path aliases /phonebookentry, /phonebookentries, /phonebook_entry, /phonebook_entries, /phonebookcontact, /phonebookcontacts, /phonebook_contact, /phonebook_contacts Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field phonebook_id pe_pb_id pbid pe_pb_id values pd_phonebookdetails keyed by pi_code fields pd_phonebookdetails keyed by pi_code details pd_phonebookdetails rows NAME phone book item code PHONE1 phone book item code PHONE2 phone book item code EMAIL phone book item code ROUTING phone book item code Important Notes Entry values are stored in pd_phonebookdetails and are keyed by pi_phonebookitems.pi_code. Send values as a values or fields object, as top-level item codes, or as detail rows containing pi_id or pi_code and a value. Sending an empty string or null for a value clears that field from the entry. Examples List Phone Book Entries Returns the phone book entries visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI" Get Phone Book Entry Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI" Create Phone Book Entry Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "phonebook_id": 12, "values": { "NAME": "Ada Rivera", "PHONE1": "+15551230001", "EMAIL": "ada.rivera@example.com", "ROUTING": "EXT-100" } }' \ "https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI" Edit Phone Book Entry Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "values": { "PHONE1": "+15551230002", "EMAIL": "ada.updated@example.com" } }' \ "https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI" Delete Phone Book Entry Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI" List Entries for One Phone Book Filters the phone book entry list by parent phonebook_id. The aliases pbid and pe_pb_id are also accepted. curl -X GET \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI&phonebook_id=12" Clear Phone Book Entry Value Removes the EMAIL detail row for the selected entry while leaving other values unchanged. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "values": { "EMAIL": "" } }' \ "https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. Provisioning Phone The Provisioning Phone object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key. Object Summary Property Value Object provisioningphone Primary path /provisioningphones ID field ph_id Label field ph_name Primary source table ph_phones Required on create ph_name, ph_mac Path aliases /phone, /phones, /provisioningphones, /provisioning_phones, /provisioning_phone Endpoint Patterns Action Example pattern List GET https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI Get by ID GET https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI Create POST https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI Update PATCH https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI Delete DELETE https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI Accepted Field Aliases Request field Source field name ph_name mac ph_mac model_id ph_pm_id password ph_password filename ph_filename http_user ph_http_user http_password ph_http_password Examples List Provisioning Phones Returns the provisioning phones visible to the key and scope. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI" Get Provisioning Phone Reads one object by its internal ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI" Create Provisioning Phone Creates a new object. Use the short aliases shown above or the source field names. curl -X POST \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Docs API Desk Phone", "mac": "001122334455", "model_id": 1, "filename": "docs-api-001122334455.cfg" }' \ "https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI" Edit Provisioning Phone Updates only the supplied fields. curl -X PATCH \ -H "X-API-Key: TENANT_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "http_user": "phone-user", "http_password": "change-this-password" }' \ "https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI" Delete Provisioning Phone Deletes the object. Check references before deleting configuration used by routing or reporting. curl -X DELETE \ -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI" Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code is required for tenant-scoped writes or tenant-key reads. read_only_api_key The key can read data but cannot create, update, or delete objects. missing_required_field A required create field is missing. AI Analysis The AI Analysis endpoint returns transcript, AI summary, and sentimental analysis data for recorded calls. It is a read-only OpenAPI endpoint and supports GET only. Use this endpoint when an integration already has an Asterisk uniqueid from CDR, Simple CDR, call events, or recording metadata and needs the AI results associated with that call. Object Summary Property Value Object aianalysis Primary path /aianalysis Path aliases /aianalysis, /aianalyses, /ai_analysis, /ai_analyses, /callanalysis, /call_analysis Supported method GET Required filter uniqueid Default format json Source tables rm_recordingmetadatas, tr_transcripts Endpoint Patterns Action Example pattern Get AI analysis by unique ID GET https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42 Get AI analysis by path unique ID GET https://pbx.example.com/pbx/openapi.php/aianalysis/1717240000.42?tenant=CANISTRACCI Get multiple calls GET https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42,1717240000.43 Use an alias path GET https://pbx.example.com/pbx/openapi.php/ai_analysis?tenant=CANISTRACCI&uniqueid=1717240000.42 Query Parameters Parameter Description tenant Tenant code or tenant name. Tenant API keys are restricted to their tenant. Global API keys can query one tenant by code or name, use % wildcards, or omit the parameter to search all tenants. uniqueid Required comma-separated Asterisk unique ID values. A path value such as /aianalysis/1717240000.42 also maps to this filter. key Optional API key query parameter. Prefer the X-API-Key header or bearer token for new integrations. Response Fields Field Description tenant_id Internal tenant ID. tenant_code Tenant code. uniqueid Asterisk unique ID requested by the integration. transcript Full transcript text. When recording metadata does not contain a full transcript, MiRTA PBX builds this value from transcript segments. summary AI-generated call summary. sentiment_score First numeric sentimental analysis score found for the unique ID, or null. sentiment_scores All distinct numeric sentimental analysis scores found for the unique ID. sentiment_brief Short sentimental analysis text from recording metadata. sentiment_details Detailed sentimental analysis payload. This may be JSON text depending on the configured AI processor. recordings Per-recording metadata rows for the unique ID. transcript_segments Timestamped transcript segments for the unique ID. Recording Fields Field Description metadata_id Internal recording metadata row ID. recording_id Internal recording ID. date Recording metadata date. transcript Transcript stored on that recording metadata row. summary Summary stored on that recording metadata row. sentiment_score Numeric sentimental score for that recording metadata row, or null. sentiment_brief Short sentimental analysis text for that recording metadata row. sentiment_details Detailed sentimental analysis payload for that recording metadata row. Transcript Segment Fields Field Description recording_id Internal recording ID associated with the transcript segment. speaker Speaker number assigned by the transcript processor. start Segment start time. Numeric values are returned as numbers. end Segment end time. Numeric values are returned as numbers. text Transcript text for the segment. Examples Get AI Analysis Returns transcript, summary, and sentimental analysis data for one call unique ID. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42" Get AI Analysis by Path Uses the path segment after /aianalysis as the unique ID filter. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/aianalysis/1717240000.42?tenant=CANISTRACCI" Get Multiple AI Analysis Results Requests more than one unique ID in a single call. curl -H "X-API-Key: TENANT_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42,1717240000.43" Global Key Tenant Wildcard Uses a global API key to search matching tenants. Use this only when unique IDs may need to be resolved across tenant boundaries. curl -H "X-API-Key: GLOBAL_API_KEY" \ "https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CAN%25&uniqueid=1717240000.42" Example Response [ { "tenant_id": 12, "tenant_code": "CANISTRACCI", "uniqueid": "1717240000.42", "transcript": "Speaker 1: Hello, how can I help you?", "summary": "The caller asked for support and the agent scheduled a follow-up.", "sentiment_score": 0.72, "sentiment_scores": [0.72], "sentiment_brief": "Positive", "sentiment_details": "{...}", "recordings": [ { "metadata_id": 345, "recording_id": 678, "date": "2026-06-01 10:00:00", "transcript": "Speaker 1: Hello, how can I help you?", "summary": "The caller asked for support and the agent scheduled a follow-up.", "sentiment_score": 0.72, "sentiment_brief": "Positive", "sentiment_details": "{...}" } ], "transcript_segments": [ { "recording_id": 678, "speaker": 1, "start": 0.0, "end": 3.4, "text": "Hello, how can I help you?" } ] } ] Important Notes The endpoint returns rows only for unique IDs that have recording metadata or transcript segments in the selected tenant scope. Unknown unique IDs are omitted from the response. If multiple recording metadata rows exist for the same unique ID, top-level transcript, summary, and sentiment text values are combined without duplicate text. The recordings array preserves the per-recording values. sentiment_details is returned as stored. It may contain JSON text produced by the configured sentimental analysis model. The endpoint checks available database columns before selecting transcript and metadata fields, so older installations may return fewer populated fields until their database upgrades are complete. Common Errors Error Meaning missing_api_key No API key was supplied in the query string, X-API-Key, or bearer token. invalid_api_key The supplied key does not match the tenant or global API key. tenant_required A tenant code or tenant name is required when using a tenant API key. tenant_not_found The tenant parameter did not match any visible tenant. uniqueid_required The request did not include a usable uniqueid value. method_not_allowed The endpoint is read-only and only supports GET. ProxyAPI (old) Old ProxyAPI Legacy proxy API reference and examples. Overview and Examples proxyapi.php is the legacy MiRTA PBX HTTP API. It is still useful for integrations that already depend on query-string based requests, plain text responses, CDR exports, queue operations, voicemail actions, phonebook operations, fax handling, and the older MANAGEDB object/action interface. The API is controlled with the reqtype parameter. Most calls also require key; tenant-scoped calls normally require tenant. Several read operations accept format=json, format=xml, or format=csv. Write operations that update PBX records commonly send JSON in a POST field named jsondata. Common Parameters Parameter Description reqtype Main request family, such as INFO, DND, QUEUE, VOICEMAIL, FAX, CDR, or MANAGEDB. key Tenant or admin API key. Use read-only keys when the integration does not need to change data. tenant Tenant code. Optional only for operations that allow an administrator key to act globally. format Optional output format. Common values are plain, json, xml, and csv, depending on the request. callback Optional JSONP callback name for cross-domain script integrations using JSON. language Optional language used by requests that support translated data. cache Set to no to bypass SQL or AMI cache for supported requests. Request Types reqtype Purpose COUNTPEERS Count peers by node and optionally by tenant. COUNTCHANNELS Count active channels globally, by node, or by tenant. CHANSIPPEERS Return registered chan_sip peers across the cluster. BLFS Return BLF status for peers and flows. DND Get or set do-not-disturb for an extension. FLOWS Read flow state. CHANNEL Read details for one channel. CHANNELS List active channels. GETCURRENTCALLS Show current calls for a phone or tenant. PHONEBOOKS List available phonebooks. PHONEBOOK Query, add, delete, clean, or dump phonebook records. INFO Read status, CDRs, recordings, DIDs, queues, agents, variables, flows, and other reporting data. AGENT Pause, unpause, list, add, or remove queue agents. ATXTRANSFER Perform attended transfer for a channel. CAMPAIGN Start, stop, pause, resume, or maintain campaign numbers. DIAL Originate a call from a source and connect it to a destination. FAX Send, list, or download faxes. HANGUP Hang up a channel or extension. MEDIAFILE Download media-file audio. QUEUE List, add, remove, clean, or log queue members. QUEUERESET Reset queue statistics. REBOOT Reboot one or more peers. RESPONSEPATH Read response-path results. SETFLOW Set a flow state or variable value. SMS Send an SMS. TRANSFER Transfer a channel. UNREGISTER Unregister one or more peers. USERGROUP Manage tenants and users assigned to user groups. VIRTUALEXT Manage members of a virtual extension. VOICEMAIL List mailboxes, list messages, download messages, mark read/unread, or delete messages. SETTING Get or set tenant settings. COUNTCALLS Count running calls. LICENSEDAYS Return days before license expiration. BALANCE Add or subtract tenant balance. CDR Get or update fields on a CDR row. MANAGEDB Read or change supported PBX database objects through object/action parameters. CHECKAUTH Validate a username and password and return privilege information. AUTHTOKEN Generate or reset one-time or expiring authentication tokens. GETWEBRTCAUTH Authenticate an extension user and return WebRTC details. Using POST jsondata For MANAGEDB, phonebook, destination, and similar write requests, send the object fields as JSON in the POST field jsondata. The examples below show the URL and the JSON payload separately instead of wrapping every case in a PHP cURL script. curl -X POST \ --data-urlencode 'jsondata={"field":"value"}' \ "https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=MANAGEDB&object=OBJECT&action=add" Examples INFO - SIMPLECDRS / Get the list of calls Get the list of calls. Use the date range and phone filters to narrow the returned call history. The phone filter searches the relevant caller, dialed, and answered number fields. This uses the simplified call-history source and supports filters such as caller ID number and date range. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=SIMPLECDRS&tenant=TENANTCODE&calleridnum=103,104&start=2020-01-01&end=2020-12-31 INFO - CDRS / Get the list of calls Get the list of calls. Use the date range and phone filters to narrow the returned call history. The phone filter searches the relevant caller, dialed, and answered number fields. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=CDRS&tenant=TENANTCODE&phone=103,104&start=2019-12-01&end=2022-12-31 https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=CDRS&tenant=TENANTCODE&phone=103,104&start=2019-12-01&end=2022-12-31&format=xml&template=Test_CSV Sample output or template: {row_loop}{$uniqueid},{$ID},{$te_id},{$realsrc},{$lastdst},{$start},{$duration},{$answer},{$direction},{$direction},{$disposition} {/row_loop} INFO - DIDS / Get the list of DIDs for one tenant Get the list of DIDs for one tenant. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=DIDS&tenant=TENANTCODE INFO - DIDS / Get the list of DIDs for all tenants Get the list of DIDs for all tenants. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=DIDS INFO - Flow / Get the state of a flow Get the state of a flow. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=FLOW&id=61&tenant=TENANTCODE INFO - Extension / Get the state of a extension Get the state of a extension. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=EXTSTATE&ext=500&tenant=TENANTCODE INFO - Extensions / Get the list of extensions Get the list of extensions. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=EXTENSIONS&tenant=TENANTCODE INFO - Extensions / Get an extension by id Get an extension by id. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=EXTENSIONS&tenant=TENANTCODE&id=36979 INFO - Extensions / Get an extension by number Get an extension by number. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=EXTENSIONS&tenant=TENANTCODE&number=100 INFO - IVR Logs / Get the IVR logs Get the IVR logs. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=INFO&info=IVRLOGS&format=json&start=2023-01-01&end=2024-12-31 INFO - Variable / Get the value of a variable Get the value of a variable. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=variable&id=61&tenant=TENANTCODE DND / Get the DND for an extension Get the DND for an extension. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=DND&action=get&number=100 DND /Set the DND for an extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=DND&action=set&number=100&value=on DIAL / Call an extension and then dial a number Call an extension and then dial a number. The originate response includes an ID that can later be used to query call status or retrieve the recording. Extra variables can be passed with the var parameter. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=DIAL&source=402&dest=9922323232&tenant=TENANTCODE&account=402-TENANTCODE https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=recording&id=15a4cfe6429054 https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=DIAL&source=402&dest=9922323232&tenant=TENANTCODE&account=402-TENANTCODE&var=callid=453131 HANGUP / Hangup a call by extension Hangup a call by extension. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=HANGUP&extension=103-TENANTCODE&tenant=TENANTCODE AGENT / Pause agent from queue Pause agent from queue. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=AGENT&action=PAUSE&queue=281&extension=104-TENANTCODE&tenant=TENANTCODE&pausereason=Breakfast AGENT / Get info for agent in all the queues Get info for agent in all the queues. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=AGENT&action=LISTQUEUES&extension=104-TENANTCODE&tenant=TENANTCODE&format=json MEDIAFILE / Retrieve a media file by its ID Retrieve a media file by its ID. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MEDIAFILE&tenant=TENANTCODE&id=19&action=GETAUDIO&objectid=3619 QUEUE / Get the list of agents Get the list of agents. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=QUEUE&tenant=TENANTCODE&action=list&number=9200 QUEUE / Add an agent to a queue Add an agent to a queue. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=QUEUE&tenant=TENANTCODE&action=add&number=9200&extension=103 https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=QUEUE&tenant=TENANTCODE&action=add&number=781&extension=107&paused=1&penalty=4 SETTING Get a tenant setting Request example: https://pbx.example.com/mirtapbx/proxyapi.php?tenant=TENANTCODE&key=APIKEY&reqtype=SETTING&action=GET&code=VMAUTORECOVER Set a tenant setting Request example: https://pbx.example.com/mirtapbx/proxyapi.php?tenant=TENANTCODE&key=APIKEY&reqtype=SETTING&action=SET&code=VMAUTORECOVER&value=no VOICEMAIL Get all voicemails for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=VOICEMAIL&tenant=TENANTCODE&action=list Get info about voicemails in a mailbox Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=VOICEMAIL&tenant=TENANTCODE&mailbox=102&action=messages Get the binary audio for a message Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=VOICEMAIL&tenant=TENANTCODE&mailbox=102&action=message&msgid=1475685709-00000004 Mark a message as read Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=VOICEMAIL&tenant=TENANTCODE&mailbox=1000&action=markread&msgid=1543267778-00000007 Mark a message as not read Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=VOICEMAIL&tenant=TENANTCODE&action=markunread&mailbox=1000&msgid=1543267778-00000007 COUNTCALLS / Count the calls on a system Count the calls on a system. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=COUNTCALLS RECORDINGS / Get or play a recording Get or play a recording. Use info=recording to download the file, or info=playrecording when the browser should play it inline. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=recording&id=srv02-1531779475.48&tenant=TENANTCODE TRANSCRIPT / Get the transcript for a recording Get the transcript for a recording. Use info=transcript with the recording unique ID to retrieve the generated transcript when transcription is enabled. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=transcript&id=srv02-1695552000.1043&tenant=TENANTCODE PHONEBOOKS Search for an entry Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=PHONEBOOK&subreqtype=query&tenant=TENANTCODE&phonebook=Default&field=name&value=Ben Add an entry Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=PHONEBOOK&subreqtype=add&phonebook=Default&tenant=TENANTCODE Payload sent as jsondata: { "NAME": "Ross", "PHONE1": "3564732920" } FAX Send a fax Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=FAX&action=send&number=99397654321&source_number=123412345&tenant=TENANTCODE Multipart upload example: curl -F "filename=@/path/to/fax.pdf" "https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=FAX&action=send&tenant=TENANTCODE&source_number=15551230000&dest_number=15551239999" List faxes Request example: https://pbx.example.com/mirtapbx/proxyapi.php?tenant=TENANTCODE&key=APIKEY&reqtype=FAX&action=list Get a fax binary Request example: https://pbx.example.com/mirtapbx/proxyapi.php?tenant=TENANTCODE&key=APIKEY&reqtype=FAX&action=download&id=63095 INFO Get the cdr for a tenant in CSV format Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=CDRS&format=csv&tenant=TENANTCODE&start=2017-01-01&end=2017-02-01 Get the cdr for all tenants in CSV format For one tenant, the tenant CSV template is used. With tenant=% across tenants, the admin CSV format is used. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=CDRS&format=csv&tenant=%&start=2017-01-01&end=2017-02-01 Get the queue log for a tenant in CSV format Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=INFO&info=QUEUELOGS&format=csv&tenant=TENANTCODE&start=2017-10-01&end=2017-12-01 Getting response paths results Response Path results can be filtered by queue, answering extension, or unique ID and can be returned as plain text or XML. Getting the latest one for a given Response Path Response Path results can be filtered by queue, answering extension, or unique ID and can be returned as plain text or XML. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=RESPONSEPATH&tenant=TENANTCODE&id=19&action=GETLAST Sample output or template: UniqueID|Type|Type ID|Value|Type Name|Value Name srv02-1509806457.625|START|0|2017-11-04 15:41:01|| srv02-1509806457.625|CALLERID|0|Susan <1132555678>|| srv02-1509806457.625|VARIABLE|85|36985|| srv02-1509806457.625|VARIABLE|144|56896|| srv02-1509806457.625|QUEUE|281||| srv02-1509806457.625|ANSWER|0|105-TENANTCODE|| srv02-1509806457.625|HANGUP|0||| Getting the latest one for a given Response Path for agent 104-TENANTCODE Response Path results can be filtered by queue, answering extension, or unique ID and can be returned as plain text or XML. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=RESPONSEPATH&tenant=TENANTCODE&id=19&action=GETLAST&filter=ANSWER&filterdata=104-TENANTCODE Getting the latest one for a given Response Path for agent 104-TENANTCODE in xml format Response Path results can be filtered by queue, answering extension, or unique ID and can be returned as plain text or XML. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=RESPONSEPATH&tenant=TENANTCODE&id=19&action=GETLAST&filter=ANSWER&filterdata=105-TENANTCODE&format=xml Sample output or template: 105-TENANTCODE NOT ACTIVE supportQ 1234 11223344 Manuel <7171345678> 3619 ManageDB / Custom Destination Types Custom Destination Types. Getting the custom destination type list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CUSTOMTYPES&tenant=TENANTCODE&action=list ManageDB / Custom Destinations Custom Destinations. Getting the custom destination list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CUSTOM&tenant=TENANTCODE&action=list Getting info for a custom destination Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CUSTOM&tenant=TENANTCODE&action=get&objectid=67 Creating a custom destination Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=custom&tenant=TENANTCODE Payload sent as jsondata: { "cu_name": "Boss phone", "cu_ct_id": 1, "cu_param1": "3564732920", "cu_param2": "INCOMINGDID", "cu_param3": "30" } Updating a custom destination Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=custom&tenant=TENANTCODE&objectid=286 Payload sent as jsondata: { "cu_name": "Boss private phone", "cu_id": 286, "cu_param1": "0636287454" } CDR / Get the userfield Get the userfield. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=CDR&action=GET&field=userfield&uniqueid=srv02-1701011773.4670 CDR / Update the userfield Update the userfield. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=CDR&action=UPDATE&field=userfield&uniqueid=srv02-1701011773.4670&value= ManageDB / Tenants Tenants. Getting the tenant list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=TENANT&action=list https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=TENANT&action=list&filter=te_disabled='on' Getting info for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=TENANT&action=get&objectid=1 Creating a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=tenant Payload sent as jsondata: { "te_code": "RELAX", "te_name": "Relax & entertainment", "pk_start": 800, "pk_end": 810 } Updating a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=tenant&objectid=460 Payload sent as jsondata: { "te_name": "Relax and entertainment", "pk_end": 820 } ManageDB / Phones Phones. Getting the phones list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=PHONE&action=list&tenant=TENANTCODE Getting info for a phone Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=PHONE&action=get&objectid=182&tenant=TENANTCODE Creating a phone Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=phones&tenant=TENANTCODE Payload sent as jsondata: { "ph_name": "George Basement", "ph_mac": "AA:BB:CC:DD:EE:FF:00:11", "ph_pm_id": 5 } Updating a phone Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=phone&objectid=207&tenant=TENANTCODE Payload sent as jsondata: { "ph_name": "George Lower Basement" } Manage DB / media files media files. ManageDB requests require an administrator API key. Most write operations send the record fields as a jsondata POST value. Getting the media file list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=MEDIAFILE&action=list&tenant=TENANTCODE Getting info for a media file Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=MEDIAFILE&action=get&objectid=1063&tenant=TENANTCODE Getting the binary part of a media file Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=MEDIAFILE&action=getbinary&objectid=1063&tenant=TENANTCODE Updating a media file Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=mediafile&objectid=10&tenant=TENANTCODE Payload sent as jsondata: { "me_name": "Beep" } Updating the binary part of a media file Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=MEDIAFILE&action=updatebinary&objectid=247&tenant=TENANTCODE ManageDB / Hunt Lists Hunt Lists. Getting the hunt lists list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=HUNTLIST&action=get&objectid=323&tenant=TENANTCODE Getting the hunt lists extension list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=HUNTLIST&action=getextensions&objectid=323&tenant=TENANTCODE Setting the hunt lists extension list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=setextensions&object=huntlist&objectid=26&tenant=TENANTCODE ManageDB / Extensions Extensions. Getting the extension list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=list&object=extension&tenant=TENANTCODE Getting the details for an extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=get&object=extension&objectid=1701&tenant=TENANTCODE Deleting an extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=delete&object=extension&objectid=6016&tenant=TENANTCODE Updating the security for an extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=extension&objectid=1695&tenant=TENANTCODE Payload sent as jsondata: { "ex_callallowed": "all" } Adding a SIP extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=extension&tenant=TENANTCODE Payload sent as jsondata: { "ex_number": "1100", "ex_name": "Test extension", "ex_tech": "SIP", "secret": "hackmeifyoucan", "ex_pickupgroup": "1,5,6", "ex_callgroup": "1,7,9" } Adding a PJSIP extension Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=extension&tenant=TENANTCODE Payload sent as jsondata: { "ex_number": "1100", "ex_name": "Test PJSIP extension", "password": "hackmeifyoucan", "ex_tech": "PJSIP" } ManageDB / Users Users. Getting the user list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=user&action=list Getting the details for an user Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=user&action=get&objectid=3635 Creating an user Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=user Payload sent as jsondata: { "us_username": "Leandro71", "us_password": "sha256(change-me)", "us_up_id": 1 } ManageDB / Conferences Conferences. Creating a conference Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=conference&tenant=TENANTCODE Payload sent as jsondata: { "cr_number": "887", "cr_name": "Test conference", "pin": "5678" } ManageDB / Providers Providers. Getting the provider list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=provider&action=list Getting the details for a provider (SIP) Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=provider&action=get&objectid=1027 Update a provider Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=provider&objectid=1027 Payload sent as jsondata: { "pr_peername": "test_extradevel", "pr_name": "Test extradevel" } Insert a provider Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=provider Payload sent as jsondata: { "pr_peername": "new_provider", "pr_name": "New Provider", "pr_tech": "SIP", "pr_userealtime": "on", "allow": "'alaw:20", "host": "172.16.1.100" } ManageDB / Routing Profiles Routing Profiles. Getting the routing profiles list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=routingprofile&action=list Getting the details for a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=routingprofile&action=get&objectid=99 Getting the list of routes for a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=routingprofile&action=listroutes&objectid=99 Adding a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=routingprofile Payload sent as jsondata: { "rp_name": "Only National", "rp_type": "VOICE" } Update a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=routingprofile&objectid=275 ManageDB / Routes Routes. Getting the route list Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=route&action=list Getting the route list for a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=route&routingprofileid=1&action=list Getting the details for a route Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=route&action=get&objectid=69 Adding a route to a routing profile Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&object=route Payload sent as jsondata: { "dl_rp_id": "1", "dl_name": "Free Numbers", "dl_regex": "^800.*", "dl_pr_id": "89" } Update a route Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=route&objectid=69 Payload sent as jsondata: { "dl_emergencyroute": "", "dl_usepin": "on" } ManageDB / DIDs DIDs. Listing the DIDs for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DID&action=LIST&tenant=TENANTCODE Getting more info for a DID Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DID&action=GET&objectid=27699&tenant=TENANTCODE Updating a DID Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=update&object=did&objectid=27699 Payload sent as jsondata: { "di_comment": "Test DID", "di_recording": "yes" } ManageDB / Destinations Destinations. Getting the destinations for a DID Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=LIST&typesrc=DID&typeidsrc=27699&tenant=TENANTCODE Getting the destinations for a Condition (true) Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=LIST&typesrc=CONDITION&typeidsrc=20&tenant=TENANTCODE Getting the destinations for a Condition (false) Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=LIST&typesrc=NOTCONDITION&typeidsrc=20&tenant=TENANTCODE Replace the destinations for a DID Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=replace&typesrc=CONDITION&typeidsrc=20&tenant=TENANTCODE https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=replace&typesrc=NOTCONDITION&typeidsrc=20&tenant=TENANTCODE https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=replace&typesrc=IVR_1&typeidsrc=3634&tenant=TENANTCODE https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=DESTINATION&action=replace&typesrc=DID&typeidsrc=27699&tenant=TENANTCODE Payload sent as jsondata: [ "PLAYBACK-60", "EXT-29379" ] Destination Tags Destination replacement uses values in TYPE-ID form. The following tags are supported by the legacy destination examples and the current destination lookup code. Tag Destination EXT Dial an extension SMS Send a SMS to an extension PLAYBACK Play a media file RERECORD Rerecord a media file CLEARRECORDING Clear the media from a media file RERECORDSILENT Rerecord a media file without playing an intro CONDITION Follow to a condition VOICEMAIL Call a voicemail IVR Call an IVR DISA Call a DISA PAGING Call a Paging group HUNTLIST Call a Huntlist FLOW Call a Flow PARK Park the call SPECIAL Execute a special destination (check the sp_specials table for the id) MEETME Join a conference QUEUE Dial a Queue RESETQUEUESTATS Reset the stats for a Queue STARTCAMPAIGN Start a campaign REDIALNOTANSWEREDCAMPAIGN Redial the calls not answered for a campaign STOPCAMPAIGN Stop a campaign PAUSECAMPAIGN Pause a campaign UNPAUSECAMPAIGN Unpause a campaign REMOVEFROMCAMPAIGN Remove called number from campaign REMOVECALLERFROMCAMPAIGN Remove caller number from campaign ADDLATESTDIALEDOUTTOCAMPAIGN Add latest dialed out number to campaign ADDLATESTDIALEDINTOCAMPAIGN Add latest dialed in number to campaign ADDTODNCLIST Add called number to Do Not Call list LOGINQUEUE Login caller to Queue TOGGLELOGINQUEUE Toggle Login/Logout caller to Queue LOGINADQUEUE Login caller to Queue TOGGLELOGINADQUEUE Toggle Login/Logout caller to Queue TOGGLEPAUSEQUEUE Toggle Pause/Unpause caller to Queue LOGOUTALLAGENTSFROMQUEUE Logout all agents from Queue LOGOUTQUEUE Logout caller from Queue PAUSEQUEUE Pause caller from Queue UNPAUSEQUEUE Unpause caller from Queue PAUSEALLAGENTSINQUEUE Pause all agents in Queue UNPAUSEALLAGENTSINQUEUE Unpause all agents in Queue CUSTOM Use a custom destination PHONEBOOK Route by Phone Book using regex EXACTPHONEBOOK Route by Phone Book not using regex SETUNCONDITIONALDID Set unconditional forwarding for a DID ENABLEUNCONDITIONALDID Enable the unconditional forwarding for a DID DISABLEUNCONDITIONALDID Disable the unconditional forwarding for a DID TOGGLEUNCONDITIONALDID Toggle the unconditional forwarding for a DID CLIDNAMEBYPHONEBOOK Set Caller ID Name by Phone Book CALLERIDMOD Alter Caller ID based on rule MUSICONHOLD Set Music On Hold to RINGMUSICONHOLD Ring extension using Music On Hold RESPONSEPATH Start Response Path SAMENUMBERVM Voicemail same number ManageDB / IVRs IVRs. Listing the IVRs for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=IVR&action=LIST&tenant=TENANTCODE Getting more info for a IVR The IVR media-file references are stored as destinations; use the destination examples to change them. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=IVR&action=GET&tenant=TENANTCODE&objectid=322 Getting the destinations for the IVR, including the media files Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=IVR&action=GETDESTINATIONS&tenant=TENANTCODE&objectid=3634 ManageDB / Conditions Conditions. Listing the Conditions for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CONDITION&action=LIST&tenant=TENANTCODE Listing the destinations for a Condition Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CONDITION&action=GETDESTINATIONS&tenant=TENANTCODE&objectid=20&format=json Getting info and more info for a Condition Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CONDITION&action=GET&tenant=TENANTCODE&objectid=20&format=json https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CONDITION&action=GETEXTENDEDINFOS&tenant=TENANTCODE&objectid=20&format=json Replacing extended info for a Condition Weektime and calendar conditions use extended-info rows; replace the extended-info list when changing their schedules. Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=CONDITION&action=replaceextendedinfos&objectid=20&tenant=TENANTCODE Payload sent as jsondata: [ { "param1": "1", "param2": "8:00", "param3": "13:00" }, { "param1": "1", "param2": "15:00", "param3": "19:00" }, { "param1": "2", "param2": "8:00", "param3": "13:00" }, { "param1": "2", "param2": "15:00", "param3": "19:00" } ] ManageDB / Voicemails Voicemails. Listing the Voicemails for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=VOICEMAIL&action=LIST&tenant=TENANTCODE Listing the Voicemails message for a voicemail Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=VOICEMAIL&action=LISTMESSAGES&tenant=TENANTCODE&mailboxuser=001&mailbox=INBOX Get a message recording for a voicemail id Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=VOICEMAIL&action=GETMESSAGERECORDING&id=4963&tenant=TENANTCODE Add a voicemail box Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&tenant=TENANTCODE&object=voicemail Payload sent as jsondata: { "mailbox": "9000", "password": "1234567", "fullname": "This is a test", "email": "test@mirtapbx.com" } Delete a voicemail box Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=VOICEMAIL&action=DELETE&objectid=32259&tenant=TENANTCODE ManageDB / Phone phonebooks Phone phonebooks. Listing the Phone phonebooks for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=MANAGEDB&object=PHONEPHONEBOOK&action=LIST Get the detail of a phone phone book Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&tenant=TENANTCODE&reqtype=MANAGEDB&object=PHONEPHONEBOOK&action=GET&objectid=1332 ManageDB / Queues Queues. Listing the Queues for a tenant Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=QUEUE&action=LIST&tenant=TENANTCODE Add a Queue Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&action=add&tenant=TENANTCODE&object=queue Payload sent as jsondata: { "qu_name": "Support Line", "strategy": "RINGALL", "timeout": "30" } Delete a queue Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=MANAGEDB&object=QUEUE&action=DELETE&objectid=7027&tenant=TENANTCODE Token Authentication Use reqtype=AUTHTOKEN to generate a one-time or expiring login token for a user. The returned token can be used as the password in the normal web login URL. https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=AUTHTOKEN&action=generate&validity=ONCE&user=adrian https://pbx.example.com/mirtapbx/login.php?username=adrian&password=AUTH_TOKEN Request example: https://pbx.example.com/mirtapbx/proxyapi.php?key=APIKEY&reqtype=AUTHTOKEN&action=generate&validity=ONCE&user=adrian Security Notes Use tenant read-only keys for reporting integrations whenever possible. Use administrator keys only for global reporting or MANAGEDB actions that require them. Do not store production keys in browser-side scripts. Prefer the OpenAPI endpoint for new integrations unless an existing integration requires the legacy ProxyAPI format.