Skip to content
UnifiedAPI v5

Presence Service ​

The Presence Service is used to fetch the registration status for Extensions.

This service is available to Apps registered to the following account types:

  • Administrator

  • Organization

  • User

Base URL ​

https://{domain}/uapi

Endpoints ​

MethodEndpointDescription
GET/extensions/​{userId}/​{extension}/​presenceList Presence

List Presence ​

Use this request to list the presence status of one or several Extensions.

GET /extensions/​{userId}/​{extension}/​presence

Request ​

Path Parameters ​

ParameterTypeRequiredDescriptionDefault
userIdstringYesId of the User which owns the Extensions for which the presence is returned.It can take one of the following values: <ul> <li> @me - refers to the authenticated User . </li> <li>@viewer - also refers to the authenticated User .</li> <li>@owner - refers to the User that owns the Extension used to make the phone call. </li></ul>-
extensionstringYesExtended number of a Phone Terminal Extension. Use @self to match all the extensions under the User. The @self value can be used only if userId is different than @owner.-

Query Parameters ​

ParameterTypeRequiredDescriptionDefault
countcountNo-
filterBystringNoRecords can be filtered only by the extension field.-
filterOpstringNoRecords can be filtered only by the extension field.
  • equals (requires filterValue as String)
  • contains (requires filterValue as String)
  • startsWith (requires filterValue as String
  • inArray (requires filterValue as Array)
-
filterValuefilterValueNo-
startIndexstartIndexNo-
fieldsarrayNoAn array of ExtensionPresence field names. For standard values, please see the Presence object.-
sortOrdersortOrderNoThe parameter can be set to one of the values: asc or desc. Records will be ordered by the number of the extension. You are not allowed to set the field to sort by.-

Authentication ​

This endpoint requires authentication via cookie or header token.

Responses ​

200 OK ​

If successful, this method returns a 200 OK HTTP status code and a collection of Presence resources.

Example Response
json
[
  {
    "startIndex": 0,
    "totalResults": 2,
    "itemsPerPage": 20,
    "filtered": false,
    "sorted": false,
    "entry": [
      {
        "extension": "0003*210",
        "status": 0,
        "registration": [
          {
            "agent": "3CXPhone 5.0.14439.0",
            "registration": "-1",
            "expire": "2011-02-10T15:10:55Z"
          }
        ]
      }
    ]
  }
]

204 No Content ​

If there is no phone call to be returned, this method returns 204 No Content HTTP status code. It does not return anything in the response body.

400 Bad Request ​

If an error occurred, this API can return the standard Errors Codes or one the following:

Error codes:

401 Unauthorized ​

If the value supplied in the URI-Fragment as userId lacks the proper permissions for the requested operation.this API can return the standard Errors Codes or one the following:

Error codes:

Code Examples ​

cURL
shell
curl 'https://api.hubgets.com/uapi/extensions/@me/0003*210/presence/?filterBy=extension&filterOp=inArray&filterValue[0]=0003*210' \ 
 -H 'x-xsrf-token: 44HzZ6YIHDN6mbRY' \ 
 -H 'content-type: application/json' \ 
 -H 'cookie: dev=ffffffffffffffff2kjZMApYaH; xsrf-token=44HzZ6YIHDN6mbRY; vn=XI%2Cm-tpsEWgqBMBCNVpeAnUEaeqCpG7f' \ 
 --data-binary '{"method":"0","note":"My phone call event is awesome","url":"http://myevent.com/SaveMyPhoneCallDetails","status":"1"}'
Last updated: Jan 13, 2026