Table of Contents

API : PBX : Events List

Introduction

A PBX event is a rule that runs actions - a webhook, an SMS, a call, setting a variable or a switch, or changing the members of a queue - when something happens on the PBX. See PBX events for the triggers, the variables and the limits.

Request

This request returns a list of the customers events.

URL https://api.telecomx.dk/pbx/events
Method GET
Access level VIEWER, MANAGER or OWNER if user belongs to the customer.
RESELLER if customer belongs to the reseller.
ADMIN.
Query offset [optional] Index of the first event to return, default 0, max 10000.
limit [optional] The number of events to return, default 50, min 1, max 1000.
filter [optional] Words separated by spaces that must all be found in the event's target, webhook URL, SMS recipients, names of the variable and switch to set, or notes. Not case sensitive.
full [optional] True to return all properties of each event.
customer [optional] Id of customer to list events for. Defaults to the users own customer if not specified. Only used by RESELLER and ADMIN.

An offset or limit outside its range is moved to the nearest allowed value.

Query examples

https://api.telecomx.dk/pbx/events
https://api.telecomx.dk/pbx/events?customer=1234567890123456789ABCDE
https://api.telecomx.dk/pbx/events?customer=1234567890123456789ABCDE&limit=20&offset=40
https://api.telecomx.dk/pbx/events?filter=door1
https://api.telecomx.dk/pbx/events?full=true

Response

JSON object
offset Index of the first event returned.
limit Number of events to return. Note that the actual number of returned events may be lower.
total Number of events that can be returned when offset and limit is not considered. This is to be used for paging through the data.
events Array of events, see definition below.
Event object (normal)
_id Id Unique id of the event.
type String What triggers the event - see Triggers.
target String What the trigger is limited to, null for no limit.
enabled Boolean True if the event is triggered, false if it is kept but not triggered.
notes String Notes about the event.

With full=true, each event has all its properties, as described in Get - except the webhook secret, which the list never returns, not even to users who may change the events. Get the event with Get to see it.

Example - normal

{
  offset: 0,
  limit: 50,
  total: 2,
  events: [
    {
      _id: '12345678901234567890ABCD',
      type: 'CALL_END',
      target: '+4570',
      enabled: true,
      notes: 'Tell the sales team about calls to the 70 number'
    },
    {
      _id: '12345678901234567890ABCE',
      type: 'SWITCH_ON',
      target: 'SHARED:door1',
      enabled: false,
      notes: 'Open the door - not in use'
    }
  ]
}

Example - full=true

{
  offset: 0,
  limit: 50,
  total: 1,
  events: [
    {
      _id: '12345678901234567890ABCE',
      customer: '1234567890123456789ABCDE',
      type: 'SWITCH_ON',
      enabled: true,
      target: 'SHARED:door1',
      timers: [],
      webhook: {
        method: 'GET',
        url: 'https://door.example.com/open?by=%SWITCH_NAME%',
        json: ''
      },
      setSwitch: {
        target: 'SHARED:door1',
        value: false
      },
      notes: 'Open the door, and turn the switch off again',
      createdAt: '2026-11-04T08:12:44.000Z',
      updatedAt: '2026-11-04T09:01:02.000Z'
    }
  ]
}

Errors

Error code Message Description
403 access_denied Insufficient access level, or the customer does not have hosted PBX
404 customer Customer not found
500 internal_error <Unspecified>