Skip to main content

Overview and Examples

proxyapi.php is the legacy MiRTA PBX HTTP API. It is designed for external software that needs call status, PBX state, call history, queue operations, voicemail actions, DND control, phonebook access, and limited configuration changes.

Authentication

Tenant API keys are generated from tenant settings. Full keys allow read/write operations; read-only keys should be used for integrations that only need status or reporting. Some operations require a global or administrator key.

https://pbx.example.com/mirtapbx/proxyapi.php?tenant=CANISTRACCI&key=TENANT_API_KEY&reqtype=HELP

Response Formats

Many requests support text, JSON, XML, or template-driven output. For call-history exports, XML templates can restrict the returned fields and produce CSV-style output.

Main Request Types

Request typeUse
INFORead call history, recordings, extension state, registrations, DIDs, queues, agents, balance, variables, flows, and other status data.
DNDGet or set do-not-disturb for an extension.
DIALOriginate a call from an extension or account and then dial a destination.
QUEUEAdd, remove, clean, list, or log queue members depending on the action.
AGENTPause, unpause, remove, or list queue agents.
VOICEMAILList messages, retrieve one message, mark read/unread, or delete messages.
MANAGEDBPerform structured create, read, update, delete, and helper actions against supported PBX objects.
GETWEBRTCAUTHAuthenticate an extension user and return WebRTC connection details.

Examples

# List extensions for one tenant
curl "https://pbx.example.com/mirtapbx/proxyapi.php?tenant=CANISTRACCI&key=TENANT_API_KEY&reqtype=INFO&info=EXTENSIONS&format=json"

# Read extension state
curl "https://pbx.example.com/mirtapbx/proxyapi.php?tenant=CANISTRACCI&key=TENANT_API_KEY&reqtype=INFO&info=EXTSTATE&ext=100&format=json"

# Set DND on an extension
curl "https://pbx.example.com/mirtapbx/proxyapi.php?tenant=CANISTRACCI&key=TENANT_API_KEY&reqtype=DND&action=SET&number=100&value=on"

# Originate a call
curl "https://pbx.example.com/mirtapbx/proxyapi.php?tenant=CANISTRACCI&key=TENANT_API_KEY&reqtype=DIAL&source=100&dest=15551234567&account=100-CANISTRACCI"

Managed Database Objects

The managed database mode supports many configuration objects, including tenants, providers, routing profiles, routes, extensions, DIDs, IVRs, queues, hunt lists, media files, music on hold, feature codes, short numbers, custom destinations, users, user groups, conditions, phones, and phonebooks.

# List routing profiles
curl "https://pbx.example.com/mirtapbx/proxyapi.php?key=GLOBAL_API_KEY&reqtype=MANAGEDB&object=ROUTINGPROFILE&action=LIST&format=json"

# Get one tenant
curl "https://pbx.example.com/mirtapbx/proxyapi.php?key=GLOBAL_API_KEY&reqtype=MANAGEDB&object=TENANT&action=GET&id=TENANT_ID&format=json"

Security Notes

  • Use read-only keys when write access is not required.
  • Rotate keys when an integration is decommissioned.
  • Do not place production keys in scripts, screenshots, or shared tickets.
  • Prefer HTTPS and restrict source IPs at the firewall or reverse proxy when possible.