Phone Book Entry
The Phone Book Entry object is supported by the MiRTA PBX OpenAPI endpoint. This object is tenant-scoped. Tenant API keys must include tenant=CANISTRACCI; writes require a writable API key.
Object Summary
| Property | Value |
|---|---|
| Object | phonebookentry |
| Primary path | /phonebookentries |
| ID field | pe_id |
| Label field | pe_id |
| Primary source table | pe_phonebookentries |
| Required on create | phonebook_id, at least one value |
| Path aliases | /phonebookentry, /phonebookentries, /phonebook_entry, /phonebook_entries, /phonebookcontact, /phonebookcontacts, /phonebook_contact, /phonebook_contacts |
Endpoint Patterns
| Action | Example pattern |
|---|---|
| List | GET https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI |
| Get by ID | GET https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI |
| Create | POST https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI |
| Update | PATCH https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI |
| Delete | DELETE https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI |
Accepted Field Aliases
| Request field | Source field |
|---|---|
phonebook_id | pe_pb_id |
pbid | pe_pb_id |
values | pd_phonebookdetails keyed by pi_code |
fields | pd_phonebookdetails keyed by pi_code |
details | pd_phonebookdetails rows |
NAME | phone book item code |
PHONE1 | phone book item code |
PHONE2 | phone book item code |
EMAIL | phone book item code |
ROUTING | phone book item code |
Important Notes
- Entry values are stored in pd_phonebookdetails and are keyed by pi_phonebookitems.pi_code.
- Send values as a values or fields object, as top-level item codes, or as detail rows containing pi_id or pi_code and a value.
- Sending an empty string or null for a value clears that field from the entry.
Examples
List Phone Book Entries
Returns the phone book entries visible to the key and scope.
curl -H "X-API-Key: TENANT_API_KEY" \
"https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI"
Get Phone Book Entry
Reads one object by its internal ID.
curl -H "X-API-Key: TENANT_API_KEY" \
"https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI"
Create Phone Book Entry
Creates a new object. Use the short aliases shown above or the source field names.
curl -X POST \
-H "X-API-Key: TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phonebook_id": 12,
"values": {
"NAME": "Ada Rivera",
"PHONE1": "+15551230001",
"EMAIL": "ada.rivera@example.com",
"ROUTING": "EXT-100"
}
}' \
"https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI"
Edit Phone Book Entry
Updates only the supplied fields.
curl -X PATCH \
-H "X-API-Key: TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"values": {
"PHONE1": "+15551230002",
"EMAIL": "ada.updated@example.com"
}
}' \
"https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI"
Delete Phone Book Entry
Deletes the object. Check references before deleting configuration used by routing or reporting.
curl -X DELETE \
-H "X-API-Key: TENANT_API_KEY" \
"https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI"
List Entries for One Phone Book
Filters the phone book entry list by parent phonebook_id. The aliases pbid and pe_pb_id are also accepted.
curl -X GET \
-H "X-API-Key: TENANT_API_KEY" \
"https://pbx.example.com/pbx/openapi.php/phonebookentries?tenant=CANISTRACCI&phonebook_id=12"
Clear Phone Book Entry Value
Removes the EMAIL detail row for the selected entry while leaving other values unchanged.
curl -X PATCH \
-H "X-API-Key: TENANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"values": {
"EMAIL": ""
}
}' \
"https://pbx.example.com/pbx/openapi.php/phonebookentries/OBJECT_ID?tenant=CANISTRACCI"
Common Errors
| Error | Meaning |
|---|---|
missing_api_key | No API key was supplied in the query string, X-API-Key, or bearer token. |
invalid_api_key | The supplied key does not match the tenant or global API key. |
tenant_required | A tenant code is required for tenant-scoped writes or tenant-key reads. |
read_only_api_key | The key can read data but cannot create, update, or delete objects. |
missing_required_field | A required create field is missing. |
No comments to display
No comments to display