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.

Revision #18
Created 2026-06-06 07:32:07 UTC by Admin
Updated 2026-07-03 15:49:06 UTC by Admin