Skip to content
UnifiedAPI v5

Data Types

This page describes the data types used in the UnifiedAPI.

PhoneCallStat

A phone call record saved by the system is represented by the UnifiedAPI as a PhoneCall resource. Statistics about the phone call activity are represented as a PhoneCallStat resource.

Type: object

Properties

PropertyTypeRequiredDescription
typenumberNoType of the call:
  • 0 - incoming call
  • 1 - outgoing call
totalnumberNoTotal number of phone calls.
answerednumberNoNumber of answered phone calls.
unanswerednumberNoNumber of unanswered phone calls.
unknownnumberNoNumber of unknown phone calls.
busynumberNoNumber of busy phone calls.
failednumberNoNumber of failed phone calls.
unallowednumberNoNumber of phone calls that were refused by the system.
Example
json
{
  "type": 0,
  "total": 17558,
  "unanswered": "4063",
  "busy": "5435",
  "failed": "3313",
  "unknown": 0,
  "unallowed": 0,
  "answered": "4747"
}

Fax

A fax is represented by UnifiedAPI as a Fax resource with the following components.

Type: object

Properties

PropertyTypeRequiredDescription
idnumberNoId of the fax.
uidstringNoThe unique Id of the Fax, used in the public fax page.
recipientsArray<string>NoThe recipients of the Fax. The numbers may be extended or short (in case of Phone Terminal extensions).
filesArray<FaxFile>NoArray of files to be sent with the fax. Each file must include name, size, and type.
Example
json
{
  "id": 262,
  "uid": "ba123e75751d52b84f6527062fd20bd1",
  "recipients": [
    "1112",
    "1234567890"
  ],
  "files": [
    {
      "uploadIdentifier": "doc001",
      "redirect": true,
      "heUri": "https://api.hubgets.com/at/file/action?id=31mMULR90JvqyO&ver=31n3mJOAMcMtWM&nm=document.pdf&cl=OTHER&vw=main",
      "redirectUri": "https://storage.example.com/bucket/file?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Signature=...",
      "redirectHeaders": {
        "x-amz-meta-he-int-faxout": 1,
        "x-amz-meta-he-aid": "1",
        "x-amz-meta-he-aty": "USER",
        "x-amz-meta-he-nm": "document",
        "x-amz-meta-he-ext": "pdf",
        "x-amz-meta-app-faxid": 262,
        "x-amz-meta-app-filecount": 2
      },
      "contentType": "application/pdf",
      "contentLength": 1048576
    },
    {
      "uploadIdentifier": "img001",
      "redirect": true,
      "heUri": "https://api.hubgets.com/at/file/action?id=31bQgIU1shao5z&ver=31ASZnnrd1m25i&nm=image.jpg&cl=OTHER&vw=main",
      "redirectUri": "https://storage.example.com/bucket/file2?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=...&X-Amz-Signature=...",
      "redirectHeaders": {
        "x-amz-meta-he-int-faxout": 1,
        "x-amz-meta-he-aid": "1",
        "x-amz-meta-he-aty": "USER",
        "x-amz-meta-he-nm": "image",
        "x-amz-meta-he-ext": "jpg",
        "x-amz-meta-app-faxid": 262,
        "x-amz-meta-app-filecount": 2
      },
      "contentType": "image/jpeg",
      "contentLength": 524288
    }
  ]
}

PhoneCallView

Describes a phone call leg in real-time.

Type: object

Properties

PropertyTypeRequiredDescription
idObjectIdNoThe Id of the PhoneCallView as generated by the Service. The Id of the view can be used later to edit the call.
callerIdCaller-IdNoThe caller Id. Can be NULL
callerIdDestinationCaller-IdNoThe caller name and number. It is displayed to the destination.
extensionExtension-NumberNoThe phone number of the Extension. The PhoneCallView is from the perspective of this extension.
statusnumberNoThe status of the call, which is set to:
  • 0 - unknown
  • 1 - off hook
  • 2 - trying
  • 3 - ringing
  • 4 - other side is ringing
  • 5 - on call Possible values: 0, 1, 2, 3, 4, 5
sourceArray<string>NoThe number that made the call. Can be an extended extension number or a public phone number.
destinationArray<string>NoThe number that received the call. Can be an extended extension number or a public phone number.
flownumberNoThe flow of the call, which is set to:
  • 2 - a local call
  • 4 - an outgoing public call
  • 8 - an incoming public call Possible values: 2, 4, 8
ringingDateNoThe date when the source terminal started ringing. Can be missing if the call is answered.
recordingDateNoThe date when the phone call started to be recorded. Can be missing if the call is not recorded.
answeredDateNoThe date the source answered the call. Can be missing if the call is ringing.
parkedDateNoThe date when the phone call was parked. Can be missing if the call is not parked.
parkedPosnumberNoThe position of the call in the parking lot. Can be NULL
parkedByExtension-NumberNoThe number that put the phone call in the parking lot. Can be NULL
dispositionnumberNoThe call disposition:
  • 0 - ANSWERED - calls that were answered
  • 1 - BUSY - calls that were answered with a busy tone
  • 2 - FAILED - calls that have failed
  • 3 - NO ANSWER - calls that had no answer
  • 4 - UNKNOWN - unknown calls
  • 5 - NOT ALLOWED - calls that were not allowed. Can be NULL Possible values: 0, 1, 2, 3, 4, 5
onHoldDateNoThe date the phone call was put on hold. Can be NULL
holdernumberNoIf set to 1, this peer put the phone call on hold. Can be NULL
spyingnumberNoThis flag is set to 1 if the extension is spying it's peer. This can be the case when a barge in or whisper is attempted. Can be NULL
queueExtension-NumberNoThe phone number of the queue extension. Used when a call is routed using a queue. Can be NULL

PhoneCallAction

During its lifetime, a phone call can be put on hold, parked, recorded or manipulated using other actions. These actions are represented as the PhoneCallAction object by UnifiedAPI.

Type: object

Properties

PropertyTypeRequiredDescription
actionstringNoThe type of action to perform. Possible values: Possible values: OnHold, OffHold, StartRecording, StopRecording, PickUp, BargeIn, Park, UnPark, Whisper, Monitor, Transfer, TransferToVoicemail
sendCallTostringNoSome actions need a phone number to send the call to. This field should contain the number.
callerIdCaller-IdNoWhen a call is barged in or is whispered on, a caller Id can be sent to the Service.
waitForPickupnumberNoThe maximum number of seconds to wait until one of the phone numbers used picks up. As soon as the set time value runs out, the call is canceled.
phoneCallViewIdstringNoThe Id of PhoneCallView that is subject to the change.
formatstringNoUsed only when recording a phone call and must be set to the format of the recorded file.
maxInParkingnumberNoThe maximum number of seconds to wait until the parking ends. As soon as the set time value runs out, the parking is canceled.
Example
json
{
  "action": "PickUp",
  "sendCallTo": "0003*210*",
  "callerId": "John Doe <42420042>",
  "waitForPickup": "20",
  "phoneCallViewId": "zz",
  "maxInParking": "400"
}

PhoneRegistration

Type: object

Properties

PropertyTypeRequiredDescription
registrationnumberNoDefines registration status. Possible values:
  • 1 - registered
  • 2 - no registration necessary
  • -1 - not registered
  • 0 - unknown
agentstringNoDefines the User-Agent of the connected device.
expireDateNoSpecifies registration expiration date. Missing when registration has expired.
Example
json
{
  "agent": "3CXPhone 5.0.14439.0",
  "registration": "-1",
  "expire": "2011-02-10T15:10:55Z"
}

Collection

Structure used to return objects requested through the API.

Type: object

Properties

PropertyTypeRequiredDescription
entryArray<object>NoAn array of objects, one for each item matching the request.
startIndexnumberNoThe index to start with when retrieving chunks. If you do not supply this property, then it will be assumed zero. To retrieve next or previous chunk, use the nextChunk, respectively prevChuck returned in response object.
itemsPerPagenumberNoThe size of the chunk.
filteredbooleanNoWhether the results are filtered. It takes into the consideration the default filterBy.
sortedbooleanNoWhether the results are sorted.
pagingPagingNoSee Paging
Example
json
{
  "entry": [],
  "startIndex": 20,
  "totalResults": 415,
  "itemsPerPage": 20,
  "filtered": true,
  "sorted": true,
  "paging": {
    "next": "https://api.hubgets/uapi/cdr/20?startIndex=50",
    "prev": "https://api.hubgets/uapi/cdr/20?startIndex=10"
  }
}

PhoneCall

A phone call is represented by UnifiedAPI as a PhoneCall resource and contains the PhoneCallView components which describes the phone call from the perspective of the parties involved in the phone call.

Type: object

Properties

PropertyTypeRequiredDescription
idObjectIdNoThe Id of the PhoneCall as saved in the system. The Id is generated by the Service and can be later used to list or edit the PhoneCall details.
extensionExtension-NumberNoThe number of the Extension that is charged for the phone call. This Extension might not be a party of the phone call.
ownerIdObjectIdNoThe Id of the Organization that owns the PhoneCall.
ownerNamestringNoThe name of the Organization that owns the PhoneCall.
answeredDateNoThe date the phone call was answered. Can be NULL.
publishedDateNoThe date the phone call entered the system.
phoneCallViewPhoneCallViewNoThe legs of the call, we call them views.
noncestringNoA unique string that allows identifying the call created based on this request.
Example
json
{
  "id": "b817d2618fe6f1804333",
  "nonce": "130c5a97768be67df6543b5f5fa3cc51",
  "extension": "0003*210",
  "ownerId": "53tete535",
  "ownerName": "53tete535",
  "published": "2011-02-10T15:04:55Z",
  "answered": "2011-02-10T15:10:55Z",
  "phoneCallView": [
    {
      "id": "00",
      "extension": "0003*210",
      "source": [
        "0003*211",
        "0003*210"
      ],
      "destination": [
        "3334444"
      ],
      "flow": 4,
      "status": 3,
      "ringing": "2011-02-10T15:04:55Z",
      "callerID": "John Doe <3332222>"
    },
    {
      "id": "01",
      "extension": "0003*211",
      "source": [
        "0003*211",
        "0003*210"
      ],
      "destination": [
        "3334444"
      ],
      "flow": 4,
      "status": 3,
      "ringing": "2011-02-10T15:04:55Z",
      "callerID": "John Doe <3332222>"
    }
  ],
  "links": {
    "self": "..."
  }
}

PhoneCallEvent

A phone call event is represented by the UnifiedAPI as a PhoneCallEvent resource.

Type: object

Properties

PropertyTypeRequiredDescription
idObjectIdNoId of the Phone Call Event.
typenumberNoType of the Phone Call Event.
  • 0 for Dial-In
  • 1 for Dial-Out
  • 2 for Hangup
  • 3 for Answer incoming call
  • 4 for Answer outgoing call Possible values: 0, 1, 2, 3, 4
urlstringNoThe URL that is accessed when the extension receives, makes or terminates a phone call. Must be encoded using the RFC 3986.
methodnumberNoThe HTTP method used by the server to access the URL when an event occurs.
  • 0 for GET
  • 1 for POST Possible values: 0, 1
statusnumberNoTheThe status of the event.
  • 0 for disabled
  • 1 for enabled Possible values: 0, 1
notestringNoNotes about the event.
modifiedDateNoDate when the event was last modified.
Example
json
{
  "type": 0,
  "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq",
  "method": 0,
  "note": "My extension event is awesome",
  "url": "http://mynEvent.com/SaveMyPhoneCallDetails",
  "status": 1,
  "modified": "2012-07-10T18:16:12+03:00"
}

Presence

The presence information for an extension is represented by the UnifiedAPI as a Presence resource. It contains the agent where the extension is registered and the expiration date of the registration.

Type: object

Properties

PropertyTypeRequiredDescription
registrationPhoneRegistrationNoSee PhoneRegistration
statusnumberNoDefines presence status. Possible values:
  • 0 - offline
  • 1 - available
  • 3 - busy Possible values: 0, 1, 3
extensionExtension-NumberNoThe phone number of the extension.
Example
json
{
  "status": "1",
  "extension": "0003*001",
  "registration": [
    {
      "agent": "3CXPhone 5.0.14439.0",
      "registration": "1",
      "expire": "2011-02-10T15:10:55Z"
    }
  ]
}

QueueAgent

A queue agent is represented by the UnifiedAPI as a Agent resource.

Type: object

Properties

PropertyTypeRequiredDescription
agentNumberstringNoPhone number assigned to a queue agent.
statusnumberNoThe agent's current status in the queue:
  • 0 - Logged Out
  • 1 - Online
  • 2 - Paused Possible values: 0, 1, 2
queueExtension-NumberNoPhone number of the queue where the agent is assigned to
typeAgent-TypeNoQueue agent type
identifierAgent-IdentifierNoQueue agent identifier
Example
json
{
  "agentNumber": "0003*210",
  "status": 1,
  "queue": "0003*003",
  "type": "local",
  "identifier": "agentIdentifier",
  "links": {
    "self": "https://x.x.x.x/uapi/extensions/@me/0003*003/queue/agents/agentUniqueId"
  }
}
Last updated: Jan 13, 2026