API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · phone_calls

Phone Call Schema

Schema ID
phone_call
Collection
phone_calls
Permissions
  • Readphone_call_view
  • Createphone_call_create
  • Editphone_call_edit
  • Deletephone_call_delete

Fields

Phone Call Schema

phone_calls4 permissions

Schema for phone call records including PBX integration data

directionstringrequired

Call direction

INBOUNDOUTBOUND
callerNumberstringrequired

Phone number of the caller

calledNumberstringrequired

Phone number that was called

callerNumberDigitsstringoptional

Digits-only search key derived from callerNumber (internal)

nullable
calledNumberDigitsstringoptional

Digits-only search key derived from calledNumber (internal)

nullable
durationSecondsnumberrequired

Total call duration in seconds

≥ 0
partyIduuidoptional

Linked party (customer/contact)

nullable
contactPartyIduuidoptional

Linked contact person

nullable
handledByIduuidoptional

User who handled the call

nullable
rungUserIdsuuid[]optional

Users whose phone rang during this call. Populated for inbound PBX calls (Starface CALLFLOW with CALLED_TYPE=USER) so missed calls show up under "my calls" for everyone whose extension rang, not just the (non-existent) handler.

ticketIduuidoptional

DEPRECATED (ADR 0386) — legacy single ticket link, superseded by `linkedEntities`. No UI ever wrote it; only read by the activity consumer, which now prefers `linkedEntities`.

nullable
opportunityIduuidoptional

DEPRECATED (ADR 0386) — legacy single opportunity link, superseded by `linkedEntities`. Still READ (existing calls keep showing their link) and cleared when the user removes that chip, but never written for new links. Do not add new consumers.

nullable
linkedEntitiesobject[]optional

Free-form cross-entity links (ADR 0386). A call is a touchpoint that can concern several records at once — two tickets, a complaint and the opportunity it came from — so this replaces the single-valued `ticketId`/`opportunityId` fields.

Default: []nullable
entityTypestringrequired
ticketcallback_requestprojectopportunitycomplainttaskassetvehiclecontractpartycoursecampaign
entityIduuidrequired
rolestringrequired
notestringoptional

Free-text note about the call

nullable
contactRatingintegeroptional

Manual 1-5 star rating of how the conversation went. Aggregated per contact person on the party detail page.

1 – 5nullable
contactSentimentstringoptional

Manual tone assessment of the conversation (freundlich / neutral / schwierig)

positiveneutralnegativenull
nullable
contactFeedbackNotestringoptional

Free-text note on the counterpart ("gut erreichbar", "entscheidet nicht selbst"). Kept separate from `note` (what was discussed) so the assessment can be permission-gated later without hiding the call content.

max 1000 charactersnullable
ratedByIduuidoptional

Internal user id (`users._id`) who left the assessment

nullable
ratedAtdatetimeoptional

When the assessment was last changed

nullable
isCallbackRequestedbooleanrequired

Whether a callback was requested

startedAtdatetimerequired

When the call started (ISO 8601 on the wire; stored as BSON Date)

endedAtdatetimeoptional

When the call ended (ISO 8601 on the wire; stored as BSON Date)

nullable
callerNamestringoptional

Caller name from PBX

nullable
calledNamestringoptional

Called party name from PBX

nullable
callerAccountIdnumberoptional

PBX account ID of the caller (-1 for external)

nullable
isConnectedbooleanrequired

Whether the call was answered

isInternalCallbooleanrequired

Whether this was an internal call

isPickupbooleanrequired

Whether the call was picked up by another user

externalCallUuidstringoptional

External PBX call UUID (e.g. Starface CALL_UUID)

nullable
sourcestringoptional

Source of the call record. Drives the analytics capability tier (see CALL_SOURCE_FACTS); unknown/absent values are treated as tier 1.

manualstarfaceteamsfreeswitchxelionsipgateinnovaphone3cxnfonagfeo
nullable
teamsCallIdstringoptional

Microsoft Graph call record ID

nullable
teamsCallTypestringoptional

Teams call type: peer-to-peer calling or group meeting

callingmeeting
nullable
teamsMeetingUrlstringoptional

Teams meeting join URL (for meeting-type calls)

nullable
teamsParticipantsobject[]optional

Teams call participants

nullable
displayNamestringrequired
userPrincipalNamestringoptional
nullable
microsoftUserIdstringoptional
nullable
internalUserIdstringoptional
nullable
teamsModalitiesstring[]optional

Communication modalities used (audio, video, screen share)

nullable
callFlowobject[]optional

Detailed call routing steps from PBX

nullable
indexintegerrequired
calledTypestringrequired
USERGROUPMODULEUNKNOWN
calledNamestringrequired
calledNumberstringrequired
calledAccountIdstringoptional
nullable
connectedbooleanrequired
forwardTypestringrequired
timeStartnumberrequired
timeEndnumberrequired
pickupbooleanrequired
pickupFirstNamestringoptional
nullable
pickupLastNamestringoptional
nullable
pickupAccountIdnumberoptional
nullable
pickupTimenumberoptional
nullable
pickupLoginIdstringoptional
nullable
moduleInfostringoptional
nullable
agentInfoobject[]optional
nullable
accountIdstringrequired
onlinebooleanrequired
busybooleanrequired
dndbooleanrequired
ringingbooleanrequired
waitTimeMsnumberoptional

Time the caller waited before pickup or abandonment (INBOUND only)

≥ 0nullable
rawWebhookDataobjectoptional

Raw webhook payload for future analysis

read-onlynullable
bookedAsTimeRecordIduuidoptional

Time record ID created from this call (marks call as booked)

nullable
pbxCallIdstringoptional

FreeSWITCH call UUID

nullable
sipTrunkIduuidoptional

SIP trunk used

nullable
extensionIduuidoptional

Extension that handled the call

nullable
queueIduuidoptional

ACD queue if routed through queue

nullable
recordingFileIduuidoptional

pbx_recording entity ID

nullable
transcriptTextstringoptional

Call transcript from STT

nullable
aiSummarystringoptional

AI-generated call summary

nullable
sentimentScorenumberoptional

Sentiment score -1 (negative) to 1 (positive)

-1 – 1nullable

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/phone_calls — List, paginated + filterable
  • GET /api/v1/phone_calls/<id> — Single entity
  • POST /api/v1/phone_calls — Create
  • PATCH /api/v1/phone_calls/<id> — Partial update
  • DELETE /api/v1/phone_calls/<id> — Soft delete
  • GET /api/v1/phone_calls/<id>/timeline — Audit + activities

Search