API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · phone_calls

Phone Call Schema

ID du schéma
phone_call
Collection
phone_calls
Autorisations
  • Lirephone_call_view
  • Créerphone_call_create
  • Modifierphone_call_edit
  • Supprimerphone_call_delete

Champs

Phone Call Schema

phone_calls4 autorisations

Schema for phone call records including PBX integration data

directionstringobligatoire

Call direction

INBOUNDOUTBOUND
callerNumberstringobligatoire

Phone number of the caller

calledNumberstringobligatoire

Phone number that was called

callerNumberDigitsstringfacultatif

Digits-only search key derived from callerNumber (internal)

nullable
calledNumberDigitsstringfacultatif

Digits-only search key derived from calledNumber (internal)

nullable
durationSecondsnumberobligatoire

Total call duration in seconds

≥ 0
partyIduuidfacultatif

Linked party (customer/contact)

nullable
contactPartyIduuidfacultatif

Linked contact person

nullable
handledByIduuidfacultatif

User who handled the call

nullable
rungUserIdsuuid[]facultatif

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.

ticketIduuidfacultatif

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
opportunityIduuidfacultatif

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[]facultatif

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.

Par défaut : []nullable
entityTypestringobligatoire
ticketcallback_requestprojectopportunitycomplainttaskassetvehiclecontractpartycoursecampaign
entityIduuidobligatoire
rolestringobligatoire
notestringfacultatif

Free-text note about the call

nullable
contactRatingintegerfacultatif

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

1 – 5nullable
contactSentimentstringfacultatif

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

positiveneutralnegativenull
nullable
contactFeedbackNotestringfacultatif

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 caractèresnullable
ratedByIduuidfacultatif

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

nullable
ratedAtdatetimefacultatif

When the assessment was last changed

nullable
isCallbackRequestedbooleanobligatoire

Whether a callback was requested

startedAtdatetimeobligatoire

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

endedAtdatetimefacultatif

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

nullable
callerNamestringfacultatif

Caller name from PBX

nullable
calledNamestringfacultatif

Called party name from PBX

nullable
callerAccountIdnumberfacultatif

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

nullable
isConnectedbooleanobligatoire

Whether the call was answered

isInternalCallbooleanobligatoire

Whether this was an internal call

isPickupbooleanobligatoire

Whether the call was picked up by another user

externalCallUuidstringfacultatif

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

nullable
sourcestringfacultatif

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

manualstarfaceteamsfreeswitchxelionsipgateinnovaphone3cxnfonagfeo
nullable
teamsCallIdstringfacultatif

Microsoft Graph call record ID

nullable
teamsCallTypestringfacultatif

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

callingmeeting
nullable
teamsMeetingUrlstringfacultatif

Teams meeting join URL (for meeting-type calls)

nullable
teamsParticipantsobject[]facultatif

Teams call participants

nullable
displayNamestringobligatoire
userPrincipalNamestringfacultatif
nullable
microsoftUserIdstringfacultatif
nullable
internalUserIdstringfacultatif
nullable
teamsModalitiesstring[]facultatif

Communication modalities used (audio, video, screen share)

nullable
callFlowobject[]facultatif

Detailed call routing steps from PBX

nullable
indexintegerobligatoire
calledTypestringobligatoire
USERGROUPMODULEUNKNOWN
calledNamestringobligatoire
calledNumberstringobligatoire
calledAccountIdstringfacultatif
nullable
connectedbooleanobligatoire
forwardTypestringobligatoire
timeStartnumberobligatoire
timeEndnumberobligatoire
pickupbooleanobligatoire
pickupFirstNamestringfacultatif
nullable
pickupLastNamestringfacultatif
nullable
pickupAccountIdnumberfacultatif
nullable
pickupTimenumberfacultatif
nullable
pickupLoginIdstringfacultatif
nullable
moduleInfostringfacultatif
nullable
agentInfoobject[]facultatif
nullable
accountIdstringobligatoire
onlinebooleanobligatoire
busybooleanobligatoire
dndbooleanobligatoire
ringingbooleanobligatoire
waitTimeMsnumberfacultatif

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

≥ 0nullable
rawWebhookDataobjectfacultatif

Raw webhook payload for future analysis

lecture seulenullable
bookedAsTimeRecordIduuidfacultatif

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

nullable
pbxCallIdstringfacultatif

FreeSWITCH call UUID

nullable
sipTrunkIduuidfacultatif

SIP trunk used

nullable
extensionIduuidfacultatif

Extension that handled the call

nullable
queueIduuidfacultatif

ACD queue if routed through queue

nullable
recordingFileIduuidfacultatif

pbx_recording entity ID

nullable
transcriptTextstringfacultatif

Call transcript from STT

nullable
aiSummarystringfacultatif

AI-generated call summary

nullable
sentimentScorenumberfacultatif

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

-1 – 1nullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/phone_calls — Liste, paginée et filtrable
  • GET /api/v1/phone_calls/<id> — Une entité
  • POST /api/v1/phone_calls — Créer
  • PATCH /api/v1/phone_calls/<id> — Mise à jour partielle
  • DELETE /api/v1/phone_calls/<id> — Suppression logique
  • GET /api/v1/phone_calls/<id>/timeline — Audit et activités

Recherche