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.

OpenAPI

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

ActionPattern
ListGET https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI
Get extension by numberGET https://pbx.example.com/pbx/openapi.php/extensions/number/100?tenant=CANISTRACCI
Get live extension stateGET https://pbx.example.com/pbx/openapi.php/extensions/state?tenant=CANISTRACCI&number=100
DialPOST https://pbx.example.com/pbx/openapi.php/dial?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI
ModifyPATCH https://pbx.example.com/pbx/openapi.php/extensions/EXTENSION_ID?tenant=CANISTRACCI
DeleteDELETE 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.

ObjectPrimary pathAuthentication scopeOperations or required fields
Auth Token/auth/tokenGlobal full API keyPOST generate, DELETE reset
Dial/dialTenant full API keyPOST only; requires source and dest
CDR/cdrsTenant API key or global key; GET onlyGET only
Simple CDR/simplecdrsTenant API key or global key; GET onlyGET only
AI Analysis/aianalysisTenant API key or global key; GET onlyGET only; requires uniqueid
Extension/extensionsTenant API keynumber or ex_number; GET /extensions/state for live state
Tenant/tenantsGlobal API keyte_name, te_code
User/usersGlobal API keyus_username
User Profile/userprofilesGlobal API keyup_name
Routing Profile/routingprofilesGlobal API keyrp_name
Provider/providersGlobal API keypr_name
Voicemail/voicemailsTenant API keymailbox
IVR/ivrsTenant API keyiv_name
Custom Destination/customdestinationsTenant API key or global key with global=1cu_name, cu_ct_id
Condition/conditionsTenant API keyco_type
Hunt List/huntlistsTenant API keyhu_name
DID/didsTenant API keydi_number
Queue/queuesTenant API keyNo required create field listed
Setting/settingsTenant API key or global key with global=1se_code
Media File/mediafilesTenant API key or global key with global=1me_name
Music On Hold/musiconholdsTenant API key or global key with global=1mu_name
Paging Group/paginggroupsTenant API keypa_name, pa_number
Conference Room/conferenceroomsTenant API keycr_name, cr_number
Flow/flowsTenant API keyfl_name
Tenant Variable/tenantvariablesTenant API keytv_al_id
DISA/disasTenant API keyds_name
Caller ID Blacklist/calleridblacklistsTenant API key or global key with global=1bl_callerid
Campaign/campaignsTenant API keyca_name
Campaign Number/campaignnumbersTenant API keycn_ca_id, cn_number
Cron Job/cronjobsTenant API key or global key with global=1cr_name
Feature Code/featurecodesTenant API key or global key with global=1fe_code
Short Number/shortnumbersTenant API key or global key with global=1sn_number
Phone Book/phonebooksTenant API keypb_name
Phone Book Entry/phonebookentriesTenant API keyphonebook_id, at least one value
Provisioning Phone/provisioningphonesTenant API keyph_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.

OpenAPI

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
ParameterRequiredDescription
tenantYesTenant code or tenant name.
numberYes, unless ext is usedExtension number to check.
extYes, unless number is usedCompatibility alias for number.
keyNo, if using headersAPI 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

OpenAPI

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.

OperationPathAPI key
Generate tokenPOST https://pbx.example.com/pbx/openapi.php/auth/tokenGLOBAL_API_KEY
Reset tokenDELETE https://pbx.example.com/pbx/openapi.php/auth/tokenGLOBAL_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 typeMatched field
Web userus_users.us_username
Extension web userex_extensions.ex_webuser
SIP extension usernamesipfriends.name when ex_webuser is empty
PJSIP endpoint IDps_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

Common Errors

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match a valid API key.
admin_requiredA global API key is required.
read_only_api_keyThe supplied key is read-only and cannot generate or reset tokens.
missing_userThe request body did not include a user value.
invalid_validityThe validity value was not ONCE and could not be parsed as a date/time.
user_not_foundNo supported web user or extension identity matched the requested user value.
OpenAPI

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
ParameterRequiredDescription
tenantYesTenant code or tenant name.
keyNo, if using headersFull API key. The key can also be sent with X-API-Key or Authorization: Bearer.

Request Body

FieldRequiredDescription
sourceYesSource extension. Compatibility aliases are exten and ?exten.
destYesDestination number. Compatibility alias is phone.
dialtimeoutNoOriginate timeout in seconds. Defaults to 30.
timeoutNoSets the dialplan variable SETTIMEOUT.
sourceclidNoSets SETSOURCECLID.
destclidNoSets SETDESTCLID.
logqueueoutboundNoSets SETLOGQUEUEOUTBOUND.
recordingNoSets SETRECORDING.
autoanswerNoSets AUTOANSWER.
nofollowNoSets SETNOFOLLOWEXTENSION.
accountNoPeer account name to set as SETPEERNAME. Use SOURCE to resolve it from the source extension.
serverNoPBX node peer name to use when the source or destination registration server cannot be found.
varNoComma-separated custom variables, for example campaign=summer,lead=42.
varsNoCustom 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

OpenAPI

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

PropertyValue
Objectcdr
Primary path/cdrs
Path aliases/cdr, /cdrs, /call, /calls
Supported methodGET
Default formatjson
Compatibility formatstemplate, xml

Endpoint Patterns

ActionExample pattern
List recordsGET https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI
Filter by date rangeGET 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 pathGET https://pbx.example.com/pbx/openapi.php/cdrs/RECORD_ID?tenant=CANISTRACCI
Template/XML compatibility outputGET https://pbx.example.com/pbx/openapi.php/cdrs?tenant=CANISTRACCI&format=template&template=Docs%20Export

Query Parameters

ParameterDescription
tenantTenant code or tenant name. Global API keys can use % wildcards; tenant API keys are restricted to their tenant.
startStart date and time. Defaults to today at 00:00:00.
endEnd date and time. Defaults to today at 23:59:59.
idComma-separated CDR ID values. A path value such as /cdrs/123 also maps to this filter.
uniqueidComma-separated Asterisk unique ID values.
linkedidComma-separated linked ID values used to group call legs.
srcComma-separated source values.
firstdstComma-separated first destination values.
dispositionComma-separated disposition values such as ANSWERED, NO ANSWER, BUSY, or FAILED.
directionDirection filter based on the CDR userfield mapping. Accepted values are IN, OUT, IN,OUT, and OUT,IN.
phoneComma-separated phone values searched across src, dst, firstdst, lastdst, realsrc, and wherelanded.
formatResponse format. Defaults to json. Use template or xml for template-based compatibility output.
templateTemplate name from the tenant XML templates. Used only with format=template or format=xml.
contenttypeOptional Content-Type header for rendered template output.

Response Fields

FieldDescription
accountcodeTenant code stored on the CDR.
IDInternal CDR row ID.
startCall start timestamp.
answerAnswer timestamp when the call was answered.
endCall end timestamp.
clidFull caller ID string.
realsrcNormalized or real source value.
firstdstFirst dialed destination tracked by MiRTA PBX.
durationTotal call duration in seconds.
billsecAnswered talk time in seconds.
dispositionAsterisk call disposition.
cc_costCalculated tenant-side call cost when available.
dcontextAsterisk destination context.
dstchannelDestination channel.
userfieldMiRTA PBX call marker, commonly including inbound or outbound direction information.
uniqueidAsterisk unique ID for the CDR leg.
prevuniqueidPrevious unique ID for linked call-leg processing.
lastdstLast destination reached by the call.
wherelandedFinal PBX object or destination where the call landed.
srcAsterisk source value.
dstAsterisk destination value.
lastappLast Asterisk application executed.
srcCallIDSource SIP Call-ID when available.
linkedidAsterisk linked ID used to group related CDR legs.
peeraccountAsterisk peer account value.
originateidOrigination tracking ID when available.
cc_countryRated country when rating data is available.
cc_networkRated network when rating data is available.
pincodePIN code associated with the call when present.
cc_buyCalculated buy-side cost when available.

Important Notes

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"

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code or tenant name is required when using a tenant API key.
single_tenant_requiredTemplate output requires the request to resolve to exactly one tenant.
template_not_foundThe selected XML/template output template does not exist for the tenant.
method_not_allowedThe endpoint is read-only and only supports GET.
OpenAPI

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

PropertyValue
Objectsimplecdr
Primary path/simplecdrs
Path aliases/simplecdr, /simplecdrs, /simple_cdr, /simple_cdrs
Supported methodGET
Default formatjson
Compatibility formatstemplate, xml

Endpoint Patterns

ActionExample pattern
List recordsGET https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI
Filter by date rangeGET 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 pathGET https://pbx.example.com/pbx/openapi.php/simplecdrs/RECORD_ID?tenant=CANISTRACCI
Template/XML compatibility outputGET https://pbx.example.com/pbx/openapi.php/simplecdrs?tenant=CANISTRACCI&format=template&template=Docs%20Export

Query Parameters

ParameterDescription
tenantTenant code or tenant name. Global API keys can use % wildcards; tenant API keys are restricted to their tenant.
startStart date and time. Defaults to today at 00:00:00.
endEnd date and time. Defaults to today at 23:59:59.
idComma-separated simple CDR ID values. A path value such as /simplecdrs/123 also maps to this filter.
uniqueidComma-separated Asterisk unique ID values.
calleridnumComma-separated caller ID number values.
calleridnameComma-separated caller ID name values.
dispositionComma-separated disposition values such as ANSWERED, NO ANSWER, BUSY, or FAILED.
directionComma-separated simple CDR directions, such as IN, OUT, or LOCAL.
dialednumComma-separated dialed number values.
whoansweredComma-separated values for the extension, user, or object that answered.
phoneComma-separated phone values searched across sc_whoanswered, sc_calleridnum, and sc_dialednum.
mindurationMinimum total call duration in seconds, exclusive.
mintalktimeMinimum answered talk time in seconds, exclusive.
formatResponse format. Defaults to json. Use template or xml for template-based compatibility output.
templateTemplate name from the tenant XML templates. Used only with format=template or format=xml.
contenttypeOptional Content-Type header for rendered template output.

Response Fields

FieldDescription
sc_te_idInternal tenant ID.
tenantcodeTenant code.
sc_startSimple CDR start timestamp.
sc_directionSimple direction value, such as IN, OUT, or LOCAL.
sc_calleridnumCaller ID number.
sc_calleridnameCaller ID name.
sc_dialednumDialed number.
sc_dispositionCall disposition.
sc_durationTotal call duration in seconds.
sc_billsecAnswered talk time in seconds.
sc_uniqueidAsterisk unique ID represented by the simple CDR row.
sc_whoansweredExtension, 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.

VariableDescription
{$end}Computed end timestamp from sc_start plus sc_duration seconds.
{$clid}CDR-style caller ID formatted as "sc_calleridname" <sc_calleridnum>.
{$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

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code or tenant name is required when using a tenant API key.
single_tenant_requiredTemplate output requires the request to resolve to exactly one tenant.
template_not_foundThe selected XML/template output template does not exist for the tenant.
method_not_allowedThe endpoint is read-only and only supports GET.
OpenAPI

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

PropertyValue
Objectextension
Primary path/extensions
ID fieldex_id
Label fieldex_number
Primary source tableex_extensions
Required on createnumber or ex_number
Path aliases/extensions

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/extensions?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/extensions/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
numberex_number
nameex_name
techex_tech
sipusernameusername
mailboxex_mailbox
emailex_email
passwordtechnology secret/password
callgroupsex_callgroup
pickupgroupsex_pickupgroup
realextensionsvirtual_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 typeAccepted aliases
EXT-UNCONDITIONALunconditional
EXT-NOANSWERonnoanswer, noanswer, no_answer
EXT-BUSYonbusy, busy
EXT-OFFLINEonoffline, offline
EXT-ONCONDITIONoncondition, condition
EXT-DIALBYNAMEdialbyname, dial_by_name
EXT-ONLYALLOWCALLonlyallowcall, only_allow_call
EXT-DONOTCALLdonotcall, do_not_call

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objecttenant
Primary path/tenants
ID fieldte_id
Label fieldte_name
Primary source tablete_tenants
Required on createte_name, te_code
Path aliases/tenants

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/tenants
Get by IDGET https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID
CreatePOST https://pbx.example.com/pbx/openapi.php/tenants
UpdatePATCH https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID
DeleteDELETE https://pbx.example.com/pbx/openapi.php/tenants/OBJECT_ID

Accepted Field Aliases

Request fieldSource field
namete_name
codete_code
billingcodete_billingcode
billing_codete_billingcode
timezonete_timezone
routing_profile_idte_rp_id
campaign_routing_profile_idte_campaign_rp_id
fax_routing_profile_idte_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectuser
Primary path/users
ID fieldus_id
Label fieldus_username
Primary source tableus_users
Required on createus_username
Path aliases/user, /users, /nuser, /nusers, /us_user, /us_users

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/users
Get by IDGET https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID
CreatePOST https://pbx.example.com/pbx/openapi.php/users
UpdatePATCH https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID
DeleteDELETE https://pbx.example.com/pbx/openapi.php/users/OBJECT_ID

Accepted Field Aliases

Request fieldSource field
usernameus_username
nameus_username
descriptionus_description
emailus_email
profile_idus_up_id
userprofile_idus_up_id
passwordus_password
use_ldapus_useldap
ip_filterus_ipfilter
two_factor_typeus_2fatype
never_expireus_neverexpire
dynamic_ipus_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectuserprofile
Primary path/userprofiles
ID fieldup_id
Label fieldup_name
Primary source tableup_userprofiles
Required on createup_name
Path aliases/userprofile, /userprofiles, /user_profile, /user_profiles

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/userprofiles
Get by IDGET https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID
CreatePOST https://pbx.example.com/pbx/openapi.php/userprofiles
UpdatePATCH https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID
DeleteDELETE https://pbx.example.com/pbx/openapi.php/userprofiles/OBJECT_ID

Accepted Field Aliases

Request fieldSource field
nameup_name
descriptionup_description
reservedup_reserved
userpanelup_userpanel
user_panelup_userpanel
extension_user_profileup_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectroutingprofile
Primary path/routingprofiles
ID fieldrp_id
Label fieldrp_name
Primary source tablerp_routingprofiles
Required on createrp_name
Path aliases/routingprofiles, /routing_profiles, /routing_profile

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/routingprofiles
Get by IDGET https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID
CreatePOST https://pbx.example.com/pbx/openapi.php/routingprofiles
UpdatePATCH https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID
DeleteDELETE https://pbx.example.com/pbx/openapi.php/routingprofiles/OBJECT_ID

Accepted Field Aliases

Request fieldSource field
namerp_name
descriptionrp_description
typerp_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectprovider
Primary path/providers
ID fieldpr_id
Label fieldpr_name
Primary source tablepr_providers
Required on createpr_name
Path aliases/provider, /providers

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/providers
Get by IDGET https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID
CreatePOST https://pbx.example.com/pbx/openapi.php/providers
UpdatePATCH https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID
DeleteDELETE https://pbx.example.com/pbx/openapi.php/providers/OBJECT_ID

Accepted Field Aliases

Request fieldSource field
namepr_name
peernamepr_peername
peer_namepr_peername
techpr_tech
hostpr_host
disabledpr_disabled
penaltypr_penalty
realtimepr_userealtime
use_realtimepr_userealtime
calleridmod_idpr_ca_id
calleridpr_callerid
caller_idpr_callerid
callerid_numberpr_callerid
caller_id_numberpr_callerid
calleridnamepr_calleridname
callerid_namepr_calleridname
caller_id_namepr_calleridname
did_mod_idpr_did_ca_id
max_out_channelspr_maxoutchannels
ignore_sip_causepr_ignoresipcause
ignore_busypr_ignorebusy
sms_protocolpr_smsprotocol
sms_urlpr_smsurl
sms_userpr_smsuser
sms_passwordpr_smspassword
canreinvitesipfriends.canreinvite for chan_sip direct media
direct_mediaps_endpoints.direct_media for PJSIP direct media

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectvoicemail
Primary path/voicemails
ID fielduniqueid
Label fieldmailbox
Primary source tablevoicemail
Required on createmailbox
Path aliases/voicemails

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/voicemails?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/voicemails/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namefullname
numbermailbox

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 typeAccepted aliases
VOICEMAIL-OPERATORoperator, voicemail_operator
VOICEMAIL-FOLLOWfollow, voicemail_follow
VOICEMAIL-BROADCASTbroadcast, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectivr
Primary path/ivrs
ID fieldiv_id
Label fieldiv_name
Primary source tableiv_ivrs
Required on createiv_name
Path aliases/ivrs

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/ivrs?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/ivrs/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameiv_name
mediafile_idiv_me_id
timeoutiv_timeout
digit_timeoutiv_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 typeAccepted aliases
IVR_1ivr_1, key_1, 1
IVR_2ivr_2, key_2, 2
IVR_3ivr_3, key_3, 3
IVR_4ivr_4, key_4, 4
IVR_5ivr_5, key_5, 5
IVR_6ivr_6, key_6, 6
IVR_7ivr_7, key_7, 7
IVR_8ivr_8, key_8, 8
IVR_9ivr_9, key_9, 9
IVR_0ivr_0, key_0, 0
IVR_STARivr_star, key_star, star
IVR_SHARPivr_sharp, key_sharp, sharp
IVR_WRONGivr_wrong, wrong
IVR_TIMEOUTivr_timeout, timeout
IVR_HANGUPivr_hangup, hangup
IVR_FEATUREivr_feature, feature
IVR_EXTENSIONivr_extension, extension
IVR_MEDIAFILEivr_mediafile, mediafile
IVR_OPTIONSMEDIAFILEivr_optionsmediafile, optionsmediafile
CUSTOMIVR_SUPPORTcustomivr_support

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcustomdestination
Primary path/customdestinations
ID fieldcu_id
Label fieldcu_name
Primary source tablecu_customs
Required on createcu_name, cu_ct_id
Path aliases/custom, /customs, /customdestinations, /custom_destinations, /custom_destination

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/customdestinations?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/customdestinations/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namecu_name
type_idcu_ct_id
custom_type_idcu_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 typeAccepted aliases
PRIVACY-DONTCALLprivacy_dontcall, dontcall
PRIVACY-TORTUREprivacy_torture, torture
CTONANSWERonanswer
CALLBACK-CONNECTEDcallback_connected
CTONCALLERHANGUPcaller_hangup
SPLITCHANNELACTION-CALLERsplit_caller
SPLITCHANNELACTION-CALLEDsplit_called
RANDOMDESTINATIONrandomdestination, random_destination
RANDOMDESTINATION1randomdestination1, random_destination1
RANDOMDESTINATION2randomdestination2, random_destination2
RANDOMDESTINATION3randomdestination3, random_destination3
RANDOMDESTINATION4randomdestination4, random_destination4
RANDOMDESTINATION5randomdestination5, random_destination5
RANDOMDESTINATION6randomdestination6, random_destination6
RANDOMDESTINATION7randomdestination7, random_destination7
RANDOMDESTINATION8randomdestination8, random_destination8
RANDOMDESTINATION9randomdestination9, random_destination9
RANDOMDESTINATION10randomdestination10, random_destination10
RANDOMDESTINATION11randomdestination11, random_destination11
RANDOMDESTINATION12randomdestination12, random_destination12
RANDOMDESTINATION13randomdestination13, random_destination13
RANDOMDESTINATION14randomdestination14, random_destination14
RANDOMDESTINATION15randomdestination15, random_destination15
RANDOMDESTINATION16randomdestination16, random_destination16
RANDOMDESTINATION17randomdestination17, random_destination17
RANDOMDESTINATION18randomdestination18, random_destination18
RANDOMDESTINATION19randomdestination19, random_destination19
RANDOMDESTINATION20randomdestination20, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcondition
Primary path/conditions
ID fieldco_id
Label fieldco_name
Primary source tableco_conditions
Required on createco_type
Path aliases/conditions

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/conditions?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/conditions/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameco_name
typeco_type
timezoneco_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 typeAccepted aliases
CONDITIONcondition, true, yes, destination
NOTCONDITIONnotcondition, false, no, notdestination
CONDITION1condition1, destination1, destinationmvv1
CONDITION2condition2, destination2, destinationmvv2
CONDITION3condition3, destination3, destinationmvv3
CONDITION4condition4, destination4, destinationmvv4
CONDITION5condition5, destination5, destinationmvv5
CONDITION6condition6, destination6, destinationmvv6
CONDITION7condition7, destination7, destinationmvv7
CONDITION8condition8, destination8, destinationmvv8
CONDITION9condition9, destination9, destinationmvv9
CONDITION10condition10, destination10, destinationmvv10
CONDITION11condition11, destination11, destinationmvv11
CONDITION12condition12, destination12, destinationmvv12
CONDITION13condition13, destination13, destinationmvv13
CONDITION14condition14, destination14, destinationmvv14
CONDITION15condition15, destination15, destinationmvv15
CONDITION16condition16, destination16, destinationmvv16
CONDITION17condition17, destination17, destinationmvv17
CONDITION18condition18, destination18, destinationmvv18
CONDITION19condition19, destination19, destinationmvv19
CONDITION20condition20, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objecthuntlist
Primary path/huntlists
ID fieldhu_id
Label fieldhu_name
Primary source tablehu_huntlists
Required on createhu_name
Path aliases/huntlists

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/huntlists?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/huntlists/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namehu_name
numberhu_number
typehu_type
ringtimehu_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 typeAccepted aliases
HUNTLISTextensions, members, huntlist
HUNTLIST-TIMEOUTtimeout, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectdid
Primary path/dids
ID fielddi_id
Label fielddi_number
Primary source tabledi_dids
Required on createdi_number
Path aliases/dids

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/dids?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/dids/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
numberdi_number
countrydi_country
areadi_area
commentdi_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 typeAccepted aliases
DIDdestination, did
DID-UNCONDITIONALunconditional
DID-SMSsms
DID-FAXSUCCESSfaxsuccess, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectqueue
Primary path/queues
ID fieldqu_id
Label fieldqu_name
Primary source tablequ_queues
Path aliases/queues

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/queues?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/queues/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namequ_name
numberqu_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 typeAccepted aliases
QUEUE-FULLfull
QUEUE-TIMEOUTtimeout_destination, timeout
QUEUE-EXITKEYexitkey
QUEUE-ONCALLBACKoncallback
QUEUE-NOBODYHOMEnobodyhome
QUEUE-NOFREEMEMBERnofreemember
QUEUE-PERIODICANNOUNCEperiodicannounce
QUEUE-BEFORERINGINGbeforeringing
QUEUE-ONAUTOPAUSEonautopause
QUEUE-ONABANDONEDCALLonabandonedcall

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectsetting
Primary path/settings
ID fieldse_id
Label fieldse_code
Primary source tablese_settings
Required on createse_code
Path aliases/settings

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/settings?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/settings/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
codese_code
valuese_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectmediafile
Primary path/mediafiles
ID fieldme_id
Label fieldme_name
Primary source tableme_mediafiles
Required on createme_name
Path aliases/mediafiles, /media_files, /media_file

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/mediafiles?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/mediafiles/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameme_name
descriptionme_description
formatme_format
typeme_type
textme_text
engineme_engine
languageme_language
data_base64me_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectmusiconhold
Primary path/musiconholds
ID fieldmu_id
Label fieldmu_name
Primary source tablemu_musiconholds
Required on createmu_name
Path aliases/moh, /music, /musiconholds, /music_on_hold, /music_on_holds

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/musiconholds?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/musiconholds/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namemu_name
custommu_custom
volumemu_volume
randomizeordermu_randomizeorder
streamenginemu_streamengine
formatformat
applicationapplication
modemode

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 typeAccepted aliases
MUSICONHOLDmediafile, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectpaginggroup
Primary path/paginggroups
ID fieldpa_id
Label fieldpa_name
Primary source tablepa_paginggroups
Required on createpa_name, pa_number
Path aliases/paging, /pagings, /paginggroup, /paginggroups, /intercom, /intercoms

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/paginggroups?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/paginggroups/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namepa_name
numberpa_number
pinpa_pin
bidirectionalpa_bidirectional
checkinusepa_checkinuse
mediafile_idpa_me_id
manualheaderpa_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 typeAccepted aliases
PAGINGextensions, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectconferenceroom
Primary path/conferencerooms
ID fieldcr_id
Label fieldcr_name
Primary source tablecr_conferencerooms
Required on createcr_name, cr_number
Path aliases/conference, /conferences, /conferencerooms, /conference_rooms, /conference_room

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/conferencerooms?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/conferencerooms/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namecr_name
numbercr_number
hostedcr_hosted
rate_idcr_rrid
startdatestarttime
enddateendtime
request_pin_mediafile_idcr_requestpinmeid

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectflow
Primary path/flows
ID fieldfl_id
Label fieldfl_name
Primary source tablefl_flows
Required on createfl_name
Path aliases/flow, /flows

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/flows?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/flows/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namefl_name
commentfl_comment
numberfl_number
valuefl_value
variable_namefl_variable_name
monitor_typefl_monitor_type
monitor_type_idfl_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 typeAccepted aliases
FLOWdestination, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objecttenantvariable
Primary path/tenantvariables
ID fieldtv_id
Label fieldtv_value
Primary source tabletv_tenantvariables
Required on createtv_al_id
Path aliases/variable, /variables, /tenantvariable, /tenantvariables, /tenant_variable, /tenant_variables

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/tenantvariables?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/tenantvariables/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
variable_idtv_al_id
valuetv_value
commenttv_comment
lockedtv_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectdisa
Primary path/disas
ID fieldds_id
Label fieldds_name
Primary source tableds_disas
Required on createds_name
Path aliases/disa, /disas

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/disas?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/disas/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameds_name
mediafile_idds_me_id
pinds_pin
outboundds_outbound
blockcidds_blockcid
calleridnumds_calleridnum
calleridnameds_calleridname
digitstimeoutds_digitstimeout
responsetimeoutds_responsetimeout
looponattemptds_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcalleridblacklist
Primary path/calleridblacklists
ID fieldbl_id
Label fieldbl_callerid
Primary source tablebl_blacklists
Required on createbl_callerid
Path aliases/calleridblacklist, /calleridblacklists, /callerid_blacklist, /callerid_blacklists, /blacklist, /blacklists

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/calleridblacklists?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/calleridblacklists/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
calleridbl_callerid
reasonbl_reason
insertedbl_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcampaign
Primary path/campaigns
ID fieldca_id
Label fieldca_name
Primary source tableca_campaigns
Required on createca_name
Path aliases/campaign, /campaigns

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/campaigns?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/campaigns/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameca_name
typeca_type
techca_tech
datestartca_datestart
dateendca_dateend
condition_idca_co_id
calleridca_callerid
calleridnameca_calleridname
stateca_state
queue_idca_qu_id
messageca_message
confirmmessage_idca_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 typeAccepted aliases
CAMPAIGN-ONCONNECTonconnect, on_connect
CAMPAIGN-DONOTCALLdonotcall, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcampaignnumber
Primary path/campaignnumbers
ID fieldcn_id
Label fieldcn_number
Primary source tablecn_campaignnumbers
Required on createcn_ca_id, cn_number
Path aliases/campaignnumber, /campaignnumbers, /campaign_number, /campaign_numbers

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/campaignnumbers?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/campaignnumbers/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
campaign_idcn_ca_id
numbercn_number
descriptioncn_description
dispositioncn_disposition
attemptscn_attempts
lastattemptcn_lastattempt
billseccn_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectcronjob
Primary path/cronjobs
ID fieldcr_id
Label fieldcr_name
Primary source tablecr_cronjobs
Required on createcr_name
Path aliases/cronjob, /cronjobs, /cron_job, /cron_jobs

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/cronjobs?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/cronjobs/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namecr_name
typecr_type
node_idcr_no_id
activecr_active
oncecr_once
minutecr_minute
hourcr_hour
daycr_day
monthcr_month
yearcr_year
weekdaycr_weekday
timezonecr_timezone
runcr_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 typeAccepted aliases
CRONJOBdestination, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectfeaturecode
Primary path/featurecodes
ID fieldfe_id
Label fieldfe_code
Primary source tablefe_features
Required on createfe_code
Path aliases/feature, /features, /featurecodes, /feature_codes, /feature_code

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/featurecodes?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/featurecodes/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
codefe_code
commentfe_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 typeAccepted aliases
FEATUREdestination, 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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectshortnumber
Primary path/shortnumbers
ID fieldsn_id
Label fieldsn_number
Primary source tablesn_shortnumbers
Required on createsn_number
Path aliases/shortnumbers, /short_numbers, /short_number

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/shortnumbers?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/shortnumbers/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
numbersn_number
destinationsn_destnumber
destnumbersn_destnumber
commentsn_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectphonebook
Primary path/phonebooks
ID fieldpb_id
Label fieldpb_name
Primary source tablepb_phonebooks
Required on createpb_name
Path aliases/phonebook, /phonebooks, /phone_book, /phone_books

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/phonebooks?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/phonebooks/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
namepb_name
include_extensionspb_includeext
includeextpb_includeext
include_short_numberspb_includeshortnum
includeshortnumpb_includeshortnum
layoutpl_phonebooklayouts
itemspl_phonebooklayouts

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectphonebookentry
Primary path/phonebookentries
ID fieldpe_id
Label fieldpe_id
Primary source tablepe_phonebookentries
Required on createphonebook_id, at least one value
Path aliases/phonebookentry, /phonebookentries, /phonebook_entry, /phonebook_entries, /phonebookcontact, /phonebookcontacts, /phonebook_contact, /phonebook_contacts

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
phonebook_idpe_pb_id
pbidpe_pb_id
valuespd_phonebookdetails keyed by pi_code
fieldspd_phonebookdetails keyed by pi_code
detailspd_phonebookdetails rows
NAMEphone book item code
PHONE1phone book item code
PHONE2phone book item code
EMAILphone book item code
ROUTINGphone book item code

Important Notes

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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectprovisioningphone
Primary path/provisioningphones
ID fieldph_id
Label fieldph_name
Primary source tableph_phones
Required on createph_name, ph_mac
Path aliases/phone, /phones, /provisioningphones, /provisioning_phones, /provisioning_phone

Endpoint Patterns

ActionExample pattern
ListGET https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI
Get by IDGET https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI
CreatePOST https://pbx.example.com/pbx/openapi.php/provisioningphones?tenant=CANISTRACCI
UpdatePATCH https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI
DeleteDELETE https://pbx.example.com/pbx/openapi.php/provisioningphones/OBJECT_ID?tenant=CANISTRACCI

Accepted Field Aliases

Request fieldSource field
nameph_name
macph_mac
model_idph_pm_id
passwordph_password
filenameph_filename
http_userph_http_user
http_passwordph_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

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code is required for tenant-scoped writes or tenant-key reads.
read_only_api_keyThe key can read data but cannot create, update, or delete objects.
missing_required_fieldA required create field is missing.
OpenAPI

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

PropertyValue
Objectaianalysis
Primary path/aianalysis
Path aliases/aianalysis, /aianalyses, /ai_analysis, /ai_analyses, /callanalysis, /call_analysis
Supported methodGET
Required filteruniqueid
Default formatjson
Source tablesrm_recordingmetadatas, tr_transcripts

Endpoint Patterns

ActionExample pattern
Get AI analysis by unique IDGET https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42
Get AI analysis by path unique IDGET https://pbx.example.com/pbx/openapi.php/aianalysis/1717240000.42?tenant=CANISTRACCI
Get multiple callsGET https://pbx.example.com/pbx/openapi.php/aianalysis?tenant=CANISTRACCI&uniqueid=1717240000.42,1717240000.43
Use an alias pathGET https://pbx.example.com/pbx/openapi.php/ai_analysis?tenant=CANISTRACCI&uniqueid=1717240000.42

Query Parameters

ParameterDescription
tenantTenant 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.
uniqueidRequired comma-separated Asterisk unique ID values. A path value such as /aianalysis/1717240000.42 also maps to this filter.
keyOptional API key query parameter. Prefer the X-API-Key header or bearer token for new integrations.

Response Fields

FieldDescription
tenant_idInternal tenant ID.
tenant_codeTenant code.
uniqueidAsterisk unique ID requested by the integration.
transcriptFull transcript text. When recording metadata does not contain a full transcript, MiRTA PBX builds this value from transcript segments.
summaryAI-generated call summary.
sentiment_scoreFirst numeric sentimental analysis score found for the unique ID, or null.
sentiment_scoresAll distinct numeric sentimental analysis scores found for the unique ID.
sentiment_briefShort sentimental analysis text from recording metadata.
sentiment_detailsDetailed sentimental analysis payload. This may be JSON text depending on the configured AI processor.
recordingsPer-recording metadata rows for the unique ID.
transcript_segmentsTimestamped transcript segments for the unique ID.

Recording Fields

FieldDescription
metadata_idInternal recording metadata row ID.
recording_idInternal recording ID.
dateRecording metadata date.
transcriptTranscript stored on that recording metadata row.
summarySummary stored on that recording metadata row.
sentiment_scoreNumeric sentimental score for that recording metadata row, or null.
sentiment_briefShort sentimental analysis text for that recording metadata row.
sentiment_detailsDetailed sentimental analysis payload for that recording metadata row.

Transcript Segment Fields

FieldDescription
recording_idInternal recording ID associated with the transcript segment.
speakerSpeaker number assigned by the transcript processor.
startSegment start time. Numeric values are returned as numbers.
endSegment end time. Numeric values are returned as numbers.
textTranscript 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

Common Errors

ErrorMeaning
missing_api_keyNo API key was supplied in the query string, X-API-Key, or bearer token.
invalid_api_keyThe supplied key does not match the tenant or global API key.
tenant_requiredA tenant code or tenant name is required when using a tenant API key.
tenant_not_foundThe tenant parameter did not match any visible tenant.
uniqueid_requiredThe request did not include a usable uniqueid value.
method_not_allowedThe endpoint is read-only and only supports GET.

ProxyAPI (old)

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:

<?xml version="1.0">
<Result>
<Agent>105-TENANTCODE</Agent>
<Status>NOT ACTIVE</Status>
<Queue>supportQ</Queue>
<ClientID>1234</MemberNumber>
<OrderNumber>11223344</MemberNumber>
<Caller>Manuel <7171345678></Caller>
<VoiceFile>3619</VoiceFile>
</Result>

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