Welcome, we have prepared a set of necessary tools and basic rules for working with our API.
Create integration using webhooks
Structure of Basic Events:
VPBX: Incoming call start
Event type:
VPBX: Incoming call start
Event time:
01.01.2026, 00:00:00
Event data:
ivrSchemaId: 0000 userEventType: "VpbxInboundCallStart" channel: "SIP" privilege: "user,all" exten: "s" channelState: 4 callerIdNum: 40000000000 systemName: 123 dateReceived: "Yan 01, 2026, 0:00:00 PM" context: "signal-vpbx-inbound-call" callerID: 40000000000 event: "VpbxInboundCallStart" timestamp: 1765978000 callId: "000-0000000000.00000000" linkedId: "000-0000000000.00000000" callerNumber: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.721211" eventType: "VpbxInboundCallStart" priority: 3 accountId: 000000 channelStateDesc: "Ring" callerIdName: 431200000000 did: 70000000000 uniqueId: "000-0000000000.00000000" vpbxId: 0000VPBX: starting an outgoing call
Event type:
VPBX: starting an outgoing call
Event time:
01.01.2026, 00:00:00
Event data:
originateData: "" connectedLineNum: 40000000000 userEventType: "VpbxOutgoingStart" channel: "SIP" privilege: "user,all" exten: "s" channelState: 0 isRedirect: 1 callerIdNum: "s" systemName: 123 dateReceived: "Yan 01, 2026, 0:00:00 PM" context: "signal-outgoing-call" event: "VpbxOutgoingStart" calledNumber: 40000000000 timestamp: 1765970000 callId: "000-0000000000.00000000" linkedId: "000-0000000000.00000000" connectedLineName: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.048139" eventType: "VpbxOutgoingStart" internalNumber: 000 priority: 11 accountId: 000000 callback: 0 channelStateDesc: "Down" did: 40000000000 uniqueId: "000-0000000000.00000000" vpbxId: 0000VPBX: ending an incoming call
Event type:
VPBX: Ending an incoming call
Event time:
01.01.2026, 00:00:00
Event data:
ivrSchemaId: 00000 userEventType: "VpbxInboundCallEnd" channel: "SIP" privilege: "user,all" transcribationLanguage: "" exten: "s" channelState: 6 duration: 2 callerIdNum: 40000000000 file: "" systemName: 123 dateReceived: "Yan 01, 2026, 0:00:00 PM" record: 0 InternalNumber: "" transcribationProvider: "" transcribation: "" context: "signal-vpbx-inbound-call-end" schemaBillsec: 0 callerID: 40000000000 event: "VpbxInboundCallEnd" billsec: 0 timestamp: 1765970000 callId: "000-0000000000.00000000" linkedId: "000-0000000000.00000000" answered: 0 callerNumber: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.520961" eventType: "VpbxInboundCallEnd" priority: 40 firstAnswer: false accountId: 00000 durationWaiting: 2 queueName: "" time: "00:00:00" coreUserId: "" channelStateDesc: "Up" callerIdName: 40000000000 did: 40000000000 uniqueId: "000-0000000000.00000000" queue: "" vpbxId: 00000VPBX: ending an outgoing call
Event type:
VPBX: Ending an outgoing call
Event time:
01.01.2026, 00:00:00
Event data:
connectedLineNum: 40000000000 userEventType: "VpbxOutgoingEnd" callBack: 0 channel: "SIP" privilege: "user,all" transcribationLanguage: "" exten: "s" channelState: 5 answerList:{0000: true },duration: 8 isRedirect: 1 hangupCauseCode: 16 callerIdNum: 40000000000 file: "20260101-00000-0000-70000000000-000000000000000000000" systemName: 123 dateReceived: "Yan 01, 2026, 0:00:00 PM" record: 1 transcribationProvider: "" transcribation: "" context: "signal-outgoing-hangup-handler" event: "VpbxOutgoingEnd" calledNumber: 40000000000 billsec: 0 timestamp: 1765900000 callId: "000-0000000000.00000000" linkedId: "000-0000000000.00000000" answered: 0 connectedLineName: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.432797" eventType: "VpbxOutgoingEnd" internalNumber: 0000 priority: 16 firstAnswer: false accountId: 0000 durationWaiting: 8 coreUserId: "" channelStateDesc: "Ringing" did: 40000000000 uniqueId: "000-0000000000.00000000" vpbxId: 00000
Structure of other events:
Starting a call in a queue
Event type:
Starting a call in a queue
Event time:
01.01.2026, 00:00:00
Event data:
linkedid: "000-0000000000.00000000" cid_num: 40000000000 eventtime: 1765975061680000 peeraccount: "" eventType: "QUEUE_LINK_START" exten: "s" accountId: 000000 userdeftype: "QUEUE_LINK_START" appname: "CELGenUserEvent" userfield: 00000 cid_rdnis: "" peer: "" cid_dnid: 40000000000 extra: {callid: "000-0000000000.00000000" queue_name: "Name of your queue" queue: 000 queue_id: 000000 scenario_id: 00000 }, cid_ani: 40000000000 context: "queue" cid_name: 40000000000 channame: "SIP" eventtype: "QUEUE_LINK_START" id: 939970000 amaflags: 36 accountcode: 000000 uniqueid: "000-0000000000.00000000"Ending a call in a queue
Event type:
Ending a call in a queue
Event time:
01.01.2026, 00:00:00
Event data:
linkedid: "000-0000000000.00000000" cid_num: 40000000000 eventtime: 1765886885800000 peeraccount: "" eventType: "QUEUE_LINK_END" exten: "h" accountId: 000000 userdeftype: "QUEUE_LINK_END" appname: "CELGenUserEvent" userfield: 00000 cid_rdnis: "" peer: "" cid_dnid: 40000000000 extra: {callid: "000-0000000000.00000000" queue_name: "Name of your queue" queue: 000 queue_id: 000000 scenario_id: 000000 status: "LOST" }, cid_ani: 40000000000 context: "queue" cid_name: 40000000000 channame: "SIP" eventtype: "QUEUE_LINK_END" id: 9378000000 amaflags: 35 accountcode: 000000 uniqueid: "000-0000000000.00000000"Starting a call to a subscriber in the queue
Event type:
Starting a call to a subscriber in the queue
Event time:
01.01.2026, 00:00:00
Event data:
callId: "000-0000000000.00000000" queueId: null answered: 0 callerNumber: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.434168" eventType: "QueueCallEnd" startGeneralTime: 1765900000 internalNumber: 000 duration: 45 accountId: 000000 durationWaiting: 45 file: 0 queueName: "Name of your queue" record: 0 billsec: 0 did: 40000000000 uniqueID: "000-0000000000.00000000" queue: 000 whoAnswered: false timestamp: 17659000000 vpbxId: 00000Completing a call to a subscriber in the queue
Event type:
Completing a call to a subscriber in the queue
Event time:
01.01.2026, 00:00:00
Event data:
callId: "000-0000000000.00000000" queueId: null answered: 0 callerNumber: 40000000000 dateReceivedAtUTC: "2026-01-01 00:00:00.434168" eventType: "QueueCallEnd" startGeneralTime: 1765970000 internalNumber: 000 duration: 45 accountId: 00000 durationWaiting: 45 file: 0 queueName: "Name of your queue" record: 0 billsec: 0 did: 40000000000 uniqueID: "000-0000000000.00000000" queue: 000 whoAnswered: false timestamp: 1765970000 vpbxId: 00000
Structure of other events:
Call recording file ready
Event type:
Call recording file ready
Event time:
01.01.2026, 00:00:00
Event data:
callId: "000-0000000000.00000000" accountId: 000000 fileName: "20260101-160000-40000000000-40000000000-000000000000000000000" data: {callId: "000-0000000000.00000000" fileName: "20260101-160000-40000000000-40000000000-000000000000000000000" eventVersion: 2 numA: 40000000000 type: "call" transcribationLanguage: "" eventTs: 17659782000000 numB: 40000000000 objectType: "" accountId: 000000 objectNum: "" transcribationProvider: "" transcribation: 0 eventName: "record_upload_done" vpbxId: 00000 }, eventType: "record_upload_done" id: "590bff05-0f9b-4205-8312-1d431d8000000" type: "external_event" vpbxId: 00000VPBX: Question-Answer element replica
Event type:
VPBX: Question-Answer element replica
Event time:
01.01.2026, 00:00:00
Event data:
linkedid: "000-0000000000.00000000" link_uniqueid_term: "000-0000000000.00000000-1765970000-3" speechkit_id: 0000 speechkit_dialog_id: 0000000 eventType: "SpeechKitDialog" dialog_value: "" server_id: 32 accountId: 000000 vpbx_id: 00000 number: 40000000000 account_id: 000000 dialog_type: "answer" uniqueid: "000-0000000000.00000000" event_time: "2026-01-01T00:00:00.918152Z" did: 740000000000 vpbxId: 00000
How to create a webhook via API
- In the top menu, go to the "Integrations" section → "API Methods" tab;
- In the left menu, select "Integrations";
Find Webhooks methods:
/webhook/get
/webhook/create
{ "name":"New webhook", "url":"<https://example.ru>", "method":"get", "headers": {}, "body":null, "query": { "from":"John", "to":"To ${{contact_name}}" }, "logic": {}, "event_id":1,(Обязательный параметр) All methods can be viewed here/event/get "is_retriable":false, "bodyDataType":"json", "filter_id":1, "allVariables":true, "ignore_response":false }
/webhook/update
/webhook/duplicate
Also, to create webhooks via API you will need an API token, it is located in the Integrations and API v2.0 section in the 2nd top bar, "Tokens' tab.
- In the left menu, select "Integrations";
- In the top menu, go to the "Integrations" section → "API Methods" tab;
Frequently asked questions about tokens (API key)
An API token (or API key) is a unique identifier used for authentication and authorization when accessing an API (Application Programming Interface).
The token can be viewed by an employee with Administrator or Account Owner role;
The token is linked to an employee and contract (if the user has many contracts, you can make the desired contract default (click on the star before the contract) and then a token will appear in it.

How to call a token from a non-default account
key - x-account-id — Variable name;
value — Account number in which authorization should take place.
If the account number is passed in the header, authorization will occur in it; if the header is empty, authorization will be in the default account (where the star is)
Curl example:
curl --location
'https://integration.kompaas.tech/api/protected/api/integration/config/get?config_id=####' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Sec-Fetch-Mode: cors' \
--header 'x-account-id: ######' \
--header 'Authorization: Bearer ' \
--data ''
General questions and useful links:
If you have any questions related to integration or encounter problems when creating an integration, please contact us at +43 1 412 00 99 or email support@kompaas.tech.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article